Using the DDS C Compiler with the Micropac HC11 When using DDS C for the 68HC11 on the Micropac HC11 there are a few modifications required after DDS has been installed. A batch file (6811C.BAT) is provided on this directory that automatically makes these modifications for you. The modifications are all contained in the files 6811RLP.ASM and 6811RLM.ASM. The batch file replaces these files with ones that contains the modifications. The modifications are the starting address for downloaded programs (0100H), the starting address of usable RAM (0100H), the register base address, and the stack address (0FFD4). The starting address gives you the most run space available and the stack address is the default for the Buffalo Monitor. The 6811C.BAT requires a single parameter, the default COM port of the Micropac which will be used for serial communications with the Monitor. Also the batch file should be executed from the floppy, with the floppy as the default drive. To install for the main serial port (COM0), you would enter... 6811C 0 Note that if the upgrade option (Aux. Serial Port, E341-03) is installed, the file SERIO.ASM must be replaced in order to have standard I/O redirected to the Aux. serial port (COM1). This can be accomplished by placing the number 1 on the command line after the 6811C.BAT batch file as follows... 6811C 1 The batch file will then rename the original SERIO.ASM to SERIO0.ASM and copy the new SERIO.ASM to the C:\MC\LIB11 directory. --------------------------------------------------------------------------- To start the Integrated Development Environment (IDE) change directories to C:\MC CD C:\MC then type C You should now be presented with the option to select a file. Using the cursor keys select... Hello.C and press Enter. You are now in the Editor screen where you can enter programs and make changes. The file 6811.ide which is copied from the disk by the 6811C.BAT file contains all of the configuration defaults for DDS. Two of these configurations for the PC are, COM2 serial port and 9600 baud. If these are incorrect you can change them by pressing... Alt O (that is the key and the O key at the same time). You are now presented with a menu of choices. Make any changes that are required by selecting with the up/down cursor keys and pressing Enter. When you are through, press Esc to return to the Edit screen. The next step is to compile the Hello.C program. This is done by pressing... Alt C (that is the key and the C key at the same time). Use the cursor key to select "Compile" and press Enter. A window appears at the bottom of the screen. If any syntax errors had occured this is where you would be notified of them. You would then fix the errors in your program and recompile until you have 0 errors. Once you have a clean compile a Hex file of the same names is created with a .Hex extension, this is the file which will be downloaded to the Micropac HC11. To download the Hello.Hex file just created, press Alt T (that is the key and the T key at the same time). Use the cursor key to select "Connect" and press Enter. -------------------------------------------------------------------- This places you in the terminal mode. Upon pressing the ? key, you should see the Buffalo's menu on your PC's screen. If you do not see the menu then make sure the the baud rate and the COM port are correct and try again. You may also try establishing communications with Procomm which is provided on the disk. Once communications have been established type LOAD followed the the Enter key. Now press your PC's function key F3 You will be prompted for the Hex file to download, if the file is correct hit Enter. Once the download is complete, provided it was successful, the ">" prompt will return. To start the program type... GO 100 The program should now print on your PC's screen Hello World then terminate. To return to the Edit screen just press... Esc -------------------------------------------------------------------- There is another C program that works with the Micropac HC11, BJ6811.C this is a simple Black Jack program. This program has been enhanced by EMAC and is far superior to the one that is included with DDS. The C compiler has a number of options of its own. By pressing... Alt C and selecting "options" you can turn on/off Full ASM Listing which will give you a .lst file (ASM source file with Addresses, Opcodes, and comments) and C-Source Comments that can be very useful for debugging. These options are on by default.