--------------------------------------------------------------------------- Anonymous FTP server: cher.media.mit.edu (18.85.0.47) This file: pub/projects/interactive-c/as11/as11_ic.README Last updated: October 7, 1995 Maintained by: Randy Sargent (rsargent@media.mit.edu) --------------------------------------------------------------------------- Information about as11_ic and as11_cpp: as11_cpp is required to assemble the file pcode.asm. as11_ic is required to assemble objects that IC can dynamically link in (".icb" files) As of today, as11_ic and as11_cpp exist under UNIX and MS-DOS. They are currently implemented as shell scripts, and make use of a C preprocessor. The unix versions of as11_icb and as11_cpp can be found in the as11 sources. The MS-DOS versions of as11_ic and as11_cpp are in pub/projects/interactive-c/ms-dos/pcode_pc.zip (big thanks to Kent Farnsworth!) More information about how as11_cpp and as11_ic work: as11_cpp is a shell script which calls a somewhat modified version of motorola's freeware assembler, as11. It doesn't work on all machines, so you might need to frob with it a bit. If worse comes to worse, you can try running the preprocessor on the files and manually take out all the '#' lines the preprocessor spits out, so you'll be compatible with the unmodified as11. It is possible on a IBM PC to manually do this as well. as11_ic is a shell script which simply assembles the input file at two different locations. pass 1: ZERO_PAGE_START=$10 MAIN_START=$8020 pass 2: ZERO_PAGE_START=$13 MAIN_START=$872B It just calls as11_cpp twice, with different defines each time: as11_cpp $argv -DZERO_PAGE_START=\$10 -DMAIN_START=\$8020 as11_cpp $argv -DZERO_PAGE_START=\$13 -DMAIN_START=\$872B - cre >/tmp/$$.cre It runs the assembler the second time with the "cre" flags to create the symbol listing at the end. The output of as11_icb, a .icb file, is simply the two .s19 outputs concatenated, with symbols of the second at the end. When IC loads this file, it compares the two different .s19 parts of the .icb to determine how to relocate the .icb binary -arbitrarily- in memory. OK, this is gross, but it beat hacking motorola's assembler to output relocation information, which was my first attempt. IC allocates some space in zero page and some space in the upper 32K on the fly, and puts parts of the .icb file in each. IC then looks at the symbol table, and records symbols starting with procedure_ or variable_ (I don't remember if those are the exact prefixes) and sticks them in the C symbol table. Note that some c preprocessors are incompatible with some assembly constructs, such as: #'f for which they will give "Unterminated character constant" or a similar message. If you have access to gcc, use "gcc -E -traditional" and it should work fine. Good luck! Randy Sargent rsargent@media.mit.edu October 7, 1995