Creating CP/M 2.2 Boot Image for Genie III Assembling Source Files (CP/M 2.2 and CP/M 3) A>ASM CPM22.AAZ the “Z” generates no listing CP/M ASSEMBLER - VER 2.0 EC33 01DH USE FACTOR END OF ASSEMBLY A>M80 BOOTER,=BOOTER no listing No Fatal error(s) A>L80 /P:4200,BOOTER,BOOTER/N/X/E the “/P:4200” makes the output file start at 4200h instead of 0100h. “/N/X/E” generates a .hex file and exits Link-80 3.44 09-Dec-81 Copyright (c) 1981 Microsoft Data 4200 42E8 < 232> 46930 Bytes Free [0000 42E8 66] A>M80 CBIOS,=CBIOS no listing No Fatal error(s) A>L80 CBIOS,CBIOS/N/X/E “.PHASE” directive in CBIOS.MAC outputs from L80 at 0100h even though the code will run at EC00h Link-80 3.44 09-Dec-81 Copyright (c) 1981 Microsoft Data 0100 1500 < 5120> 42042 Bytes Free [0000 1500 20] A>MAC SYSGEN CP/M 2.2 SYSGEN utility CP/M MACRO ASSEM 2.0 04E7 005H USE FACTOR END OF ASSEMBLY A>LOAD SYSGEN FIRST ADDRESS 0100 LAST ADDRESS 04BF BYTES READ 03BE RECORDS WRITTEN 08 A>MAC SYSGEN3 CP/M 3 SYSGEN utility CP/M MACRO ASSEM 2.0 0878 009H USE FACTOR END OF ASSEMBLY A>LOAD SYSGEN3 FIRST ADDRESS 0100 LAST ADDRESS 0835 BYTES READ 06F5 RECORDS WRITTEN 0F Making Image File using DDT (CP/M 2.2) A>DDT DDT VERS 2.2 -IBOOTER.HEX -RC700 adding C700h to the 4200h ORG of BOOTER code loads NEXT PC BOOTER into RAM starting at 0900h 09E8 0000 -ICPM22.HEX -R3500 adding 3500h to the D600h ORG of the CCP loads NEXT PC CP/M into RAM starting at 0B00h 2133 0000 -ICBIOS.HEX -R2000 adding 2000h to the 0100h address output by L80 loads NEXT PC BIOS into RAM starting at 2100h 3500 0000 -G0 G zero – not “oh” A>SAVE 52 GENIECPM.COM save the CP/M image we created A>DDT GENIECPM.COM looking at what we made DDT VERS 2.2 NEXT PC 3500 0100 -L900 verify BOOTER code starts at 0900h 0900 LXI H,4250 0903 LXI D,FED1 0906 LXI B,0006 0909 ??= ED 090A ORA B 090B MVI A,0A 090D STA FEE9 0910 MVI B,15 0912 MVI E,00 0914 PUSH B 0915 LDA 4256 -DB00 verify the CCP of CP/M starts at 0B00h 0B00 C3 5C D9 C3 58 D9 7F 00 43 6F 70 79 72 69 67 68 .\..X...Copyrigh 0B10 74 20 31 39 37 39 20 28 63 29 20 62 79 20 44 69 t 1979 (c) by Di 0B20 67 69 74 61 6C 20 52 65 73 65 61 72 63 68 20 20 gital Research 0B30 20 20 20 20 00 00 00 00 00 00 00 00 00 00 00 00 ............ 0B40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0B50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0B60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0B70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0B80 00 00 00 00 00 00 00 00 08 D6 00 00 5F 0E 02 C3 ............_... 0B90 05 00 C5 CD 8C D6 C1 C9 3E 0D CD 92 D6 3E 0A C3 ........>....>.. 0BA0 92 D6 3E 20 C3 92 D6 C5 CD 98 D6 E1 7E B7 C8 23 ..> ........~..# 0BB0 E5 CD 8C D6 E1 C3 AC D6 0E 0D C3 05 00 5F 0E 0E ............._.. -L2100 verify the BIOS jump table is at 2100h 2100 JMP F0D9 2103 JMP EC36 2106 JMP ECE0 2109 JMP ED05 210C JMP ED23 210F JMP ED41 2112 JMP ED5D 2115 JMP ED72 2118 JMP ED8D 211B JMP ED9C 211E JMP EDB2 -G0 A>SYSGEN GENIECPM.COM write the new image to boot tracks (if desired) Notes (CP/M 2.2) Once you have assembled and linked the source files (and the .hex files aren’t deleted), the source files don’t need to be assembled again unless you have changed a source file. Once you have created the image file (e.g., GENIECPM.COM), you can specify the image file name on the DDT command line and perform the “I” and “R” step for only the file you have updated. For example, if you’ve made a change to the CBIOS, the following steps update the BIOS in the existing GENIECPM.COM file. A>DDT GENIECPM.COM DDT VERS 2.2 -ICBIOS.HEX -R2000 adding 2000h to the 0100h address output by L80 loads NEXT PC BIOS into RAM starting at 2100h 3500 0000 -G0 G zero – not “oh” A>SAVE 52 GENIECPM.COM save the CP/M image we updated Making Image File using DDT (CP/M 3) A>SAVE Issue CP/M 3 SAVE command before session to be saved A>DDT DDT VERS 2.2 -IBOOTER.HEX -RBF00 adding BF00h to the 4200h ORG of BOOTER code loads NEXT PC BOOTER into RAM starting at 0100h 01E8 0000 -ICPM22.HEX -R2D00 adding 2D00h to the D600h ORG of the CCP loads NEXT PC CP/M into RAM starting at 0300h 1933 0000 -ICBIOS.HEX -R1800 adding1800h to the 0100h address output by L80 loads NEXT PC BIOS into RAM starting at 1900h 2D00 0000 -G0 CP/M 3 SAVE - Version 3.1 SAVE dialog automatically comes up when DDT exits Enter file (type RETURN to exit): GENIECPM.COM Beginning hex address 0100 Ending hex address 2CFF A>DDT GENIECPM.COM looking at what we made DDT VERS 2.2 NEXT PC 2E00 0100 -L100 verify BOOTER code starts at 0100h 0100 LXI H,4250 0103 LXI D,FED1 0106 LXI B,0006 0109 ??= ED 010A ORA B 010B MVI A,0A 010D STA FEE9 0110 MVI B,15 0112 MVI E,00 0114 PUSH B 0115 LDA 4256 -D300 verify the CCP of CP/M starts at 0300h 0300 C3 5C D9 C3 58 D9 7F 00 43 6F 70 79 72 69 67 68 .\..X...Copyrigh 0310 74 20 31 39 37 39 20 28 63 29 20 62 79 20 44 69 t 1979 (c) by Di 0320 67 69 74 61 6C 20 52 65 73 65 61 72 63 68 20 20 gital Research 0330 20 20 20 20 00 00 00 00 00 00 00 00 00 00 00 00 ............ 0340 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0350 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0360 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0370 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0380 00 00 00 00 00 00 00 00 08 D6 00 00 5F 0E 02 C3 ............_... 0390 05 00 C5 CD 8C D6 C1 C9 3E 0D CD 92 D6 3E 0A C3 ........>....>.. 03A0 92 D6 3E 20 C3 92 D6 C5 CD 98 D6 E1 7E B7 C8 23 ..> ........~..# 03B0 E5 CD 8C D6 E1 C3 AC D6 0E 0D C3 05 00 5F 0E 0E ............._.. -L1900 verify the BIOS jump table is at 1900h 1900 JMP F0D9 1903 JMP EC36 1906 JMP ECE0 1909 JMP ED05 190C JMP ED23 190F JMP ED41 1912 JMP ED5D 1915 JMP ED72 1918 JMP ED8D 191B JMP ED9C 191E JMP EDB2 -G0 A>SYSGEN3 GENIECPM.COM write the new image to boot tracks (if desired) Notes (CP/M 3) Once you have assembled and linked the source files (and the .hex files aren’t deleted), the source files don’t need to be assembled again unless you have changed a source file. Once you have created the image file (e.g., GENIECPM.COM), you can specify the image file name on the DDT command line and perform the “I” and “R” step for only the file you have updated. For example, if you’ve made a change to the CBIOS, the following steps update the BIOS in the existing GENIECPM.COM file. A>SAVE CP/M 3 SAVE command before session to be saved A>DDT GENIECPM.COM DDT VERS 2.2 -ICBIOS.HEX -R1800 adding1800h to the 0100h address output by L80 loads NEXT PC BIOS into RAM starting at 1900h 2D00 0000 -G0 G zero – not “oh” CP/M 3 SAVE - Version 3.1 SAVE dialog automatically comes up when DDT exits Enter file (type RETURN to exit): GENIECPM.COM Beginning hex address 0100 Ending hex address 2CFF A>