Rick Walrond, a Windows Phone app developer, has demonstrated how he's managed to get one of his games running on Windows 8 with over 90 percent of the original code. The port of AlphaDrops took about two weeks to complete, and was shown running on a Samsung Series 7 Slate with the Windows 8 Developer Preview. We know that Windows Phone 8 apps will use the same code as in Windows 8, but this demonstration suggests that a lot of current Windows Phone developers will be able to get in on the action as well.
It looks like the transition from mobile to desktop should be pretty smooth in theory from a coding standpoint, but it's not without its quirks — user information can't currently be shared across platforms, for example, though leaderboards are compatible. Walrond also notes that while the shift from Windows Phone to Windows 8 is smooth for a simple Silverlight app such as AlphaDrops, the porting process would likely be a lot more difficult for apps developed in XNA.