I've also added testing capability in this forever loop. On the PC, any keys are stuffed into the RS-485 buffer as though they come in the hardware port. Your commands and tasks will differ, but hopefully I've provided enough of an outline to get you going. The final topic we need to cover is how to compile, link, and locate all the modules. Most previously launched from the DOS prompt, but now many run in Windows.
Several techniques perform the compile, link, and locate.
With the first approach, I type the command to compile at the DOS prompt whenever it's needed. This method quickly can be turned into a batch file, and it compiles each file every time it's executed even if the file hasn't changed, which isn't a bad approach for small projects on fast computers. The second approach uses the make utility. Usually, the time stamp of a file makes it newer than the files the input file would generate so the compile is performed. The output files become newer than the hex file, so a link and locate is automatically executed.