TDiP'i53XOR CPM 2.2 Disk 2 of 2 8" SSDDd@@"*}:*)=":O:o"*C *C!ͮ~2~2ͦ:2ͮ:O:w:w |g}o*# ):BO!yoxg*:BO}!N#F "*#*s#r^ ~!J! J*:o$*C~i6iw**{#zr+s{ozg**͕** ,w͜͸Ͳ!!N#F$**O!~#:A#~$=2Ek͌::/GyO>2!q*C"͡ʔ*JҔ^:Oyʃ?|x | s-|N-# S:2E!~Яw>T D^6k-äPYy 5*{zBK5ڋ>*Cw~#+w#w+ɯ2E22i^ *C :~w~͔͔# #  w ~>2!E5T*C!"C"C!w# F! w͌x2͢*C ~<wʃG:!ʎì 4~ʶ¬:<ʶ$ʶïZͻx>2>2ͻ:!Z2:Eẅ́͊Ͳ>2>2T*CGͻ:ẅ́n>2;O ^DM;}H>"*C ::ddslO s#r:E͊:==»Gy==»*Ww#*"͸*:G#š"͸:!w4!iw:Z!E~=262*C!!~~#~O~G#n,-.‹! w! yG!x͢.:E<ʄ! q!pQ:E<. ʄ$.:E<ʄi6}2ExN! ~态O>G~G!~G} *C!r#r#r ^ͥ_y#x#{s+p+q-*C ͥ!!q#p#w*:BOYG}*MD "ã:!Bw!>2*C~=2u:B2~2wE:A*Cw>"!""2B!"!rQQQâ~?ͦ~?rQ*"CQ-Q͜QüQrQ$Q*):B"*)*)Q;*"E:;:A2AQÓQÜQ*C}/_|/*W}_*"}o|g":ʑ*C63:ʑw:2E**E}DQ>2'lsý4ýs}ÀÅÊ&)íÑ"GsT1f > {TA1 :10002000D3F *f8:ʢ2:>22ʢ:2E:J/:E2*h:O8:/2åy*j81| !> ͚>22!"!"!":O:::J/1!<:O "9*V#^#~2!"x2y2&" P:_P*CCCɥ| ʡʣn&#>>! ~͵!:2O2O@i&))))N ^#V !+s# y~O #HA:3! _^#V,S< x< 6< .< &< < <X < < A–x/:3! _^#V,S:2_:3W, >yxo>ȯ!#%'o>/JT\dlt|&i~͵Z!:O:25_!wY!~y2:_:26G>24>ʳ!~ʰx?26Ұ>_~{/:6G> 27Oxx:7:7=!W! 9ú> 28>!<:8=28!!z!PAz!^z!cz!n!!s v :22/2>{‰!s ʆ:522̈́Wz>G͑xͺz> 28>!3?:9!"́͆> >!!9! *"!".*>"*:"*<*:O!2#~~#wq#p s#r~ȹ5@zBready id not found crc lost data busy protect flt _ Track Error boot error Read Write Seek Home No disk in drive... Hit space bar to retry, to reboot, any other key to continue >2L:![R72>2K>2M2L:![Rdy2M…:2:2E*"F*"H:=2:!E*F[R*H[RSH:!"H*F#"F2K2<2K:G[:O!:2B{_y!SC!~6g:!5*[R^*[CR^Ç:g:2E:J/:E2O>2Eyg:/2!"*"*C":K ·,:2J2:B!ʣ=ž[:L·>2:M>22/::>222:2E:J/:E2O>2Ey*"*"*":L,/*}+}y@5+}*^ :10F0ww==w}}w           V0FCF000F104F108F14AF054F05CF074 :10F1260064F06CF096F074F07CF084F08CF00000E3 :10F136 0011F9F726006939 :10F1460 [0197EB7C2EBEFCDDFEFCDB5F3B7C25AF1FB :10F15600CDEEEFC9210000C93AD3F74F3AD5F732C1 :10F1660035F1B9C85F160021F5F719DBF977592192 :10F17600F5F7197ED3F97932D5F7C93AD3F75F3A5D :10F18600E9F73236F147B73E003234F13E02CAB3F0 :10F19600F121F9F71600197EE604CAB0F178CB3FE3 :10F1A6003236F1D2B0F13E04B35F7EE603D3FD7B87 :10F1B6002FD3FCC93A36F147E5D5C5F53E0A3237B5 :10F1C600F1DBF94FB878CA06F2D33_ ,333 ,33@ ,@ @/ ,@ ? , (} !f"!:!i :!!!:hh>>}x>,2223! |>2D X O R CP/M Vers 61 of 12.20.82 0 48 961441922402883363840A Standard 1.4 & 2.2 compatible directory 128 bytes/sector256 bytes/sector512 bytes/sector1024 bytes/sector double sided 5" 8" Hard disk (k MDISK f )R?LISTER3 and LISTER0, you will have the printer in physical location 3 (meaning port 1 of SIO U12 on the serial board) assigned to logical location 0. You must then exchange STAT3 with STAT0 (in the STATTBL) so that the correct list status routine will be called when the corresponding printer is accessed. At this point, you are ready to build a new operating system with the new printer routine, CXLST. To add CXLST to your operating system, change the XXXSYS60.SUB f6CXLST.ASM for application in your system: NOTE: The present setup of CXLST.ASM will be explained below. To edit the program CXLST.ASM, you may use ED.COM or Wordstar, but Polyview is recommended. There are several things that need to be checked for in customizing the program. First, the BAUD rate necessary to interface to the printers being used. At the top of CXLST.ASM, you will see tables starting with "B110" and ending with "B19200". These are the BCXLST DOC< M COM 5MSAFMT COMPRINTER COMBLKEQU61ASMCBOOT ASM4 BLKSYS61SUBDATA ASM&MQeBLK ASMA/DIO ASM#TV^SURVEY COMHELP COMHELP HLP5 !MAC HLP="#ALGOLM HLPb$%&'ASM HLP(AUD rates and their nibble values for the programming of the 8116's (the BAUD rate generator chips located on the CPU and the serial I/O board) Just below that are the labels "BAUDA, BAUDB, BAUDC, BAUDD". These are also for the programming of the 8116's. BAUDA is channel 0 of the CPU 8116 and BAUDB is channel 1 of the CPU 8116. It is recommended that BAUDB be left at B9600 for terminal I/O and that BAUDA be set to accommodate the first printer (if you presently or in the futunBLKSYS61HEXNEDI DAT)PIP COM: CBASIC HLPk0134CBASIC2 HLP/56789: XORNEWFE$$$ BACKUP COM*1CPM HLP#UWXYZ[\]abCXLST ASM6tFORTRAN HLP7fgFLOP ASMGdPRM185 ASMP.ILPRINTER ASMKBK DAT MBASIC HLP&jklmnoPASCAL HLPMpqrpre wish to use the serial network, leave BAUDA at B9600). Next, check the list routines. They are labeled as follows: LISTER0, LISTER1, LISTER2, LISTER3, LISTER4, LISTER5. In CXLST.ASM, LISTER0 is reserved for the serial network. LISTER1 is set up for a DIABLO 1620 printer at 1200 BAUD. LISTER2 & LISTER4 are set up for a COMET 8300R printer at 9600 BAUD. LISTER3 is set up for a TI810 printer at 9600 BAUD. LISTER5 is set for a NEC interface parallel printer.fEEXAMPLE HLPsDIAGNOSECOMDSYSGEN COMKiuwzPASSCHK COMHC HLP;?@AZ80 LIB/BCDFOCO COMPv{|DDUMP COM"chNEW-INFODOC8+,-2FJSTDLST ASMND COM BLKSYS61HEXO0 NOTE: If any of your printers are not compatible to the present routines, use LISTER3 as an example to successfully write the routine for your printer and to put it in the desired LISTER location. .pa It is also necessary to have a status routine for each different type of printer used in the system. The status routines are labeled as follows: STAT0, STAT1, STAT2, STAT3, STAT4, STAT5. There is a status routine for every lister routine (i.e. LISTER0 & STAT0,   *** **  ** **  CP/M MULTIPLE LIST ROUTINE ** **  **  ***  w 11/20/82 The program CXLST.ASM will allow you to run more than one printer attached to the system.   3LISTER1 & STAT1). The status routine tests the status of the list device which will return an FF in the A register, if the printer is ready to receive a character, or a 00 in the A register if the printer is not ready to receive a character. The position look-up tables at the end of the listing show the STATTBL and TABLE for the various printers. You can put any list device first, second, etc. The STATTBL MUST match the TABLE. For instance, if you switch the position of  ^ You cannot run them simultaneously, but by using the "PRINTER" utility, software switching of the printers can be achieved. CXLST.ASM will allow a max of 6 printers (5 serial and one parallel). One serial and one parallel printer can be accessed from the CPU board. The other 4 serial printers can be accessed from a serial I/O board par numbe B-5000-44) Th seria I/ boar ca als b utilize unde MP/ withou an modifications Customizing the   @EF1FE2024 :10F1D500C8E1C921D9F3CD21F03AACEF32040032B0 :10F1E5002AF7AF323DF7C300002117F4CD21F0CD4A :10F1F5007AEEFE20CA96F23A92F0322AF7320400ED :10F20500CDDAF0C30000DBFCB7F0DBFB1213E957E6 :10F21500E610C21DF27AB7C93EC4D3F8DBFCDBFBAE :10F2250047DBFCB7F231F2DBFBC326F2DBF8B7CAEA :10F235003DF2CDF4F2C340F278D3F9CD10F17AB7AF :10F24500C93E0A3295F03EA82185F2CD8EF2E6FD43 :10F25500210000C8CD14F23A95F03D3295F0C24B2D :10F26500F221FEF3CD21F07AE64021CBF3C421F063 :10F275007AE62021D4F3C421F02146F2E5C392F1C8 :10F28 22#~2> 2!**W>,> 2!*DW*D*~,#D*DW*m,wW!,w#,w:ù>)>O+>->((î͠Ɛ'@'_͗ ,>2!*@W!~͔#7!s#  >:05*0 ?))) O !}5> >:a{*:j.1"_*++"g*#"o*JJ   4444 44--,, %%  storage location for baud rate LSTNUM EQU 3DH ; ram storage location for list number ; LIST: ; LDA PTSTFLG ; pstflg is a flag to indicate if the INR A ; printers have been init. yet or not. JZ PRNTLP ; only init. printers once!!! ; MVI A,0FFH ; set ptstflg to already done state STA PTSTFLG ; store it ; PUSH B ; save PUSH D ; LDA 3DH ; see if printer.com has been run CPI 1DH ; code from boot routine JNZ SKIPIT ; if so, user has already set baud ; IN 0BH 500DBFCB7F01AD3FB13E9F33296F0E5CDB406 :10F29500F03ED0D3F8DBF807D2B3F2110000CD99D8 :10F2A500F3CD99F33ED0D3F8DBF807DAEEF1CDD7FD :10F2B500F0CD10F13A2BF74F3A2AF7B9322BF72A4E :10F2C50044F73A42F7D3FAE5E1DBF8E620C2E5F286 :10F2D5003A93F0D3FB3E1DD3F8E5E1DBFCCD96F385 :10F2E5003A96F0D3F8EBE101F1F2C5E9DBF8C92173 :10F2F50000002240F7CDD7F03E0DD3F8E5E1DBFC69 :10F30500E5E1DBF8E604C0210FF4CD21F021F4F2AC :10F31500E5C392F1C5E52150F7060009E52A40F756 :10F325002299F02100002240F7CDF4F22A42F7227B :10F3350097F02101002242  - Hard Disk Error $ - SA1004 Hard Disk $ Enter CP/M drive reference (A to P) - >$ SA1400 Format Program. 08/25/81$ Only disk types 0 to 5 valid$ Valid drive references are A to P$ Ready ? (Y or N ) $ ** * WARNING! ***B; get baud from cpu switch MVI C,BAUDA ; put channel a baud in c ANI 0F0H ; mask channel b baud ORA C ; ora nibbles together and OUT 0BH ; set baud for cpu channels a,b ; MVI A,BAUDD ; baud for channel a of serial io board MVI C,BAUDC ; baud for channel b of serial io board RLC!RLC!RLC!RLC ; rotate the nibble to the upper position ORA C ; ora nibbles together and OUT 0BAH ; set baud for the serial io board. STA 3CH ; store byte in ram for future use. XRA A ;   :@!""> 2}LLLi1V!"1q*++++"@1Ҏ*J"J@:Rq>GoU{{>U>>R2Zq2 ""B==.>g &+B&":G{*"*"*"*" O ^ O@:@2: PPx=WP=:=@:2C1@:@2> 2:2~HTPUP_O  B-**** This program affects cpu clock and other users Type CTRL C to abort or CR to continue :$ The lun address is : $ Invalid lun address - Bad drive reference or wrong ver bios (xios) or bad bios lun map Re-try or use manual lun entry mode - type LLUN$ Enter SA1403 Locical Unit Number(lun = 0 to 3) :$ Function complete$W disk types 0 to 5 valid$ Valid drive references are A to P$ Ready ? (Y or N ) $ ** * WARNING! ***STA 3DH ; select printer 1 (on cpu) ; SKIPIT: MVI A,0ACH ; init 8255 OUT 7 ; cmd port ; MVI A,0FFH ; set b port high OUT 5 ; port b ; MVI E,4 ; no. of ports MVI C,LSTSTS1-2 ; first io port less 2 INIZLOOP: LXI H,INIZLST ; table MVI B,LCOUNT ; table length INR C ; point at next cmd port INR C ; OUTIR ; block move DCR E ; last sio ? JRZ EXIT ; find printer # and exicute routine JR INIZLOOP ; for that printer ; INIZLST: DB 18H ; channel reset pI***"*B~eI; *z{ za>a0:jO x2 /w"#* zŸ{:G/w"Iں)DMÑ *_**:P)P 2 7O 0(  (ͼgͼo_a{_0Q1 GiEia :2:…:2*#":@2**JR*"" pB#ú**" ~eBʗ#*}/Gog"1pF:10F06500D3073EFFD3053290F0DB06E6B0FE90C233 :10F075006EF079D304AFD30500+2FD305C986 :10F08500DB06E6B0FE903E01C8AFC900 F7 :10F095 001150F7260069197EED :10F0A500B7C2F3EFCDE7EFCD19F3CDF6EFFBC93AD4 :10F0B5002AF74F3A2CF73292F0B9C85F1600214C67 :10F0C500F719DBF97759214CF7197ED3F979322CE9 :10F0D500F7C93A2AF75F3A40F73293F047B73E004F :10F0E5003291F03E02CA09F12150F71600197EE669 :10F0F5000a4CA06F178CB3F3293F0D206F13E04B351 :10F105005F7EE603D3FD7B2FD3FCC93A93F047FE20 :10F115004DD2D8F18 DB 4 ; select wr4 DB 44H ; x 16 and 1 stop bit DB 5 ; select wr5 DB 0EAH ; dtr/, 8 bits, tx en, rts/ DB 3 ; select wr3 DB 0C1H ; 8 bits, rx en ; LCOUNT EQU $-INIZLST ; generate table length ; PTSTFLG: DB 00H ; zero for do init ff for already done ; EXIT: POP D ; restore POP B ; ; ; list status routine ; LISTST: LDA LSTNUM ; find current list number ANI 07H ; RAL ; double it LXI H,STATTBL ; point at status routine table MVI D,0 ; MOV E,A2 MEMORY TEST 11/12/80 LOCATION SHOULD BE WAS "CR" TO CONTINUE TEST "SP" TO STOP STARTING ADDRESS (HEX OR RET) ENDING ADDRESS (HEX OR RET) INPUT ERROR RETYPE- BIT STUCK TEST SHORTED BIT TEST ADDRESS LINE TEST 1 ADDRESS LINE TEST 2 RANDOM NUMBER TEST PAUSE - TYPE RET TO CONTINUE RETRY - DATA OK RANDOM NUMBER TEST IN PROGRESS DATE : TECHNICIAN : COMMENTS : RANDOM NUMBER PASSES (HEX OR RET) TEST COMPLETE 1>@2:222 2E5D5C5F53E0A3294F0DBF94F6D :10F12500B878CA5FF1D3FBDBF80FDA2CF178D3FBA3 :10F135003A34EEF61CD3F8DBFCDBF8E691CA5FF156 :10F145003A94F03DC21FF12107F4CD21F0DBF8E63A :10F1550091572164F1E5CD92F1E1F1C1D1E1C9F118 :10F16500C1D1E1C310F13E0A3295F03E88210BF280 :10F17500CD8EF2E69DC8CD14F23A95F03D3295F06C :10F18500C270F121F6F3CD21F0216BF1E57AE6802D :10F1950021A0F3C421F07AE61021A7F3C421F07A67 :10F1A500E60821B5F3C421F07AE60421BAF3C421B7 :10F1B500F07AE60121C5F3C421F021EEF3CD21F06B :10F1C500212CF4CD21F0CD7AEEFE0DCAD !WͲ |2!Ͳ8̀Ͷڳ!:_~2}!":!r_~2##~2##N#F#~2#ڳ!V#^:o&!r#s xe Yڳ!"!">2,ڳ!6Ͳ>2:2!W>2!W!,Ͳ82x?G ## 7!'*LUNn!=@lunn:A2!ܲԲO:O ~w!Ͳ2!_Ͳ:Ý͏Ɛ'@'_͆2O:2>42!Ͳ8Y³>-->,>(*>(,>-,D!:_~  ; status port serial io channel 2 LSTSTS4 EQU 0A7H ; status port serial io channel 3 LSTSTS5 EQU 06H ; status port cpu 8255 ; ; These are the data port address for the respective printers ; LSTDAT0 EQU 00H ; data port cpu 8251 LSTDAT1 EQU 0A0H ; data port serial io channel 0 LSTDAT2 EQU 0A2H ; data port serial io channel 1 LSTDAT3 EQU 0A4H ; data port serial io channel 2 LSTDAT4 EQU 0A6H ; data port serial io channel 3 LSTDAT5 EQU 04H ; data port cpu 8255 ; BAUD EQU 3CH ; ramdmME DATA!! ANI 7FH ;MASK PARITY CPI 06H ;ACK? JRZ RSTCNT ;RESET COUNT THIER BUFFER EMPTY CPI 20H ;NEW LISTING JRZ NEWLIST ;CLEAR COUNTER CHKBUF: LDA STOR ;CHAR SENT CPI 4EH ;1 LESS THAN MAX JRZ ETXOUT ;SEND FIRST ETX FOR FIRST OF 2 79 BYTE SETS CPI 0CEH ;TOP OF BUFFER JRZ ETXOUT1 ;ANOTHER ETX CPI 0CFH ;TOP OF BUFFER JRZ LISTER1 ;OVER LIMIT WAIT FOR ACK OUTDAT: MVI A,10H ; OUT LSTSTS1 ; IN LSTSTS1 ;CHECK STAT ANI 2CH ; CPI 2CH ; JR q; ;$** ;** ;** 'CP/M multi lister routine 11/20/82 ;** . (Port initialization is in CBOOT.ASM) ;** ;$** ; UPPER EQU TRUE ; true if second ser io card installed DIABLO EQU FALSE ; true if diablo driver for list 1 ; ; these are the status port address for the respective printers ; LSTSTS0 EQU 01H ; status port cpu LSTSTS1 EQU LI HHͯ :^!w:<2:0}:@E}:!S!W6: z!]6:cm!c6:_z!_6l ::,: HHҰͯ : 2ó:E:1:2v!q!*8!*6: >ͦ>ͦ!q:_  !p+q.*   !q*&!p+q*2!p+q*2!p+q*22!p+q*!p+q*!p+q*!p+q*2!p+q* |NZ OUTDAT ;STAT OK? MOV A,C OUTDAT1: OUT LSTDAT1 ; LDA STOR ; INR A ;INCREMENT BUFFER COUNT STA STOR ; RET ; ETXOUT: MVI A,80H ;FIRST CLR OF BUFFER COUNTER USED ONCE STA STOR ;AT START ONLY OR NEWLST ETXOUT1: MVI A,10H ; this is only for sio's OUT LSTSTS1 ; IN LSTSTS1 ;CHECK STAT ANI 2CH ; CPI 2CH ; JRNZ ETXOUT1 ; MVI A,03H ;SET A FOR ETX OUTPUT CALL OUTDAT1 ; JR LISTER1 ;JMP LST TO WAIT FOR ACK NEWLIST: XRA A ;CLEAR STBASE+1 ; status port base address (21h) LSTSTS2 EQU LSTSTS1+2 ; status port serial io channel 1 LSTSTS3 EQU LSTSTS1+4 ; status port serial io channel 2 LSTSTS4 EQU LSTSTS1+6 ; status port serial io channel 3 LSTSTS5 EQU 06H ; status port cpu 8255 ; LSTSTS6 EQU LISTBASE+81H ; status port upper board address (0A1h) LSTSTS7 EQU LSTSTS6+2 ; status port serial io channel 1 LSTSTS8 EQU LSTSTS6+4 ; status port serial io channel 2 LSTSTS9 EQU LSTSTS6+6 ; status port serial io channel 3 ;  r!p+q* !q*& *M *M !p+q*!!p+q*"!p+q*$!6  !kp+q*j> >ڪ Þ !qp+q/ *pDM9: :M2r:N!r !:r *r& N!r4 !6:͔: :ͳ.!ws+p+q+p+q:w=2wN *s*u w*s#"s*u#"u' !"*M^7 !x6:!xھ **DM͆ 2yʭ :yʗ ͯ *"*6:2x÷ *"!x4d !"/ !j}=2| !"*KM^'_ !z6:|!z1 * A TO 00H FOR NEW COUNT STA STOR ; JR OUTDAT ; RSTCNT: MVI A,80H ;CLR BUFFER COUNT FOR COUNT OF 80H TO CFH STA STOR ; JR LISTER1 ; STOR: DB 00 ELSE ; if diablo ; LISTER1: CALL STAT1 ; INR A ; JRNZ LISTER1 ; JR LSTOUT ; ENDIF ; if diablo ; LISTER2: CALL STAT2 ; INR A ; JRNZ LISTER2 ; JR LSTOUT ; ; LISTER3: CALL STAT3 ; INR A ; JRNZ LISTER3 ; JR LSTOUT ; ; LISTER4: CALL STAT4 ; INR A ; JR; These are the data port address for the respective printers ; LSTDAT0 EQU 00H ; data port cpu LSTDAT1 EQU LISTBASE ; data port base address (20h) LSTDAT2 EQU LSTDAT1+2 ; data port serial io channel 1 LSTDAT3 EQU LSTDAT1+4 ; data port serial io channel 2 LSTDAT4 EQU LSTDAT1+6 ; data port serial io channel 3 LSTDAT5 EQU 04H ; data port cpu 8255 (parrallel centronics) ; LSTDAT6 EQU LISTBASE+80H ; data port upper board address (0A0h) LSTDAT7 EQU LSTDAT6+2 ; data port serial io channel 1 Ll "}*}DM͆ ' ͯ *"!z4 :e !"͆ !z6:|!z '? 2*H#"H!{6:{ր!Ң *{& :{4 2!{4m *":ڹ ͯ !z4I '2!"!q: !4>!S :S! :2*M! ^#V͎ * :w*#" = = = = = ͯ  *M !6q  !6q  !6q  *& !6à  !6 à  !60à  *& !6  !6  !6  *& . 1 4 7 : = F P [ f q  @(INP:/OUT:SPACE)(INP:/OUT:SPACE)(INP:/OUT:SPACE)(INP:/OUT:SPACE)(INP:/OUT:SPACE)(INP:/OUT:SPACE)(INP:/OUT:SPACE)(INP:/OUT:SPACE)(INP:/OUT:SPACE)(INP:/OUT:SPACE)(INP:/OUT:SPACE)(INP:/OUT:SPACE)(INP:/OUT:SPACE)(INP:/OUT:SPACE)(INP:/OUT:SPACE) COPYRIGHT (C) 1979, DIGITAL RESEARCH, PIP VERS 1.5$$$ SUB =.:,<> _[]INPIRDPTRUR1UR2RDROUTLPTUL1PRNLSTPTPUP1UP2PUNTTYCRTUC1CONNULEOFDISK READ ERROR$DISK WRITE ERROR$VERIFY ERROR$NOT A CHARACTER SINK$READER STOPPING $NOT A CHARACTER SOURCE$YSTDAT8 EQU LSTDAT6+4 ; data port serial io channel 2 LSTDAT9 EQU LSTDAT6+6 ; data port serial io channel 3 ; ANIBYTE DB 85H ; CPIBYTE DB 85H ; ; LIST: MOV B,C ; save output byte LDA PRINTER ; find curent list number ANI 07H ; RAL ; double it LXI H,TABLE ; point at list rountine table MVI D,0 ; MOV E,A ; move list number into e DAD D ; MOV E,M ; INX H ; MOV D,M ; we now have the address of the data XCHG ; out rountine of the current list de` :2!q: " *M n :c4 *M n :2!c:Q !c:2: !:cw>!n !5 Y : { !6!q:!lwҙ  â :0O !q:O| :O| !6:]2l:o'2o:n'2n:m'2m*mMͣ *nMͣ *oMͣ :]:   *}2D" * * *&"!q:UY: Y:ҩ: ʩ:_2ʘ:€!6<:<2!ژ!6 >!]Ҥ; !6:Q::H: !6*M : !6!q:a/>z!ABORTED$BAD PARAMETER$INVALID USER NUMBER$RECORD TOO LONG$INVALID DIGIT$END OF FILE, CTL-Z?$CHECKSUM ERROR$CORRECT ERROR, TYPE RETURN OR CTL-Z$INVALID FORMAT$HEX$$$$NO DIRECTORY SPACE$NO FILE$COM$START NOT FOUND$QUIT NOT FOUND$CANNOT CLOSE DESTINATION FILE$DESTINATION IS R/O, DELETE (Y/N)?$**NOT DELETED**$$$$$$$NOT FOUND$COPYING -$REQUIRES CP/M 2.0 OR NEWER FOR OPERATION.$UNRECOGNIZED DESTINATION$CANNOT WRITE$INVALID PIP FORMAT$CANNOT READ$INVALID SEPARATOR$1 :2L> ̈́M9 vice MVI E,2CH ; MOV D,E ; PCHL ; do it to it ; ; this printer port is channel 'A' on the cpu ; LISTER0: CALL STAT0 ; INR A ; JRNZ LISTER0 ; MOV A,B ; OUT LSTDAT0 ; RET ; ; IF DIABLO ; ; this routine is to be used for the DIABLO 1620 printer. ; buad rate for the DIABLO is normally set to 1200 baud. ; LISTER1: MVI A,10H ; OUT LSTSTS1 ; IN LSTSTS1 ;CHECK STAT ANI 01H ;RECIEVE BIT ON? JRZ CHKBUF ;NO DATA READY IN LSTDAT1 ;SO/H:_2:!q:A/>Z!/H8: 2::=O>m:W!Q} Hmd>9>!6:2*M!E ^#V͎ڗO **~2*#"m2m͖ 2m!6m!6m!6 m2mͯ m!62m!62m!62m!62m'2:2:TҒ:2!6*ME:2::Ҳ:<22ý: 2:} >ͯ :i:2:d*M:[ 221@:2!o6+6+6!6#6!6#6:G*o .!N6:^*M^!K6!6!6+6' :$::=2K  :ʤ\:ҷ\x'Ͳ:!\͢  :͈'! Ͳ:$: $͈Ͳ!N6' :!Cwͯ !6:^͢c!6{:/>!/H{ͯ :<2Š ::=HҮͯ !6:Ҿ:2 !6::/H͈;!6:> !/>F to BAH (upper and first ser bd)l) EBAUD EQU B9600 ; left " " " " " " FBAUD EQU B1200 ; right " " " " " " ; ;*** ; IF NOT XMLDR  ORG BASE ; ; LXI SP,100H LXI H,BRLOOP ; MUST NOT BE DISTURBED MVI C,2 ; C IS SECTOR COUNTER LDED LOADADR ; WHERE TO BEGIN LOADING THIS SYSTEM EXX ; ALTERNATE PAIR LHLD SECTTK0 ; GET SECT TRK 0 IN L, SECT TRK 1 IN H LDED BSECTS ; TOTAL ; new drive outside table ? CMP C MVI A,0FFH RC LXI H,DRIVMAP MVI B,0 DAD B MOV A,M ; get lun address RET ;*** ; SELECT DISK ;PARAMETERS ; NEW DISK IN 'C' ; IF LOGGED IN BEFORE, ROUTINE WILL ; ONLY UPDATE 'NEWDISK'. DBLOCKING ; WILL MAKE THE CALL TO SELD1. ; SELD1 RESETS DENSITY IF NOT DONE ; ALREADY. ;**+ ; SELDSK: IF MLDR OR XMLDR PUSH B ne S0121: PRINT <'PRINTER # '> ; LDA S003D ; get printer # STA S0349 ; stor in local JMP S016F ; put on screen DEC$CONV: DECOUT ; RET ; S016F: LHLD S0349 ; get local printer CALL DEC$CONV ; PRINT ; RET ; ; S0186: LXI D,BAUMSG ; MVI C,09H ; CALL S0005 ; S02A1: LXI D,SELMSG ; MVI C,09H ; CALL S0005 ; CHARIN ; get choice CPI '1' ; less than 1 ? JC S02A1 ; abort CPI '9'+1 ; greater thW SECTS TO READ IN E, CODE IN D LXI B,0080H ; B = TRACK C IS A MASK EXX RBLK: MOV A,C ; C SERVES TO SET SINGLE DENSITY  iOUT BDDENS ; SELECT SINGLE DENSITY XRA A ; SELECT TRACK 0 OUT BDDATA ; TRACK TO SEEK BSEEK:  %MVI A,SEEKCMD + HEADLOAD + SEEKRATE  OUT BDCOM ; SEND COMMAND  IN WAIT ; BREAD: MOV A,C ; NOW C IS SECTOR # OUT BSECT ; MVI A,READCMD ; OUT BDCOM ; ; ; HL MAINTAINS LOOP, DE = DMA, B = SECT BRLOOP: IN WAIT ; TH ~u8;EQU TITLE 'XOR STANDARD BIOS VS 2.22 11/20/82' ; ; *** SYSTEM SIZE  *** ; ; ; MSIZE IS THE EFFECTIVE SIZE OF YOUR SYSTEM AFTER ACCOUNTING ; FOR CBIOS AND THE HOST BUFFERS. THE VALUE COMPUTED IS USED ; AS THE NUMERIC VALUE 'NN' IN YOUR MOVCPM SEQUENCE: ; ; E.G. MOVCPM NN * ; MSIZE EQU 61 ; ;*** ;**&* ; SYSTEM GENERATION EQUATES ; ;  an 9 ? JNC S02A1 ; abort ANI 0FH ; mask ascii DCR A ; rel to 0 LXI H,BAUDTABLE ; ready to convert MVI D,0 ; MOV E,A ; S02B7: DAD D ; MOV A,M ; correct binary pattern for generator STA S034A ; local storage S02EE: LXI D,PRTMSG ; now to find out which channel MVI C,09H ; CALL S0005 ; CHARIN ; S02FD: CPI 03H ; RZ ; CPI '0' ; JZ S0310 ; CPI '1' ; JZ S0326 ; CPI '2' ; JZ S0314 ; JMP S02EE  IS SPECIAL PORT WILL HANG CPU ORA A ; UNTIL DATA IS AVAILABLE JP BRDONE ; HARDWARE SET MSB WHEN INT. IS VALID ; IN BDDATA STAX D ; D IS DMA ADDRESS INX D ; POINT TO NEW PCHL ; HL POINTS TO RLOOP ; BRDONE: IN BDSTAT ORA A ; IMPORTANT WE CLEAR FLAGS JNZ ERROR ; ; EXX ; ALTERNATE DATA DCR E ; TOTAL SECTORS WERE IN E JZ ENTERSYS ; ALL SECTORS READ, GO TO O.S. DCR L ; L = SECT TRK 0, H = SECT TRK 1 JZ NXTTRK ; FIRST TRK DONE EXX ; INR C ; POI  TRUE EQU 0FFFFH ;DEFINE VALUE OF TRUE. FALSE EQU NOT TRUE ;DEFINE VALUE OF FALSE. ; DPROM EQU TRUE ;TRUE IF I.O. IS TO PROM ; MMPM EQU FALSE ;IF MP/M SET TRUE ; MLDR EQU FALSE ;IF M/PM LOADER SET TRUE XMLDR EQU FALSE ;IF M/PM LOADER W/O BOOT ; DBLOCK EQU TRUE ;TRUE FOR MULTISECTOR OPERATION F256 EQU FALSE ;TRUE FOR 256 SECTOR FLOP F512 EQU TRUE ;TRUE FOR 512 SECTOR FLOP MAXHST EQU 512D ;SIZE OF BLOCKING BUFFER ; SKEW EQU TRUE ;TRUE IF HI SPEED FLOPPY ; MAXI8 EQU TRUE  ( ; S0310: IN 0BH ; cpu baud rate switch ANI 0F0H ; mask lower MOV C,A ; LDA S034A ; get new baud ORA C ; OUT 0BH ; baud rate port RET ; S0314: LDA S003C ; get baud rate ANI 0F0H ; mask off lower nibble MOV C,A ; LDA S034A ; ANI 0FH ; ORA C ; S0320: OUT 0BAH ; port ba is baud rate gen on serial i.o. bd STA S003C ; RET ; S0326: LDA S003C ; ANI 0FH ; MOV C,A ; LDA S034A ; ANI 0F0H ; ORA C^NT TO NEXT SECTOR JMP BREAD ; GET NEXT SECTOR ; NXTTRK: ; NOTE: ALTERNATE REGS ARE IN! MOV A,D ; SUI 0DDH ; JZ SSDD ; MOV A,C ; 80H ANA D ; D HAS CODE BYTE AND MSB SET = DBL SIDED RLC ; ROTATE TO TEST BIT 8 JNC SSDD ; MSB OF 'D' NOT SET DCR B ; ONLY GO THROUGH HERE ONCE RLC!RLC ; ROTATE WITHOUT HOLDING BIT SSDD: CMA ; INVERTING BUFFERS SO CMD MUST UPSIDEDOWN OUT BSELECT ; TRACK NO. IS LOW ENUF THAT STILL ON DRIVE 0 MOV D,L ; CLEAR D INR B  ;TRUE IF STANDARD 8" FLOPPY ; MINI48 EQU TRUE ;TRUE IF MINI DISK DRIVE 48TPI MINI96 EQU TRUE ;TRUE IF MINI DISK DRIVE 96TPI ; PRIAM EQU FALSE ;TRUE IF PRIAM HARD DISK ; SHUGART EQU FALSE ;TRUE IF SHUGART 1000 SERIES HD ; QUANTUM EQU FALSE ;TRUE IF QUANTUM SERIES 2000 HD SMS10 EQU FALSE ;TRUE IF SMS 10 MEG SMS20 EQU FALSE ;TRUE IF SMS 20 MEG SMS30 EQU FALSE ;TRUE IF SMS 30 MEG SMS40 EQU FALSE ;TRUE IF SMS 40 MEG OLDQ EQU FALSE ;TRUE IF OLD SKEW ; SEKRATE EQU 00 ;00C ; JMP S0320 ; ; SELMSG: DB cr,lf,lf,'Select baud rate -> $' PRTMSG: DB cr,lf,lf,lf,'0 = CPU chan "A", 1 = left serial i.o., 2 = right serial i.o.' DB cr,lf,'Which Baud Generator ? -> $' BAUMSG: DB cr,lf DB '1 = 300 baud',cr,lf DB '2 = 600 baud',cr,lf DB '3 = 1200 baud',cr,lf DB '4 = 1800 baud',cr,lf DB '5 = 2400 baud',cr,lf DB '6 = 3600 baud',cr,lf DB '7 = 4800 baud',cr,lf DB '8 = 9600 baud',cr,lf DB '9 = 19200 baud',cr,lf DB '$' ; BAUDTABLE: DB 0000$0101B!9"1Zͯ *** SYSTEM SURVEY *** !GͯDrive>A_ͯ:\o` }~*.<~2##n&" ð>?2##~2###~#fo"#|g}o›E:ʰ~Ҽ ·#´͂ͯK bytes in!ƀ_#y͂ͯ files with*|/g}/o#͂ͯK bytes remaining $-3ͯ MEMORY MAP: 0 8 16 24 32 40 48 56 64 | x| !6#6#6–!?22~G/wp!4¿#42>:2!4#4#¬::%ͯQC = 3MS,|01 = 6MS,|02 = 10MS,|03 = 15MS ; QUME,850 |801 | | ; MINIS |  | | ; SLIMLINE EQU TRUE ;TRUE FOR SLIMLINE ; MDISK EQU FALSE ;TRUE IF MDISK ; DUAL EQU FALSE ;TRUE IF DUAL SPINDLE DRIVE (PERSCI) ; SIDE2BIT EQU FALSE ;SIDE TWO COMPARE BIT (NORMALLY OFF) ;*** ; ; ; 300 DB 0000$0110B ; 600 DB 0000$0111B ; 1200 DB 0000$1000B ; 1800 DB 0000$1010B ; 2400 DB 0000$1011B ; 3600 DB 0000$1100B ; 4800 DB 0000$1110B ; 9600 DB 0000$1111B ; 19200 ; S0338 DW 0 S0349 DW 0 S034A DW 0 ; END  = 600 baud',cr,lf DB '3 = 1200 baud',cr,lf DB '4 = 1800 baud',cr,lf DB '5 = 2400 baud',cr,lf DB '6 = 3600 baud',cr,lf DB '7 = 4800 baud',cr,lf DB '8 = 9600 baud',cr,lf DB '9 = 19200 baud',cr,lf DB '$' ; BAUDTABLE: DB 0000$0101B/ >ͯ/ͯ/:+ͯ/ͯ ¢ͯ T=TPA C=CPM M=Unassigned Memory R=ROM or Bad Memory *͂ͯ Bytes RAM *͂ͯ Bytes ROM *͂ͯ Bytes in TPA |/g}/o͂ͯ Bytes Empty ͂ͯ Total Active Bytes ACTIVE I/O PORTS !+|! z*2$_zG9Ɛ'@'_0#[ ͯ _ͯͯ ͂ͯ Ports active *ë ڎ |ą{0__ͅ~W_#>:k&{oG)???????????v^#V"; *;  ͪ  *; q#pÝn* " ! p+q* )*= ^#V"; ! 6> ! i* &*; >OK : <2 E:/ *; ^#V*% DMf KK : *; Nf E*; ~ڻWK þE *; ~SK E = ! 6:! '= :/ = : = !: = : <2 * " !" >! .  * *&͵ "( * *&͵ > j*( #"( *DM*( V"( !" (   K!" }2 : <2 O:* * * "    >! = * DM** +" *( * " Ø* #" *&0F7850074 :01F795000073 :02FC160016FCDA :10F76B00CA79F71163EE2169EE010600EDB021278E :10F77B00F8CD1FF03A26F83CCA90F73E03323D0015 :10F78B003EFF3226F83A7F0021DBF8E620FE20CC44 :10F79B001FF03A7F002155F8FEDDCA20F8FE10CA93 :10F7AB00CFF72164F8CD1FF02180F83A7F00E603F4 :10F7BB00B7CACFF73C214BF8110200193DC2C6F76F :10F7CB005E2356EBCD1FF021C5F8CD1FF021D3F8EA :10F7DB003A7F00E640C2E6F721D7F8CD1FF021E6CD :10F7EB00F83A7F00E620C2FCF73A7F00E608C41F18 :10F7FB00F03A0400212B00BD3A0400Cy1)2Q3(4P O:L  CO:L :R 1I2IӺ:S <:CO:L 1 _PʐBʼSoTA`â Printer ? $ *0w`>2S ͬ2S ` $ ` __ $   !>*< $>:9&0,9.0e"< ! ~# Qj!"P __?Ñ PARALLEL Status Bits $r ü1 X 0 1 X# = Good Status $ W B O  $ A U N $ *( * " 3*1 #" " " *5 " > # R : B * +" ! +s#r( ! 6: " * ~2 * #" * +" > ʶ : 2 Ғ * +" : <2 O>ҳ ! 6* #" * ~2 p K* DMf = * *% DMf = * *% DMf = *( #"( K*# DMf = * *% DMf = : AOK :K . g S -A >>!  ~?l W >#^ : /!:' —  ʑ #‹  W ʢ #™ i`N#FogDM!>))덑o|g =¼ DM!>)) = ^#V) ^#V|g}o s20AF8AF0610 :10F80B000F21B4EFBECA18F82B05C20FF87832A43B :10F81B00EF320400C9CD1FF0C3FCF7000D0A5820CE :10F82B004F205220202043502F4D205665727320BD :10F83B003631206F662030332E33312E3832200094 :10F84B0055F864F891F8A2F8B3F8205374616E641C :10F85B0061726420312E34202620322E3220636FC9 :10F86B006D70617469626C65206469726563746F35 :10F87B0072790D0A003132382062797465732F73F7 :10F88B006563746F72003235362062797465732F3D :10F89B00736563746F7200353132206279746573EE :10F8AB002F736563746F7200313032342062797458 :10FI S L  $ 1T Y N . $ O8251 Status Bits $< z1 X] 1 X 1 = Good Status $Z ×D S F O P T R T $ ôS Y E E E x x x $ R E R R $ SIO Status Bits $ X X 1 X 1 1 X X = Good Status $ 7B T C S D T I R $% TR x T y T x n x $B rK U S n R R t R $_ é  pStatus Byte for printer $} *0~0_ $ !** }o0  a _{ozgO{ozgi`N#Fogo&og_{_z#W OK = Y -S {-_ ! s+p+q*  ͼ 2 <2 : ! ڗ  K ! 4Á ! 6: =! ڻ * & NK ! 4œ >3  03} Z; { ) #   k   Hit SPACEName Ext Bytes UN At | File(s), occupying K of K total capacity directory entries and K bytes remain on 1 !9" ! J> # ->! . *ͪe> # < * v K  K  K !B r+s+p+qA ?  p*A *? :]$Ž l]Q !]6 !E 6!C 6 :C *C &l ~2D U¼:E 2 :D S:E 2:D F:E 2:D V:E 2:D P:E 2 :D N2E ! $  >ʱ`!"P !2***P +}"P _W Printer not Ready $C  j>& Select baud rate -> $ 0 = CPU chan "A" 1 = left brg, 2 = right brg on serial board addressed 3AH 3 = left brg, 4 = right brg on serial board addressed BAH Which Baud Rate Generator ? -> $ 1 = 300 baud 2 = 600 baud 3 = 1200 baud 4 = 1800 baud 5 = 2400 baud 6 = 3600 baud 7 = 4800 baud 8 = 9600 baud 9 = 19200 baud $ "P" = Select new Printer "B" = Select new Baud Rate   ë «   Ͷ ͐ =« f xY |« }ҫ gA>S Ag}S S i |« }!w s#r:[ʔ _!~ʦ ![4ç \͢¦ 2[ 7 >?  e͢!g"c> _͢a_!f~> 5*c~#"c 0  k C 4Ø:!4:!5(  ! I3= : [= t:\a:\=_: :] t ?]\ : ҃! 6?Î : 2   ]Q  ?\\ : DM, Q ! "= *3 ##)*= "; */ &# "! *3 #"#  !! "% >!1 . 2' \: 2 : ʩ: ƀo&"* ~ʛ*# +"# ** DMY қ** DM  *; q#p* " . ** #DM*; -e**  *; w* #" )*= *; s#r*; "; : 2 !S 6!"V * "n >!S d*S &T ) ^#V"K O!l ^#V"M :S =2S M K  a*K "G *  "T" = Manual output mode (Characters sent from keyboard, ESC terminates) "A" = Auto output mode (String sent until space bar hit) "S" = Display printer status byte "P","B","T","A" or "S" ? $ 0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrIstuvwxyz !@#$%^&*()_-+=~`|\:;"<,>?/ PRINT TEST PASS NUMBER 00  DMʡڏ"=ʡͲ=ʡYPͲ1**!O~4#~#F#x~#s#r#w>͐ « f f  . ᯕo>g.{T switc al outpu t th paralle por o temporar basi yo ca se byt i memor a EE33 t 01H Thi ca b don wit DD o BASI wit "POKE instruction Thi memor cel i th firs byt afte th en o th bio jum tabl an ca b calculate fo differen syste size b pickin u th war boo entr addres a memor locatio an 2 an addin 30H to that address. (30H = 48 decimal) secon method whic i permanan fo th dis tha th chang waM "I *K  )*= ^#V"O I G  *G )*= N#F*O ? J*G #"G (*I )*= ^#V*O DM? m*I +"I JI G  *G )*= ^#V"Q *I )*= *G )*= N#Fq#p*I )*= *Q s#r*G #"G *I +"I K I  G M   !M G  :S <2S O!T *G s#r*S &l ) *M s#r*I "M ^I K  X:S <2S O!T *K s#r*S &l ) *I s#r*G "K û!" "    #* #" )*= * #" )*= N#Fq#p   * )*= * ) *= ^#VN#F? H * #" )*= ^#V";  *; ^#V" * )*= XA10060C020BAD :10F6D500DD013300040F00EE005F00C000200002D2 :10F6E500002C19333300010000800N0900554 :10F6F5003300040F00E2017F00C000200002002C4F :10F705001933330001000080001A01400099 :10F71500051F0397007F008000200002002C194080 :10F725001000200302000280ABF69A054000051F79 :10F735000132017F008000200002002C19401000DA :10F74500200302000280ABF6E5021A00030700F26F :10F75500003F00C000100002002C191A1A00010019 :10F7650000800 014 :10F7750084 :1#1 : X O R Printer control utility Vers. 1.1 11/20/82$ ~ Command forms; PRINTER , PRINTER {p}, PRINTER {b}$E Û, PRINTER {p},{b}$  Where p = desired printer $ and b = re-set baud rate -OR- $  "T" to test print $ *0"N !]~##F I_BʬT`x_T`B̬XPRINTER # $M 2J ÕÑ t |k{0__k*J hã $ 4 p  C1ڴ:Ҵ=!? _~2L  2R *N 0÷:S:QHI:N<22: H@"2Í202O> c!6Í202O> ڍ*&O*& !sc*&P :w:·>!ұͯ :22:_!6=!6>'!E!4!p+q*0 !r+s+p+q*~$7*>*>H&>*#"*#"> 2:R͎:!6!6=2:ʙ!6:“H9Ž>!6-e!6ͻ2=2ʺ-é:>>"ͻ2:!!5ͻ2ͬ!\/---  PIN 1  CHANNEL B U12  PIN 2  CHANNEL A U12  PIN 3  CHANNEL B U11  PIN 4  CHANNEL A U11  --  1 HEADER PIN NUMBER | 8116- CHANNEL AND LOCATION  --  PIN 12 CHANNEL 1 U18  PIN 13 CHANNile that matches your hardware configuration (where XXX = the operating system acronym. STD=floppy system without blocking/deblocking, BLK=floppy system with blocking/deblocking, DTC=10 MByte Shugart hard disk with DTC controller, 1MS/2MS/4MS=10/20/40 MByte Quantum hard disk, respectively, with SMS controller, PRI=Priam hard disk system). Edit the XXXSYS60.SUB file, replacing the STDLST.ASM with CXLST.ASM. Now run "SUBMIT XXXSYS60.SUB" to build the new operating w-:>>!p+q:,!6*DM9:<!6:z 2W!6D*&L :w:<2Ov*:>=20O> ڒ:0:AO>Ҥ::A }}Hͬ!wͻO`idͻV[2O>2:!X!6:!:=O!L NE!4 E E:/.*&L 6$L9k9.Xͯ *KM^020 :020:121'ͳ':²ͯ !G6!"!"7 *M^n/ :a/:H!6:ͯ !&6`EL 2 U18 The 8116 can be programmed to a variety of BAUD rates (from 50 BAUD to 19200 BAUD). There should be no problem in meeting the necessary BAUD rate required by your printer. When changing the the BAUD rates you will be asked which channel you wish to change BAUD rate on. Channel 0 is pin 3 of the 8116 which is connected to pin 12 of the BAUD rate select header, channel 1 is pin 17 of the 8116 which is connected to the pin 13 of the BAUD rate select header. system. When it is complete, run the DSYSGEN program to put the new operating system onto the system tracks of your disk. Reset the system and boot up your disk with the new operating system. How to change from one printer to another: There is a utility called PRINTER.COM. This program will perform several functions: 1) Report the printer you are presently logged onto. 2) Change logged printer from one printer to another. 3) Change the BAUD rate on the2*">!b!ͯ >!`0ͯ !q:E:24J!46*}a!44EJ *KM^'́:‚ͯ !36'n::0:f9OY#9.3'ͳ.:020' 'ͳ'7 6'!j>A+!s!"@͓1!"<**"͓n "Dn"":!Q2҂:X!Wғä:ڤ*MEÓ:ұ@@:O2Mc;!6#6>!)*&P ~"::H:H'MSG2S: DB 'PROM MONITOR',0AH,0DH IF SIO DB 'VERS 186' ENDIF IF I8251 DB 'VERS 185' ENDIF DB 0AH,0DH,'$' ; CONIN: IN CONPORT ANI RxMASK JZ CONIN IN DATA ANI 7FH RET CONOUT: IN CONPORT ANI TxMASK JZ CONOUT MOV A,C OUT DATA RET ; CONSTAT: IN CONPORT ANI RxMASK MVI A,0 RZ CMA RET ; LIST: IF SIO MVI A,10H ; RESET EXT/STATUS INTERRUPTS OUT LSTSTAT NOP ; DELAY FOR STATUS TO BE UPDATED NOP ; MORE DELAY ENDIF IN LSTSTAT ANI LISTMASK  SERIAL I/O BOARD. 4) Allow manual or automatic testing of printer. 5 Examin an displa por statu byt o scree t b sur handshaking is working correctly. .PA B typin "PRINTER" th progra wil displa t th scree th printe numbe yo ar presentl logge onto B typin "PRINTE X ( bein th printe number) th syste wil b logge ont printe X B typin "PRINTE B" men wil b displaye o th screen Thi men display va:H:H"!6!4:_jYO jM*"S*" 3@bl*M1͓!""7 *M^͆ \͔!":͎H*#"ͧÝ/ :>͛9ͯ .*#":_!' !'6!36' :1/!aE*#">z?C9IͲÁ.!6> !ڇ*&' ~2 ʀ: y.*M!4Q>!қ:=2á:2:Ҭ\>!ҿ:=2K:2K!:!:K\: \!p+q͈* *M:>!(:=2%> >>!F!5+N! ~2!4<2T>>!b}*bMͭz:b2!b6:<2é>!`ҥ*`MͭҞ!`6!6> :é:(!q:!wO! ~2*& :w>!:!4!6>:N<2N!> *N& N2 !p+q!6!6+6 !6: S: M!6g8:N2M*M8p!6!6!6>!ڕ*&P 6!4z!6!6#6#6!6*M8:ھ:*͇g2ê::¿::,͡A<2O> riou BAU rate an thei correspondin numbe codes Th progra ask yo t inpu th numbe cod fo th BAU rat yo wis t select Whe thi numbe ha bee entered yo wil b aske o whic channe o th 811 yo wis th BAU rat t b change ( channe o th CPU channe o th 811 o th optiona seria I.O card channe o th sam board. Whe yo hav type i th channe number yo wil b se t ru you pri DM!  ::=H-\:N2O_og_{ozg^#V))) _{ozg^#V) d^#V|g}o n_{ozgO{ozgi`N#Fogo&og H ©=¨'' !'6!36' :1/!aE*#">z?C9IͲÁ.!6> !ڇ*&' ~2 ʀ: y.*M!4Q>!қ:=2á:2:Ҭ\>!ҿ:=2K:2K!:!:K\: \!p+q͈* *M8):[ͱ!N5!6ñ:5!6#6>!ڰ!6:<2O>/:!O!T *M͡H~K:¡!6[–ͱ!N5:2:2!4=:[¼ͱ4:!6:.2O8: :* ͇g:[ ͱ!N5!6:%:<2*6 * 6å!q!6> !d*&I :]>!4A>:<2O* :w:?†!6!q!6?!:ҠgÐ!q*&*~!6:22: :]Hں:A2O>: 2ͯ  ,nter Yo ma als chang bot th BAUĠ rat an th selecte printe b typin "PRINTE X,B**#* ; ; END OF FLOPPY DRIVERS ; ;!*** ; PAGE MSG: DB 0DH,0AH,'boot ' ERRMSG: DB 'error' CRLFMS: DB 0DH,0AH,0 RDMSG: DB 0DH,0AH,'Read ',0 WTMSG: DB 0DH,0AH,'Write ',0 SKMSG: DB 0DH,0AH,'Seek ',0 HEMSG: DB 0DH,0AH,'Home ',0 NNMSG: DB 0DH,0AH,'No disk in drive...' READYMSG: DB 0DZH,0AH,'Hit space bar to retry, to reboot, ' DB 'any other key to continue ',0 ;**H,MDSIZE ; MOV E,A ; MVI D,0 ; DAD D ; LXI D,BANKS ; LXI B,3 ; LDIR ; LXI H,SXMSG ; CALL PMSG ; ENDIF ; if mdisk FINIS4: LDA CDISK ; LXI H,BRLOOP ; boot read loop adr CMP L ; lower byte occupies 4 LDA CDISK ; JNZ FIN5 ; no match, is a hd XRA A ; always flop a FIN5: ; if not flop, hd will be at cdisk MVI B,15 ; LXI H,DRIVMAP+15 ; UNMAP: CMP M ; JZ UNMAPPED ; DCX H ; DCR B ; JNZ UNMAP ; UNMAPPEDL PMSG ; mophadyte orphan JMP FINIS4 ; BOOT3: CPI 10H ; JZ PDDMSG ; LXI H,DD128N ; 2.2 msg CALL PMSG ; LXI H,DD128 ; LDA 7FH ; re-get code byte ANI 03H ;MASK UPPER ORA A ; 0? JZ PDDMSG ; INR A ; LXI H,DENMSG ; LXI D,2 ; LOOP: ; DAD D ; DCR A ; JNZ LOOP ; MOV E,M ; INX H ; MOV D,M ;PTR IN D&E XCHG ;NOW IN H&L PDDMSG: ; CALL PMSG ;PRINT THE DENSITY LXI H,DSMSG ; point at ds msg. PSSDS: ; ^PDFOCO ^2 Please put a BLANK disk in drive "B", then press RETURN ^^1 B: DFORMAT B: SIZE 512 DCOPY A: TO B: SIZE 512 ^2 Replace disk in drive "A" with another SOURCE disk. (ctrl 'C' to exit) ^^1 $  CALL PMSG ; print single or double sided LXI H,MINIMSG ; LDA 07FH ; ANI 0100$0000B ; is it a mini JNZ PMINI ; LXI H,STDMSG ; PMINI: ; CALL PMSG ; IF MDISK LXI H,2 ; test location LXI D,MMSG ; MVI C,8 ; MVI A,1 ; start with bank 1 OUT 8 ; CHKMDISK: DCR C ; JRZ FILLBN0 ; LDAX D ; CMP M ; JRNZ FILLBN2 ; INX H ; INX D ; JR CHKMDISK ; FILLBN0: LDA 1 ; banks STA BANKS ; JMP BNKEND0 ; FILLBN2:  ;DENSITY FLAG POINTER MOV M,A ;UPDATE DFLAGS WITH DENSITY POP H ;GET DISK HEADER VECTOR PUSH H ;SAVE IT FOR RETURN MOV M,C INX H MOV M,B ;SET UP TRANSLATE TABLE ADDRESS LXI B,9 ;POINT TO PARM BLOCK DAD B MOV M,E ;SET UP ADDRESS INX H MOV M,D POP H ;RETURN SEL. DISK. HDR. VECTOR POP B RET ; ; find a match for the density flag , leave pointer pointing at flag. ; default at single sided single density. therefore single sided single density ; must be the last bl XRA A ; FILLBN4: OUT 8 ; set the address MVI M,055H ; bits INR A ; next bank CPI 9 ; wrote to all ? JC FILLBN4 ; XRA A ; bank 0 again TESTBN: STA BANKS ; higest bank address in system OUT 8 ; set the address MVI M,0AAH ; other bits INR A ; next bank OUT 8 ; set address MOV A,M ; if bank is there this is a 55h CPI 055H ; JNZ BANKEND ; CMA ; make an 0aah MOV M,A ; MOV A,M ; make sure its real memory CPI 0AAH ; by testing forock in the list of tables. ; GETBLOCK: LXI D,TBLEND-TBLSTART ; length of one block + flag and GETBLOCK1: ; internal code MOV A,M ; get test match CPI SD128 ; end of table ? RZ CMP C ; match RZ DAD D ; point to next table JMP GETBLOCK1 ; look again ; ; software delay routine HDELAY: LXI D,8000 ;5555=25 MS DELAY AT 4MZ SDELAY: DCX D MOV A,D ORA E JNZ SDELAY RET ; CBIOS MESSAGES ; NRMSG: DB 'ready ',0 RNMSG: DB 'id not found ',0 CRCMSG: DB 'crc ',0 LDMi cma of 55h JNZ BANKEND ; LDA BANKS ; try next bank INR A ; JMP TESTBN ; BANKEND: LDA BANKS ; ORA A ; JZ BNKEND0 ; no banks MVI A,1 ; OUT 8 ; LXI H,0 ; LXI B,32 ; MVI E,0 ; JR FILLOOP2 ; FILLOOP: SBCD FILLOOP4 ; creates no-ops MVI E,0E5H ; LXI B,2048-32 ; FILLOOP2: MOV M,E ; INX H ; DCX B ; MOV A,C ; ORA B ; JRNZ FILLOOP2 ; FILLOOP4: JR FILLOOP ; LXI H,0 ; MVI M,0FH ; user 15 I ř; ;**J ; ; COLD BOOT LOADER (IN SAME AREA AS FREE STORAGE) ; 12/20/82 ;** ; VERSNUM:DW 0 DIRBF: DS 128 IF DBLOCK HSTBUF: DS MAXHST ENDIF ; IF NOT MDISK ENDSYS: EQU $ ;TO MAKE ASSEMBLER HAPPY ENDSYS1: DW ENDSYS ENDIF ; ORG DIRBF ; OLDPROM: DW PROM+18H ; DW PROM+6 ; DW PROM+9 ; ; BOOT1;: ; CPI 1 ; JRZ BOOT4 ; early "net" proms MOV SG: DB 'lost data ',0 BSYMSG: DB 'busy ',0 WPMSG: DB 'protect ',0 WFMSG: DB 'flt ',0 DFMSG: DB 0DH,0AH,'Track Error',0 BTMSG: DB 0DH,0AH,'boot ' ERRMSG: DB 'error' CRLFMS: DB 0DH,0AH,0 RDMSG: DB 0DH,0AH,'Read ',0 WTMSG: DB 0DH,0AH,'Write ',0 SKMSG: DB 0DH,0AH,'Seek ',0 HEMSG: DB 0DH,0AH,'Home ',0 NNMSG: DB 0DH,0AH,'No disk in drive...' READYMSG: DB 0DH,0AH,'Hit space bar to retry, to reboot, ' DB 'any other key to continue ',0 ;** NX H ; LDA BANKS ; MOV M,A ; INX H ; LXI D,MMSG ; XCHG ; LXI B,7 ; LDIR ; MVI A,20H ; STAX D ; INX D ; STAX D ; INX D ; STAX D ; BNKEND0: LDA BANKS ; INR A ; MOV C,A ; MOV B,A ; XRA A ; OUT 8 ; BNKEND1: DCR C ; JRZ BNKEND2 ; ADI 24 ; JR BNKEND1 ; BNKEND2: DCR A ; STA DSKSIZ ; XRA A ; BNKEND3: DCR B ; JRZ BNKEND4 ; ADI 3 ; JR BNKEND3 ; BNKEND4: LXI  1e8 XOR DATA SCIENCE DSYSGEN VERS. 2.25 12/20/82 $ 2e2e2er SYSTEM SOURCE FILE ON DISK? (Y/N) $M _YʂNʘ ʘJõ CONSTRUCT FILE? (Y/N) $ _YN ØCOMHEX DRIVE and NAME OF CPMXX.COM$ ͗!e~Z! $ [eg]W DRIVE and NAME OF BOOT + BIOS.HEX$3 ͗!e'[v $s 0>2e͗~Z[eg]0!\  s# ž!hs# « DRIVE...$ _ AP2e >_×  FI  DB 4 ; select wr4 DB 44H ; x 16 and 1 stop bit DB 5 ; select wr5 DB 0EAH ; dtr/, 8 bits, tx en, rts/ DB 3 ; select wr3 DB 0C1H ; 8 bits, rx en ; LCOUNT EQU $-INIZLST ; generate table length ; ; signon messages ; SMSG: DB 0DH,0AH,'XOR DATA SCIENCE CP/M Vers ' DB MSIZE/10+'0',MSIZE MOD 10 + '0' DB ' of 12.20.82 ',0 ; MDSIZE: DB ' 0' DB ' 48' DB ' 96' DB '144' DB '192' DB '240' DB '288' DB '336' DB '384' DENMSG: DW DD128O DW DD128N DW DD256 DW   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $  LE NAME...$ e>];~9a2{2 w# 7!eÒ6# > w# N aW .vw# a7yʁ# | w# ƒe!\F:e2\ø Reading file...$ !`"ee!c]>2e\ Q\2dA2eOvP]!c ]\ >[]2e[Y!d ] !a"ee####N:e ڷ} SYSTEM TOO LARGE FOR SYSTEM TRACKS - (CR), REBOOT$I Þ SPACE, TRY ANYWAY $  ~2eʷ+++*eV+^*z R SYSTEM SIZE $ |\}\ LOAD ADDRE oDD512 DW DD1024 DD128O: DB ' Standard 1.4 &' DD128N: DB ' 2.2 compatible directory',0DH,0AH,0 DD128: DB '128 bytes/sector',0 DD256: DB '256 bytes/sector',0 DD512: DB '512 bytes/sector',0 DD1024: DB '1024 bytes/sector',0 DSMSG: DB ' double sided',0 MINIMSG:DB ' 5"',0 STDMSG: DB ' 8"',0 PRIAMSG:DB ' Hard disk',0 SXMSG: DB ' (' BANKS: DB 0,0,0 MMSG: DB 'k MDISK)',0 IF MDISK ENDSYS: EQU $ ENDIF DW ENDSYS ; do not remove, used by dsysgen ;    $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   SS $ [z z\{\/ LAST ADDRESS $ *eV+^|\}\\ BIOS JMP TBL $K *x |\}\w $t ø PROGRAM CHECK SHOWS LAST ADDRESS ABOVE FFFFH$  SPACE TO GO ON, (CR) TO REBOOT$  }}|O:e2e>2e+~_2 ##~2| :e2~ 2e#~2} {ʤ{ ʤ ʏ{%r:~ Aj<Ͷ2~ ä>2~ ä:~ 4ڇͶ2~ ä>42~ ä{ʤO:eͶG:| 2~ ]>2e[Y!YNx!d]\ AH9!Xd]*eR} SE, INACTVATE BUFFER JZ NOWRITE XRA A STA HSTWRT ;BUFF WILL NOT CONTAIN WRITE DATA STA UNACNT LDA NEWDISK STA UNADSK LDA BUFDSK CALL SELOK CALL AWRITE LDA UNADSK ;WANT UNADSK TO KNOW WE'VE CHANGED DRIVES STA NEWDISK MOV C,A MVI A,0FFH STA UNADSK MOV A,C CALL SELOK NOWRITE: LHLD TRK ;SET UP FOR 128 BYTE DISK I.O. SHLD HSTTRK LHLD SECT SHLD HSTSEC LHLD DMAADD SHLD HSTDMA LDA READOP ORA A JNZ AREAD JMP AWRITE ; IF SKEW BLKTRANS: ; de has sector t : MOV A,B ; STA BOOTDISK ; STA CDISK ; in case of flop, set cdisk to 0 ; ; Following routines initialize printer ports ; DOINIT: LDA CPUBAUD ; is 0 ? MOV C,A ; save ORA A ; test IN 0BH ; get switch setting JZ DI10 ; ANI 0F0H ; mask switch setting for baud rate ORA C ; DI10: OUT 0BH ; set baud for cpu channels a,b ; LDA SBAUDL ; serial board baud setting (lower) OUT 03AH ; set baud LDA SBAUDU ; serial board baud setting (upper) OUT 0BAH ; $l&-  |{0__!vd ]AF\A2dAOvP!d]\ >[]!]]*e ] 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $  o translate LHLD TRK ; MOV A,L ; ORA H ; RZ ; no trk 0's are skewed DCX H ; MOV A,L ; ORA H ; RZ ; or trk 1's MOV A,C ; ANI MINIBIT ; 0100$0000b JZ SKIP2 ; DCX H ; MOV A,L ; minis use 0,1,2 for system ORA H ; so no skew on them neither RZ ; SKIP2: ; LHLD TRANSTBL ; some other trk DAD D ; MOV E,M ; DCX D ; make rel 0 RET ; ENDIF ; ;** ;* * ;  set baud ; CALL CONST ; get vers MVI A,4 ; CMP H ; s-100-8 ? JZ LINIT4 ; skip 8255 init if true, s100-8 uses par port CMP L ; for keyboard input. early proms put vers in JZ LINIT4 ; backwards ie 84.4 for 4.84 ; MVI A,0ACH ; init 8255 OUT 7 ; cmd port ; MVI A,0FFH ; set b port high OUT 5 ; port b ; LINIT4: MOV A,L ; lower version ANI 0F0H ; mask code type CPI 90H ; new "C" cpu ? JNZ LINIT6 ; MVI A,2CH ; STA ANIBYTE ; STA CPIBYTE   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $  R8* LOCAL DATA STORAGE FOR BLK - DEBLOCK * ;* * ;** ; ; TEMP1: DS 2 ;TEMP TEMP2: DS 2 ;TEMP TEMP3: DS 2 ;TEMP ; SECVEC: DB 00 SEKHST: DW 0000 ;SEEK SHR SECSHF ; UNADSK: DB 00 ;LAST UNALLOC DISK UNATRK: DW 0000 ;LAST UNALLOC TRACK UNASEC: DW 0000 ;LAST UNALLOC SECTOR BUFDSK: DB 00 ; qRSFLAG: DB 00 ;READ SECTOR FLAG READOP: DB 00 ;1 IF READ OPERATION WRTYPE: DB 00 ;WRITE OPERATION TYPE ; ;** ; LINIT6: MVI E,4 ; no. of ports MVI C,LISTBASE-1 ; first io status port less 2 INIZLOOP: LXI H,INIZLST ; table MVI B,LCOUNT ; table length INR C ; point at next cmd port INR C ; OUTIR ; block move DCR E ; last sio ? JNZ INIZLOOP ; go back for more INLINE: MVI E,4 ; MVI C,(LISTBASE-1)+80H ; upper serial io port MVI A,0C9H ; Z-80 "ret" instruction STA INLINE ; don't come back here JR INIZLOOP ; do it one more time ; INIZLST: DB 18H ; channel reset   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   NI AND SKEW MASK, MINI 10H, SKEW 04H TRANSTBL: DW 0000 ;ADDRESS OF TRANSLATE TABLE ; HSTACT: DB 00 ;HOST ACTIVE UNACNT: DB 00 ;UNALLOCATED COUNT HSTWRT: DB 00 ;HOST WRITTEN HSTTRK: DW 0000 ;DBLOCK TRACK HSTSEC: DW 0000 ;DBLOCK SECTOR HSTDMA: DW 0000 ;DBLOCK DMA ; TRK: DB 00,00 ;CURRENTLY SELECTED TRACK. SECT: DB 00,00 ;CURRENTLY SELECTED SECTOR. DMAADD: DB 00,00 ;CURRENT READ/WRITE ADDRESS. TRTAB: DB 00,00,00,00 ;TRACK TABLE FOR FLOP DFLAGS: DB 00,00,00,00 ;DENSITY AND LO W CHK05,ALL05 ; DISK PARAMETER HEADER FOR lun 6 DW 0001H,0000H ; sectran = 0001 = use skew DW 0000H,0000H DW DIRBF,HDPRIAMBK DW CHK06,ALL06 ENDIF IF SHUGART ; ; hard disk disk parameter headers ; disk parameter header for lun 4 DW 0000H,0000H ; sectran = 0001 = use skew DW 0000H,0000H DW DIRBF,HDSHUGARTBK DW CHK04,ALL04 ENDIF IF QUANTUM ; ; hard disk disk parameter headers ; disk parameter header for lun 4 DW 0000H,0000H ; sectran = 0001 = use skew DW 0000H,0000H   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $    $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   DW DIRBF,HDQUANTUMBK DW CHK04,ALL04 ; DISK PARAMETER HEADER FOR lun 5 DW 0000H,0000H ; sectran = 0001 = use skew DW 0000H,0000H DW DIRBF,HDQUANTUMBK DW CHK05,ALL05 ; DISK PARAMETER HEADER FOR lun 6 DW 0000H,0000H ; sectran = 0001 = use skew DW 0000H,0000H DW DIRBF,HDQUANTUMBK DW CHK06,ALL06 ; DISK PARAMETER HEADER FOR lun 7 DW 0000H,0000H ; sectran = 0001 = use skew DW 0000H,0000H DW DIRBF,HDQUANTUMBK DW CHK07,ALL07 ENDIF ; SINGLE DENSITY SECTOR TRANSLATE VECTOR   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $    $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $  a TRANS: DB 1,7,13,19 ;SECTORS 1,2,3,4 DB 25,5,11,17 ;SECTORS 5,6,7,8 DB 23,3,9,15 ;SECTORS 9,10,11,12 DB 21,2,8,14 ;SECTORS 13,14,15,16 DB 20,26,6,12 ;SECTORS 17,18,19,20 DB 18,24,4,10 ;SECTORS 21,22,23,24 DB 16,22 ;SECTORS 25,26 IF SKEW ; skew TRANS5: DB 1,4,7,10,13,16,3,6,9,12,15,2,5,8,11,14 TRANS5M: DB 1,6,2,7,3,8,4,9,5,10 IF OLDQ TRANSQ: DB 1,7,13,3,8,14,4,9,15,5,10,16,6,12,2,11 ELSE TRANSQ: DB 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 ENDIF ; if oldq   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $    $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $  [ ENDIF ; if skew ; ;*** ;* MINISKEW is used by deblocking to determine whether disk ;* is skewed or not and how many tracks to consider unskewed ;* for the operating system. (8" = 2, Mini = 3) ;* 0100$0000 = MINI 0000$1000 = SKEWED DISK ;* 1000$0000 = SKEW AFTER DBLOCK (SAVES TABLE SPACE) ;** * ; ; ; ** ; ; COM hPIP A:BLKSYS61.ASM=A:BLKEQU61.ASM,IO.ASM,CXLST.ASM,FLOP.ASM,BLK.ASM,DATA.ASM,XBOOT.ASM MACRO BLKSYS61  CBOOT ASM*GBLK ASMB  BLKSYS61$$$ BLKSYS61HEXHuvDATA ASM,/Dw|DSYSGEN COMKIQT^SURVEY COMHELP COMHELP HLP5 !MAC HLP="#ALGOLM HLPb$%&'ASM HLP(   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $  MON DATA AREA ; ; ** ; ; SCRATCH RAM AREA FOR BDOS USE ; ; COMDATA: ; CURDISK: DB 00 NEWDISK: DB 00 OLDISK: DB 00 LASTFLOP: DB 00 SECTK0: DB 00 SECTK1: DB 00 SECCOUNT: DB 00 WBSPT: DW 0000 ; CPMSPT: DB 00 DSKSPT: DW 0000 ;CPM SECTORS/BLOCK HSTBLS: DB 00 ;CPM SECTORS/TRACK SECMSK: DB 00 ;SECTOR MAPPING MASK SECSHF: DB 00 ;SECTOR SELECTION MASK BYTSEC: DW 0000 ;SECTOR SIZE IN BYTES MINISKEW DB 00 ;MI EADER FOR DISK 02 DW TRANS,0000H DW 0000H,0000H DW DIRBF,DPSD1XBK DW CHK02,ALL02 ; DISK PARAMETER HEADER FOR DISK 03 DW TRANS,0000H DW 0000H,0000H DW DIRBF,DPSD1XBK DW CHK03,ALL03 ; IF PRIAM ; ; hard disk disk parameter headers ; disk parameter header for lun 4 DW 0001H,0000H ; sectran = 0001 = use skew DW 0000H,0000H DW DIRBF,HDPRIAMBK DW CHK04,ALL04 ; DISK PARAMETER HEADER FOR lun 5 DW 0001H,0000H ; sectran = 0001 = use skew DW 0000H,0000H DW DIRBF,HDPRIAMBK D   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $    $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $  " ; test LASTFLOP & newdisk UPDATETRK: ; skip if LASTFLOP = newdisk LDA NEWDISK ; purpose of routine is to update track MOV C,A ; register only, head will be done by LDA LASTFLOP ; select STA NRDISK ; for not ready CMP C RZ ; SAME RETURN ; ; GO SELECT AND UPDATE LASTFLOP IF DUAL ;IF DUAL DRIVE, ANI 0FEH ;CLEAR OUT BIT 0. ENDIF ; MOV E,A ; put current disk in D & E MVI D,0 LXI H,TRTAB ;GET ADDRESS OF TRACK TABLE. DAD D ;ADD DISK NO. TO ADDRESS. IN T   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $    $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $  "RACK ;READ 1791 TRACK REGISTER. MOV M,A ;PUT INTO TABLE. ; IF DUAL ;IF A DUAL DRIVE, ANI 0FEH ;CLEAR BIT 0. ENDIF ; MOV E,C ;PUT NEW DISK NO. IN D&E. LXI H,TRTAB ;GET ADDRESS OF TRACK TABLE. DAD D ;ADD DISK NO. TO ADDRESS. MOV A,M ;GET NEW TRACK NUMBER. OUT TRACK ;PUT INTO 1791 TRACK REG. ; MOV A,C ;GET NEW DISK NUMBER. STA LASTFLOP ;UPDATE RET ; SELECT: LDA NEWDISK ; SELECT1: MOV E,A ; ADI 41H ; STA DRIVE ; ; IF DBLOCK ; ;   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $    $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   LDA HSTTRK ;SAVE DESTINATION TRACK. ELSE ; LDA TRK ; ENDIF ; ; STA SEKTRK ; in case not ds MOV B,A ; ORA A ; MVI A,0 ; in case we do not select side 1 STA SIDE1 ; MVI A,2 ;SET UP FOR SINGLE DENS JZ SINGLD ;IF TK 0 THEN SINGLE LXI H,DFLAGS ;FIND DENSITY MVI D,0 ; DAD D ;NOW POINTING TO DENS MOV A,M ; ANI DSBIT ; get double sided bit and clear carry JZ NOT$DS ; if single sided skip MOV A,B ; get track # SRLR A ; put lsb ;flop ;**5 ; ; BEGINNING OF FLOPPY DRIVERS ; 12/20/82 ;** ; ; DISK IO PORTS ; FLOPPY EQU 3 ;MAX NO. OF FLOPPY DISK EQU 0F8H ;DISK BASE ADDRESS. DCOM EQU DISK ;DISK COMMAND PORT. DSTAT EQU DISK ;DISK STATUS PORT. TRACK EQU DISK+1 ;DISK TRACK PORT. SECTP EQU DISK+2 ;DISK SECTOR PORT. DDATA EHQU DISK+3 ;DISK DATA PORT. WAIT EQU DISK+4 ;DISK WAIT PORT. DSEL E   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $  in carry, also devide trk by 2, msb = 0 STA SEKTRK ; now seek will not seek if dbl sided JNC NOTDS ; MVI A,DSBIT ; tack head 1 bit onto drive number ORA E ; MOV E,A ; ; ; IF SIDE2BIT ; MVI A,02H ; for 1795 side 2 test STA SIDE1 ; in case anyone else needs to know we MOV C,A ; are on back side LDA CMDBKT ; ORA C ; set side bit onto r/w command STA CMDBKT ; ENDIF ; NOT$DS: ; MOV A,M ; get density ANI 3 ; strip dsbit SINGLD: ; QU WAIT+1 ;DENSITY SELECT DCONT EQU DISK+4 ;DISK CONTROL PORT. ; SD128 EQU 0E5H DSBIT EQU 0000$0100B RTCNT EQU 10 ; SIDE1 DB 00 NRDISK DB 00 SEKTRK DB 00 SERCNT DB 00 ERCNT DB 00 CMDBKT DB 00 TEMPSEC DW 0000H TEMPTRK DW 0000H TEMPDMA DW 0000H ; ; SUBSTITUTE JUMP TABLES FOR HARD OR FLOPPY DISKS ; IF PRIAM or SHUGART or QUANTUM FDJT: JMP READ JMP WRITE ENDIF ; ;!**1 FSELECT: ; has floppy density been logged in   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $  h OUT DSEL ;SELECT DENSITY MOV A,E ; CMA ; OUT DCONT ; set head bit RET ; SEEK ROUTINE ; ; PARAMETERS ; TRACK IN 'SEKTRK' DONE IN SELECT RTN ; SEEK: LDA SEKTRK ; MOV B,A ; PUSH H ;SAVE H&L. PUSH D ;SAVE D&E. PUSH B ;SAVE B&C. PUSH PSW ; MVI A,RTCNT ;GET RETRY COUNT. SRETRY: STA SERCNT ;STORE IN ERROR COUNTER. IN TRACK ;READ PRESENT TRACK NO. MOV C,A ;SAVE IN C. CMP B ;SAME AS NEW TRACK NO.? MOV A,B ;RESTORE A FROM B. JZ THER  ? LXI D,DFLAGS ;USE FLAG NOT CLEARED AS LOGGED MVI H,0 MOV L,C DAD D ;POINT TO THIS DRIVE MOV A,M ORA A ;IF ZERO, NOT LOGGED JNZ MOVPARMS ;IF LOGGED, JUST SELECT IT CALL BLDPTR ;POINT TO HEADER CALL DENSITY ;FIND DENSITY ORA A ;MAY BE DISK ERROR JNZ FSELERR ;DRIVE SELECT ERROR CALL SETBPM ;ALL DONE, SO RET THRU SETBPM RET FSELERR: LXI H,0 ; RET ; ; ; delayed select for floppy drives only ; note: LASTFLOP is updated here instead of in SELDSK ; ;   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $  , [ ENDIF ; if skew ; ;*** ;* MINISKEW is used by deblocking to determine whether disk ;* is skewed or not and how many tracks to consider unskewed ;* for the operating system. (8" = 2, Mini = 3) ;* 0100$0000 = MINI 0000$1000 = SKEWED DISK ;* 1000$0000 = SKEW AFTER DBLOCK (SAVES TABLE SPACE) ;** * ; ; ; ** ; ; COM ;DATA ;**; ; ; COMMON TABLES AND DATA AREAS ; 12/20/82 ;** ; ; FIXED DATA TABLES FOR FOUR-DRIVE SYSTEM ; ; floppy disk parameter headers ; DISK PARAMETER HEADER FOR DISK 00 DPBASE: DW TRANS,0000H DW 0000H,0000H DW DIRBF,DPSD1XBK DW CHK00,ALL00 ; DISK PARAMETER HEADER FOR DISK 01 DW TRANS,0000H DFW 0000H,0000H DW DIRBF,DPSD1XBK DW CHK01,ALL01 ; DISK PARAMETER H ** ; COMMONBASE: ; JMP COLDSTART ; SWTUSER: ; JMP $-$ ; SWTSYS: ; JMP $-$ ; PDISP: ; JMP $-$ ; XDOS: ; JMP $-$ ; SYSDAT: ; DW $-$ ; ; COLDSTART: ; WARMSTART: ; MVI C,0 ; JMP XDOS ; ; ENDIF ; ; **,* ;* ;* DISK DRIVE PARAMETER TABLES ;* ; **.* ; ; cp/m 1.4 double density 128 byte/secto MON DATA AREA ; ; ** ; ; SCRATCH RAM AREA FOR BDOS USE ; ; COMDATA: ; CURDISK: DB 00 NEWDISK: DB 00 OLDISK: DB 00 LASTFLOP: DB 00 SECTK0: DB 00 SECTK1: DB 00 SECCOUNT: DB 00 WBSPT: DW 0000 ; CPMSPT: DB 00 DSKSPT: DW 0000 ;CPM SECTORS/BLOCK HSTBLS: DB 00 ;CPM SECTORS/TRACK SECMSK: DB 00 ;SECTOR MAPPING MASK SECSHF: DB 00 ;SECTOR SELECTION MASK BYTSEC: DW 0000 ;SECTOR SIZE IN BYTES MINISKEW DB 00 ;MI EADER FOR DISK 02 DW TRANS,0000H DW 0000H,0000H DW DIRBF,DPSD1XBK DW CHK02,ALL02 ; DISK PARAMETER HEADER FOR DISK 03 DW TRANS,0000H DW 0000H,0000H DW DIRBF,DPSD1XBK DW CHK03,ALL03 ; IF PRIAM ; ; hard disk disk parameter headers ; disk parameter header for lun 4 DW 0001H,0000H ; sectran = 0001 = use skew DW 0000H,0000H DW DIRBF,HDPRIAMBK DW CHK04,ALL04 ; DISK PARAMETER HEADER FOR lun 5 DW 0001H,0000H ; sectran = 0001 = use skew DW 0000H,0000H DW DIRBF,HDPRIAMBK D r single sided disk prameters ; PARAMTBL: ; IF MAXI8 IF MDISK DB 0FDH ; flag DB 0000$0001B ; internal code DW 64 ;SECTORS PER TRACK - SPT DB 4 ;BLOCK SHIFT FACTOR - BSH DB 15 ;BLOCK MASK - BLM DB 1 ;EXTENT MASK DSKSIZ: DW 23 ;DISK SIZE IN BLOCKS - DSM DW 63 ;DIRECTORY MAX ENTRIES - DLM DB 128 ;DIR. ALLOC. MASK - AL0 DB 0 ;DIR. ALLOC. MASK - AL1 DW 0 ;DIR. CHECK SIZE - CKS DW 0 ;TRACK OFFSET - OFF DB NSECTS ; ccp + bdos length in sectors DB 64 ; nu NI AND SKEW MASK, MINI 10H, SKEW 04H TRANSTBL: DW 0000 ;ADDRESS OF TRANSLATE TABLE ; HSTACT: DB 00 ;HOST ACTIVE UNACNT: DB 00 ;UNALLOCATED COUNT HSTWRT: DB 00 ;HOST WRITTEN HSTTRK: DW 0000 ;DBLOCK TRACK HSTSEC: DW 0000 ;DBLOCK SECTOR HSTDMA: DW 0000 ;DBLOCK DMA ; TRK: DB 00,00 ;CURRENTLY SELECTED TRACK. SECT: DB 00,00 ;CURRENTLY SELECTED SECTOR. DMAADD: DB 00,00 ;CURRENT READ/WRITE ADDRESS. TRTAB: DB 00,00,00,00 ;TRACK TABLE FOR FLOP DFLAGS: DB 00,00,00,00 ;DENSITY AND LO W CHK05,ALL05 ; DISK PARAMETER HEADER FOR lun 6 DW 0001H,0000H ; sectran = 0001 = use skew DW 0000H,0000H DW DIRBF,HDPRIAMBK DW CHK06,ALL06 ENDIF IF SHUGART ; ; hard disk disk parameter headers ; disk parameter header for lun 4 DW 0000H,0000H ; sectran = 0001 = use skew DW 0000H,0000H DW DIRBF,HDSHUGARTBK DW CHK04,ALL04 ENDIF IF QUANTUM ; ; hard disk disk parameter headers ; disk parameter header for lun 4 DW 0000H,0000H ; sectran = 0001 = use skew DW 0000H,0000H  mber of sectors on track 0 +1 DB 64 ; number of sectors on track 1 +1 DW 64 DB 2048/128 ; cpm block size/cpm sector size DB 128/128-1 ; disk sector size/cpm sector size DB 0 ; logical to phisical sector map (1 = 2 phys sec.) DW 128 ; bytes per sector DB 00,00,00 ; ENDIF DB 0DDH ; flag DB 0000$0001B ; internal code DPDD1NBK: ;2D/128 1.4 CP/M DISK PARAMETER BLOCK DW 51 ;SECTORS PER TRACK - SPT DB 4 ;BLOCK SHIFT FACTOR - BSH DB 15 ;BLOCK MASK - BLM DB 0 ;E ]GIN TABLE ; IF MINI48 OR MINI96 OR MAXI8 ALL00: DS 64 ;ALLOCATION VECTOR 0 ALL01: DS 64 ;ALLOCATION VECTOR 1 IF PRIAM OR SHUGART OR QUANTUM ALL02: DS 0 ;ALLOCATION VECTOR 2 IF MDISK ALL03: DS 64 ELSE ALL03: DS 0 ;ALLOCATION VECTOR 3 ENDIF ELSE ALL02: DS 64 ALL03: DS 64 ENDIF CHK00: DS 64 ;CHECK VECTOR 0 CHK01: DS 64 ;CHECK VECTOR 1 IF PRIAM OR SHUGART OR QUANTUM CHK02: DS 0 ;CHECK VECTOR 2 CHK03: DS 0 ;CHECK VECTOR 3 ELSE CHK02: DS 64 CHK03: DS 64  DW DIRBF,HDQUANTUMBK DW CHK04,ALL04 ; DISK PARAMETER HEADER FOR lun 5 DW 0000H,0000H ; sectran = 0001 = use skew DW 0000H,0000H DW DIRBF,HDQUANTUMBK DW CHK05,ALL05 ; DISK PARAMETER HEADER FOR lun 6 DW 0000H,0000H ; sectran = 0001 = use skew DW 0000H,0000H DW DIRBF,HDQUANTUMBK DW CHK06,ALL06 ; DISK PARAMETER HEADER FOR lun 7 DW 0000H,0000H ; sectran = 0001 = use skew DW 0000H,0000H DW DIRBF,HDQUANTUMBK DW CHK07,ALL07 ENDIF ; SINGLE DENSITY SECTOR TRANSLATE VECTOR 6XTENT MASK DW 238 ;DISK SIZE IN BLOCKS - DSM DW 95 ;DIRECTORY MAX ENTRIES - DLM DB 0C0H ;DIR. ALLOC. MASK - AL0 DB 0 ;DIR. ALLOC. MASK - AL1 DW 32 ;DIR. CHECK SIZE - CKS DW 2 ;TRACK OFFSET - OFF DB NSECTS ; ccp + bdos length in sectors DB 25 ; number of sectors on track 0 +1 DB 51 ; number of sectors on track 1 +1 DW 51 DB 1024/128 ; cpm block size/cpm sector size DB 128/128-1 ; disk sector size/cpm sector size DB 0 ; logical to phisical sector map (1 = 2 phy Y ENDIF ENDIF IF PRIAM OR QUANTUM OR SHUGART ALL04: DS 256 ; hard disk allocation vector ENDIF IF SMS10 OR SHUGART ALL05: DS 0 ALL06: DS 0 ALL07: DS 0 ENDIF IF SMS20 ALL05: DS 256 ALL06: DS 0 ALL07: DS 0 ENDIF IF SMS30 OR PRIAM ALL05: DS 256 ALL06: DS 256 ALL07: DS 0 ENDIF IF SMS40 ALL05: DS 256 ; hard disk allocation vector ALL06: DS 256 ; hard disk allocation vector ALL07: DS 256 ENDIF IF PRIAM OR SHUGART OR QUANTUM CHK04: DS 0 ; no check vecto a TRANS: DB 1,7,13,19 ;SECTORS 1,2,3,4 DB 25,5,11,17 ;SECTORS 5,6,7,8 DB 23,3,9,15 ;SECTORS 9,10,11,12 DB 21,2,8,14 ;SECTORS 13,14,15,16 DB 20,26,6,12 ;SECTORS 17,18,19,20 DB 18,24,4,10 ;SECTORS 21,22,23,24 DB 16,22 ;SECTORS 25,26 IF SKEW ; skew TRANS5: DB 1,4,7,10,13,16,3,6,9,12,15,2,5,8,11,14 TRANS5M: DB 1,6,2,7,3,8,4,9,5,10 IF OLDQ TRANSQ: DB 1,7,13,3,8,14,4,9,15,5,10,16,6,12,2,11 ELSE TRANSQ: DB 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 ENDIF ; if oldq s sec.) DW 128 ; bytes per sector DB 00,00,00 ; ; cp/m 2.2 double density 128 byte/sector double sided disk prameters ; IF DBLOCK IF F256 ; cp/m 2.2 256 byte per sector double density ; DB 11H ; flag DB 0000$0001B ; internal code DPDS2XBK: DW 52 ;26 - 256 BYTE SECTORS/TRACK - SPT DB 4 ;BLOCK SHIFT FACTOR - BSH DB 15 ;BLOCK MASK - BLM DB 1 ;EXTENT MASK DW 245 ;DISK SIZE IN BLOCKS - DSM DW 127 ;DIRECTORY MAX ENTRIES - DRM DB 0C0H ;DIR. ALLOC. MASK - A +Grs for hard disk CHK05: DS 0 CHK06: DS 0 CHK07: DS 0 ENDIF ;**0* ;* ;* COMMON SRATCH AREA FOR BIOS USE ;* ;**p* ; ; SCRATCH RAM AREA FOR BDOS USE ; ENDCOMDATA EQU $ COMLENGTH EQU ENDCOMDATA-COMDATA ; IF MMPM ; ;$**+ ;* ;* COMMON BASE M / P M 2 . 1 ;* ;**  512 DB QSKEWBIT ; miniskew mask DW TRANS5 ; translate table ; ; cp/m 2.2 512 byte sector double density, double sided SKEW ; DB 9AH ; code byte DB 0000$0101B ; internal code DPDD5XBKSK: DW 64 ;16 - 512 BYTE SECTORS/TRACK DB 5 ; DB 31 ; DB 1 ;EXTENT MASK DW 303 ; DW 127 ; DB 80H ; DB 0 ; DW 32 ; DW 2 ; DB NSECTS ; nsects to read on a re-boot DB 25 ; 128 type sects tk 0 DB 64 ; 512 type sects tk 1 DW 16 ; physical sect NSURE CARRY=0 RAR ;SHIFT RIGHT DCR B ;SEE IF DONE JNZ RWSTST ;YES, SAVE IT RWSKST: MOV E,A ;HOST SECTOR TO SEEK ; IF SKEW MOV A,C ; ANI QSKEWBIT ; CNZ BLKTRANS ; ENDIF ; INX D ; SDED SEKHST ; ; ; ACTIVE HOST SECTOR? ; LXI H,HSTACT ;HOST ACTIVE FLAG MOV A,M MVI M,1 ;ALWAYS BECOMES 1 ORA A ;WAS IT ALREADY? JZ FILHST ;FILL HOST IF NOT ; ; SAME DISK? LDA NEWDISK LXI H,OLDISK CMP M JNZ NOMATCH ;NOT THE SAME ; SAME TRACK? LHLD HS  devide cpm sector by this ammount. ; BLREAD: ;READ THE SELECTED CP/M SECTOR MVI A,01H STA READOP LDA BYTSEC CPI 128 JZ NOBLK XRA A ; needed by dsbc LXI H,0 LDED TRK DSBC DE JNZ BL1 ; not on trk 0 IF PRIAM or SHUGART or QUANTUM LDA MINISKEW ; is this a hard disk ANI HDBIT ; hards are 0,1,2,3,4 JNZ BL1 ; only have this problem on warmboot ENDIF JMP NOBLK ; is flop on tk 0 so treat as 128 BL1: XRA A ;FORCE A PRE-READ STA UNACNT ; MVI A,1 STA RSFLAG /s trk 1 DB 4096/128 ; cpm block size/cpm sector size DB 512/128-1 ; disk sector size/cpm sector size DB 2 ; logical to physical sector map (1 = 2 phys sec.) DW 512 ; bytes per sect DB QSKEWBIT ; miniskew mask DW TRANS5 ; translate table ENDIF ; f512 ENDIF ; skew ENDIF ; dblock ENDIF ; maxi8 IF MINI48 ; cp/m double density 128 byte/sector single sided mini drive 48 TPI ; DB 050H ; flag DB 0000$0001B ; internal code DPSD1MBK: ;1D/128 DISK PARAMETER B 4L0 DB 0 ;DIR. ALLOC. MASK - AL1 DW 32 ;DIR. CHECK SIZE - CKS DW 2 ;TRACK OFFSET - OFF DB NSECTS ;CPM SYSTEM SIZE (FOR WMBOOT) DB 25 ;number of sectors on trk 0 DB 52 ;number of sectors on trk 1 DW 26 ; physical sects trk 1 DB 2048/128 ; cpm block size/cpm sector size DB 256/128-1 ; disk sector size/cpm sector size DB 1 ; logical to phisical sector map (1 = 2 phys sec.) DW 256 ; bytes per sector DB 0000$0000B ; miniskew mask DW 0000 ; address of transl D ;MUST READ DATA MVI A,WRUAL STA WRTYPE ;TREAT AS UNALLOC JMP RWOPER ;TO PERFORM THE READ ; BLWRT: ;WRITE THE SELECTED CP/M SECTOR XRA A STA READOP ; LDA BYTSEC CPI 128 JZ NOBLK XRA A LXI H,0 LDED TRK DSBC DE JNZ BLW1 ;TRK 0 SPCL CASE IF PRIAM or SHUGART or QUANTUM LDA MINISKEW ANI HDBIT JNZ BLW1 ENDIF JMP NOBLK BLW1: MOV A,C ;WRITE TYPE IN C STA WRTYPE CPI WRUAL ;WRITE UNALLOCATED? JNZ CHKUNA ;CHECK FOR UNALLOC ; ; WRITE TO UNALLOCATED, S mLOCK - MINI DW 30 ;SECTORS PER TRACK DB 3 ;BLOCK SHIFT FACTOR DB 7 ;BLOCK MASK DB 0 ;NULL MASK DW 137 ;DISK SIZE-1 DW 63 ;DIRECTORY MAX DB 192 ;ALLOC 0 DB 0 ;ALLOC 1 DW 16 ;CHECK SIZE DW 3 ;TRACK OFFSET DB NSECTS ; ccp + bdos length in sectors DB 17 ; number of sectors on track 0 DB 30 ; number of sectors on track 1 DW 30 DB 1024/128 ; cpm block size/cpm sector size DB 128/128-1 ; disk sector size/cpm sector size DB 0 ; logical to phisical sect 5ate table ; cp/m 2.2 256 byte per sector double density DOUBLE SIDED ; DB 91H ; flag DB 0000$0101B ; internal code DPDDDS2XBK: DW 52 ;26 - 256 BYTE SECTORS/TRACK - SPT DB 4 ;BLOCK SHIFT FACTOR - BSH DB 15 ;BLOCK MASK - BLM DB 0 ;EXTENT MASK DW 495 ;DISK SIZE IN BLOCKS - DSM DW 127 ;DIRECTORY MAX ENTRIES - DRM DB 0C0H ;DIR. ALLOC. MASK - AL0 DB 0 ;DIR. ALLOC. MASK - AL1 DW 32 ;DIR. CHECK SIZE - CKS DW 2 ;TRACK OFFSET - OFF DB NSECTS ;CPM SYST bET PARAMETERS LDA HSTBLS ;SECTORS/ALLOCATED BLOCK STA UNACNT LDA NEWDISK ;DISK TO SEEK STA UNADSK LHLD TRK SHLD UNATRK ;UNATRK = SECTRK LHLD SECT SHLD UNASEC ;UNASEC = SECT ; CHKUNA: ; ; ANY RECORDS LEFT IN THIS BLOCK? LDA UNACNT ORA A JZ ALLOC ;NOT 0, MUST BE SOME MORE DCR A STA UNACNT ; ; CHECK TO SEE IF SAME DRIVE, TRACK, SECTOR LDA NEWDISK ;SAME DISK? LXI H,UNADSK CMP M JNZ ALLOC ;NO ; ; DRIVE IS THE SAME LHLD UNATRK LDED TRK DSBC DE JNZ ALLOC ;S or map (1 = 2 phys sec.) DW 128 ; bytes per sector DB 00,00,00 ; ; cp/m double density 128 byte/sector double sided mini drive 48 TPI ; DB 0D0H ; flag DB 0000$0101B ; internal code DPDD1MBK: ;1D/128 DISK PARAMETER BLOCK - MINI DW 30 ;SECTORS PER TRACK DB 4 ;BLOCK SHIFT FACTOR DB 15 ;BLOCK MASK DB 1 ;NULL MASK DW 143 ;DISK SIZE-1 DW 63 ;DIRECTORY MAX DB 128 ;ALLOC 0 DB 0 ;ALLOC 1 DW 16 ;CHECK SIZE DW 3 ;TRACK OFFSET DB NSECTS ; ccp + bdos length EM SIZE (FOR WMBOOT) DB 25 ;number of sectors on trk 0 DB 52 ;number of sectors on trk 1 DW 26 ; physical sects trk 1 DB 2048/128 ; cpm block size/cpm sector size DB 256/128-1 ; disk sector size/cpm sector size DB 1 ; logical to phisical sector map (1 = 2 phys sec.) DW 256 ; bytes per sector DB 0000$0000B ; miniskew mask DW 0000 ; address of translate table ENDIF ; f256 IF SKEW IF F512 ; ; cp/m 2.2 512 byte sector double density ; DB 1AH ; code byte KKIP IF NOT ; ; TRACKS ARE THE SAME LHLD UNASEC ;SAME SECTOR? LDED SECT DSBC DE ;SECT = UNASEC? JNZ ALLOC ;SKIP IF NOT ; ; MATCH, MOVE TO NEXT SECTOR FOR FUTURE REF INX D ;UNASEC = UNASEC+1 SDED UNASEC LDA CPMSPT CMP E JNZ NOOVF LXI H,1 SHLD UNASEC LHLD UNATRK INX H SHLD UNATRK ; NOOVF: XRA A ;0 TO ACCUMULATOR STA RSFLAG ;RSFLAG = 0 JMP RWOPER ;TO PERFORM THE WRITE ; ALLOC: ;NOT AN UNALLOCATED RECORD, REQUIRES PRE-READ XRA A ;0 TO ACCUM STA UNACNT ; 4;BLK ; **J* ; * * ; * BLOCKING - DEBLOCKING DRIVERS * ; * 11/20/82 * ; *** ; WRALL EQU 0 ;WRITE TO ALLOCATED WRDIR EQU 1 ;WRITE TO DIRECTORY WRUAL EQU 2 ;WRITE TO UNALLOCATED ; MINIBIT EQU 0100$0000B SKEWBIT EQU 0000$1000B QSKEWBIT EQU 1000$0000B HDBIT EQU 0010$0000B ; ;MEANING OF LABELS: ; ; RSFLAG = commoOn R/W routine will READ if rsflag is 1, write if 0. ; UNACNT = if cpm block si N DB 0000$0001B ; internal code DPDS5XBKSK: DW 64 ;16 - 512 BYTE SECTORS/TRACK DB 5 ; DB 31 ; DB 3 ;EXTENT MASK DW 149 ; DW 127 ; DB 128 ; DB 0 ; DW 32 ; DW 2 ; DB NSECTS ;CP/M BLK SIZE DB 25 ; 128 type sects on tk 0 DB 64 ; 128 type sects on tk 1 DW 16 ; physical sect trk 1 DB 4096/128 ; cpm block size/cpm sector size DB 512/128-1 ; disk sector size/cpm sector size DB 2 ; logical to physical sector map (1 = 2 phys sec.) DW UNACNT = 0 INR A ;1 TO ACCUM STA RSFLAG ;RSFLAG = 1 ; ;* ;* COMMON CODE FOR READ AND WRITE FOLLOWS ;* RWOPER: ;ENTER HERE TO PERFORM THE READ/WRITE LDA SECSHF ;SHIFT FACTOR MOV B,A ; LDED SECT ; DCX D ; make relative 0 ; IF SKEW ; LDA MINISKEW ; if disk is skewed and a mini MOV C,A ; trks 1,2 are not skewed ANI SKEWBIT ; 0000$1000B CNZ BLKTRANS ; ENDIF ; ; LDA SECMSK ; ANA E ; STA SECVEC ; MOV A,E ; RWSTST: ORA A ;I ze (i.e. 2048) has not been written to (there- ; fore "unallocated") unacnt has remaining sectors in block. ; UNADSK = drive that current hstbuf contents belong to. ; UNATRK = track that current hstbuf contents belong to. ; UNASEC = current (or) next sector in block. ; HSTACT = if set, there is R/W data in hstbuf. ; HSTWRT = if set, data in hstbuf is to be sent to drive ; SEKMSK = mask for lower 1,2, or 3 bits of cpm sector. points to cor- ; rect cell in hstbuf for this sector ; SECSHF = must> O!b q!vz͒q.?*!9"8"͉Z*" +*'/7?v"*2:EI SPHLDI XCHGPCHLXTHLRET HLT CMC STC CMA DAA RAR RAL RRC RLC NOP CPI ORI XRI ANI SBI IN SUI OUT ACI ADI CALLJMP LDA STA LHLDSHLDMOV ADD ADC SUB SBB AN>.>+.INX DAD LDAXDCX :=_!"!" "!\" ͶO^}# \~$y!>" Ͷ1(2( Pʿ@OͶ^(O+!" (O(! !\" *~#">2!"\**D.DAT $TYPE  !í 1 8CA0CF2D3EE :10F1D600FBDBF80FDAD7F178D3FB3A37EEF61CD320 :10F1E600F8DBFCE3E3DBF8E691CA0CF23A38F13DD2 :10F1F600C2CAF121B5F4CD1AF0DBF8E69157211118 :10F20600F2E5CD3FF2E1F1C1D1E1C9F1C1D1E1C3EE :10F21600C0F13E0A3239F13E8821BFF2CD42F3E613 :10F226009DC8CDC8F23A39F13D3239F1C21DF221FD :10F23600A4F4CD1AF02118F2E57AE6102155F4C4AB :10F246001AF07AE6082163F4C41AF07AE604216813 :10F25600F4C41AF07AE6012173F4C41AF0219CF47E :10F26600CD1AF021D6F4CD1AF0CDA5EEFE0DCA7C4E :10F27600F2FE20C8E1C93AA5EF32040032D4F7AF56 :10F b00E7E700F32247EEED7354EED4 :10EE40003166EEAFD309CD0000F53E01D309F1EDF7 :06EE50007B54EEC9000036 :10EE660006F809F80CF82A66EECD38EEC93AE7F747 :10EE7600B7CAA2EEAF32E7F73AE9F7B73E0032E992 :10EE8600F732E8F7CAA2EE3AD4F73246F73A4BF72A :10EE9600CDD8EFCD30F03A46F732D4F7AFD3FC2ACF :10EEA60068EE3ABCEE4FCD38EEFEFFC03ABCEE2F10 :10EEB60032BCEEC3A5EE00792A6AEECD38EEC93132 :10EEC6007C00AFD3FCAFD3092100003CCD18F8F588 :10EED6003E01D309F1CD6DFBCD08F03EC3320000F3 :10EEE6003205002103EE2201002106E02206002160 :10EEF600 ͓ !" >- Ͷ Aګ ҫ _!7^#V~  \p Z z ů2[\͓͢ ҫ ͐ =« f " ͓ ҫ ͐ ʻf " =ʻf "=« ý> 2͐ f "]=f =« *]}o"_  *]"a. ~ #E }"]*a 6 *]}#|#*]E ͐ « f f f {zA|« W}d ͐ f f f DMʡڏ"=ʡͲ=ʡYPͲ1**!O~4#~#F#x~#s#r#w>͐ « f f  . ᯕo>g.2860032E7F7C300001100003ED0D3F8E3E3E312 :10F29600E3DBF8E680C81B7BB2C28FF221C5F4CD52 :10F2A6001AF0CDA5EEFE20CA8CF23A36F132D4F72A :10F2B600320400CD85F1C30000DBFCB7F0DBFB12A6 :10F2C60013E957E610C2D1F27AB7C93EC4D3F8DBC8 :10F2D600FCDBFB47DBFCB7F2E5F2DBFBC3DAF2DB78 :10F2E600F8B7CAF1F2CD97F3C3F4F278D3F9CDC0EB :10F2F600F17AB7C93E0A3239F13EA82139F3CD4237 :10F30600F3E6FD210000C8CDC8F23A39F13D3239A5 :10F31600F1C2FFF221ACF4CD1AF07AE6402179F47D :10F32600C41AF07AE6202182F4C41AF021FAF2E532 :10F33600C33FF2DBFCB7800022EEF73A04004FC300D83AE7F7B78E :10EF0600CA19EF3AE9F7B7CA19EF3A4BF7CDD8EF76 :10EF1600CD30F0318000213DF7110000011200CD07 :10EF260011F0CD08F03AA5EF4FCDC4EF110A001944 :10EF3600223AEF2A0000110F001956235E237E3273 :10EF4600D8F70102002100D822F4F77832F0F779D9 :10EF560032F2F7E5D5C5CD27F0C1D1E115CAE1EE0C :10EF6600D51180001922F4F7D10C1DC251EF3AD801 :10EF7600F75F0E0104C351EF010000ED43F0F7C93E :10EF8600ED43F2F7C9ED43F4F7C9A6EFEB7CB509FB :10EF9600CAA2EFFE01CAA4EF6E2600C923C9C900A2 :10EFA60000010203FFFFFFFFF 2|2\$ !]w# ʫ .&  0 6 #& .K !e K w# ʫ : U 6 #K 6AW w#] !e~H#~E#~X*}|́ "!́ ͐ !ʬ =« f kʫ j \͢F w# ͋ t ʫ : W& _& & O {a. ~ #E }"]*a 6 *]}#|#*]E ͐ « f f f {zA|« W}d ͐ f f f DMʡڏ"=ʡͲ=ʡYPͲ1**!O~4#~#F#x~#s#r#w>͐ « f f  . ᯕo>g.!!DI"]!]~ (w#x2=G!~$ww#x2=4l No data file present error $J Û Utility progam aid of 10/14/81$z  Program load address --- $ !|Ɛ'@'_} $ !"" *"*1 !""D!6" >2 !M" !"!`">2 *~O#" !" !"!l"*}y q#"}s1#!C:= _!6!C*6!CRl!C!Rl{>2  Data file over-runs top of RAM, re:FFF61 :10EFB6003E0FB93EFFD821A6EF0600097EC9F3CD64 :10EFC600B6EF210000FEFFC2D8EF3AA5EF320400EB :10EFD600FBC94F32D4F74FC341F1692600292929CD :10EFE60029114FF719C9CDE0EFC5E5110A00195EE1 :10EFF6002356EB1111001911DCF7010B00EDB0E1FE :10F00600C1C921D3F7110000012B0273230B79B07C :10F01600C8C311F07EB7C84FE5CD0CEEE123C31A85 :10F02600F0C31BF5C349F5C318F2C3FAF28585414F :10F036003A33EEE607172121F116005F195E2356D3 :10F04600EB1E2C53E9CDC3F03C20FA78D300C9CD92 :10F05600E1F03C20FA1836CDE5F03C20FA182ECD2AEF1FE2034 :10F1D500C8E1C921C9F3CD21F03AACEF32040032C0 :10F1E5001AF7AF322DF7C300002107F4CD21F0CD7A :10F1F5007AEEFE20CA96F23A92F0321AF7320400FD :10F20500CDDAF0C30000DBFCB7F0DBFB1213E957E6 :10F21500E610C21DF27AB7C93EC4D3F8DBFCDBFBAE :10F2250047DBFCB7F231F2DBFBC326F2DBF8B7CAEA :10F235003DF2CDE4F2C340F278D3F9CD10F17AB7BF :10F24500C93E0A3295F03EA82185F2CD8EF2E6FD43 :10F25500210000C8CD14F23A95F03D3295F0C24B2D :10F26500F221EEF3CD21F07AE64021BBF3C421F083 :10F275007AE62021C4F3C421F02146F2E5C392F1D8 :10F28booting...$ [*D:<*3!1 |P}P~O+#Ch\Ɛ'@'O+SÒ x |o{0O+o Cmd buffer --- End buffer --- Cmd length --- Max ---  ͓Q!ͷ͓Q͌Q!.ͷ6y#G͙Qà!2ͷQ͓͌Q!>ͷq eg͙Q:zJEËC–EQyQxQRQ** {zҷ*~#" <AOGƐ'@'OxƐ'@'ON# E :10F06600E9F03C20FA1826CDEDF03C20FA181ECD2A :10F07600FDF03C20FA1816CD01F13C20FA180ECD11 :10F0860005F13C20FA1806CD09F13C20FA0DED41B8 :10F09600C9DB06E6B0FE90C297F078D304AFD3057D :10F0A600000000002FD305C93A33EEE60717210DFD :10F0B600F116005F195E2356EB1E2C53E93A33F026 :10F0C6005F3A34F057FE2CDB0120080E013E10EDAE :10F0D60079ED786FA3BA3EFFC8AFC90E2118EE0EC0 :10F0E6002318EA0E2518E60E2718E2DB066FE6B0AF :10F0F600FE903EFFC82FC90EA118D20EA318CE0E41 :10F10600A518CA0EA718C6C3F0E1F0E5F0E9F0EDC0 :10F11600F0F1F0500DBFCB7F01AD3FB13E9F33296F0E5CDB406 :10F29500F03ED0D3F8DBF807DAEEF1CDD7F0CD109C :10F2A500F13A1BF74F3A1AF7B9321BF7C486F32A1E :10F2B50034F73A32F7D3FAE5E1DBF8E620C2D5F2C6 :10F2C5003A93F0D3FB3E1DD3F8E5E1DBFCCD86F3A5 :10F2D5003A96F0D3F8EBE101E1F2C5E9DBF8C92193 :10F2E50000002230F7CDD7F03E0DD3F8E5E1DBFC89 :10F2F500E5E1DBF8E604C021FFF3CD21F021E4F2DE :10F30500E5C392F1C5E52140F7060009E52A30F786 :10F315002299F02100002230F7CDE4F22A32F722BB :10F3250097F02101002232F72A34F7229BF021CAF7 :10F33500FA2234F7CD6BF1^z8O!B N#N ¾SP.* |} !9":q!"2F!e~ =F)\a:n!"4g1!~:‚*͛1}*͊@Gʨұ Ҩ*~#Â~#  #~:ʹÂ*~͕#~n͊_ ~#)\*)"~ a b#O##͊:=2An}͕͊> > >2!͕>A2}l~:} :}<2}>.> Oî"~͕O~: :Gc JpMESSAGE. LXI H,READ ; return from common error messages ; to the read routine for retry PUSH H ; ** COMMON ERROR PRINT SUBOUTINE  ** ; ERMSG1: MOV A,D ;GET ERROR BITS. ANI 10H ;IF BIT 4 IS HIGH, LXI H,RNMSG ;PRINT "RECORD NOT FOUND" CNZ PMSG ; MOV A,D ;GET ERROR BITS. ANI 8H ;IF BIT 3 IS HIGH, LXI H,CRCMSG ;PRINT "CRC ERROR". CNZ PMSG ; MOV A,D ;OGET ERROR BITS. ANI 4H ;IF BIT 2 IS HIGH, LXI H,LDMSG ;PRINT "LOST DATA  Z͊:=2-}͕HELP V1.1 $ ++ EOI ++ Type CTRL-C to return to CP/M, to continue -$ HELP File Selections are -- $HELP HLP Type "A"=Abort, CTRL-C=CP/M, =Cont -$ HELP FATAL ERROR -- File not Found$ HELP ERROR -- Invalid Response $ HELP ERROR -- EOF on HELP File $ Type CTRL-C to return to CP/M, "*" to select all, or enter selection - $ections are -- $HELP HLP Type "A"=Abort, CTRL-C=CP/M, =Cont -$ HELP FATAL ERR:The HELP Subsystem for Online Documentati ;". CNZ PMSG ; MOV A,D ;GET ERROR BITS. ANI 1 ;IF BIT 1 IS HIGH, LXI H,BSYMSG ;PRINT "BUSY" CNZ PMSG ; LXI H,ERRMSG ;PRINT "ERROR." CALL PMSG ; LXI H,READYMSG ; CALL PMSG ; CALL CONIN2 ; wait for keyboard response CPI 0DH ; abort JZ ABORT ; CPI ' ' ; is it a space ? RZ ; go retry POP H ; throw away return retry address RET ; ABORT: LDA BOOTDISK ; STA CDISK ; STA NEWDISK ; XRA A ; STA HSTACT ; JMP 0 ; ; CHKRDY:  on This is HELP, the Online Documentation Subsystem. The purpose of HELP is to allow the user to interactively query the *.HLP files of the system in order to receive information summaries on various aspects of the user's working environment, such as the language systems he is using and certain subsystems available to him. When the user types 'HELP', a search is done for the file 'HELP.HLP'. If found, the contents of this HELP File is displayed to the user; if not found, the HELP Infor LXI D,0 ; CHKRDY1: MVI A,0D0H ; 1791 Reset command to check ready OUT DCOM ; XTHL ; XTHL ; XTHL ; XTHL ; IN DSTAT ; ANI 80H ; RZ ; DCX D ; MOV A,E ; ORA D ; JNZ CHKRDY1 ; IF MMPM ; if mpm sys, cannot ; hang system POP H ; call to iocom POP H ; return pointer RET ; a = ff ELSE LXI H,NNMSG ; CALL PMSG ; CALL CONIN2 ; CPI ' ' ; retry JZ CHKRDY ; LDA NRDISK ; STA NEWU   2Gf 2Hfm\ڡ\!`]nG~2MfQ ʸ=&È 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $Z á $ W2Nf *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$   2Gf 2Hfm\ڡ\!`]nG~2MfQ ʸ=&È 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $Z á $ W2Nf *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$   rocessor CP/͠ provide genera environmen fo progra construction storage an editing alon wit assembl an progra debu facilities A importan featur o CP/ i tha i ca b easil altere t execut wit an compute configuratio whic use a Inte 808 o Zilo Z8 Microprocesso an ha a leas 16 byte o mai memor wit u t fou IBM-compatabl diskett drives. Th CP/ monito provide acces t program throug comprehensiv fil man k file named FILENAME.HLP  *(3) by typing 'HELP FILENAME.EXT', where  /FILENAME.EXT is the name of a file created in  the format of a help file I th use type jus 'HELP' h wil receiv th HELP.HL hel fil (no bein displaye t you) Fo al othe form o th HEL command th use wil se th specifie hel fil information Generall speakingg th nam o th hel fil shoul b indicativ o it subject lik CPM.HL shoul contai he  2Gf 2Hfm\ڡ\!`]nG~2MfQ ʸ=&È 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $Z á $ W2Nf *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$   2Gf 2Hfm\ڡ\!`]nG~2MfQ ʸ=&È 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $Z á $ W2Nf *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$ agemen system Th fil subsyste support name fil structure allowin dynami allocatio o fil spac a wel a sequentia an rando fil access Usin thi fil system u t 6 distinc program ca b store i bot sourc an machine-executabl form. Digita Research th designe o CP/M ha provide se o si manual whic describ th us an operatio o CP/ i detail.  These manuals are:  1 A Introductio t CP/ Fl informatio o CP/M. :HELP: How to write .HLP files File use b th HEL progra ar eithe simpl CP/M-standar file o栠 ASCIɠ tex o ASCIɠ file generate b th Wor䠠 Sta tex editor/formatter Thes files a mentione above ar o tw basi types indexe an non-indexed an eac typ i relate t th othe an i o th sam basi format  YGrouping of Information Informatio displaye t th use i groupe b th inde8Welcome to the HELP Command How to use the HELP Command How to write .HLP Files Help on CP/M in general :HELP: Welcome to the HELP Command Welcom t th HEL Command Th HEL Comman i designe t assis you th CP/͠ user i th us o CP/ i genera an specifi CP/ command i particular I i designe a a interactive on-lin assistanc system. HEL pull i file name .HL fro dis an display thes t th use i page mode Thes 4eature an Facilities  42. ED: A Context Editor for the CP/M Disk System  (3. ASM: CP/M Assembler User's Manual  54 DDT CP/ Dynami Debuggin Too User' Manual  5. CP/M Interface Guide  6. CP/M System Alteration Guide A th reade ca see CP/ support contex editor a assemble (Intel-compatable) an debugge system Thes ar availabl i th basi CP/ package Ther i larg variet o othe softwar availabl i indexe HLР file an ma als b groupe b line beginnin wit For Fee (^L characters Groupin i a effectiv wa t logicall organiz informatio s tha meanin wil b mor clea t th use an unit o informatio will (not pass between screen displays.  Non-Indexed .HLP Files Non-indexe .HL file ar simpl ASCI file whic star wit colo (: a th firs characte o th fil an consis o ASCI tex (wit eac lin termfile ar o tw basi type -- indexe an non-indexed. Indexe file ar thos .HL file whic star wit a index Thi i a exampl o a indexe file Whe HEL load a indexe file i display thi inde t th use an allow hi t selec entrie fro it Th use ma selec a man entrie a h desire i an orde h desire b simpl typin th lette o hi selection Onc th use ha mad hi selection hel wil loo u th bod o tex h selecte  whic ca ru unde CP/ wit littl o n modification Suc softwar include severa assembler (bot 808 an Z80) symboli debugger severa high-leve language (includin FORTRAΠ I֠ {compiler} BASIC- {translator} CBASI {translator} man interpretiv BASICs ALGOL FOCAL an C) an severa special-purpos application program (suc a tex formattin system an accountin systems). Refe t th indicate manual and/o th CP/ hel fil fo furtZinate b carriag return/lin fee characte combination) Th informatio i suc hel fil consist o al tex afte th leadin colo u t eithe th terminatin end-of-fil mar (control-Z o ne lin whic start wit colon.  Indexed .HLP Files Indexe .HLР file ar simpl ASCI file whic d no star wit colo (: a th firs characte o th file Thi typ o .HLР fil consist o on o mor norma ASCI tex lan displa i t hi i page mode Whe th use ha finishe readin hi selection HELР the return hi t th inde menu Typin Control- wil retur th use t CP/M. Non-indexe file ar thos .HL file whic d no star wit a index I suc cases HEL wil immediatel displa th content o th fil t th use and whe th use ha finishe lookin a it HEL wil retur t CP/M. HEL i menu-driven an al th command availabl t th us՟he information. 680) symboli debugger severa high-leve language (includin FORTRAΠ I֠ {compiler} BASIC- {translator} CBASI {translator} man interpretiv BASICs ALGOL FOCAL an C) an severa special-purpos application program (suc a tex formattin system an accountin systems). Refe t th indicate manual and/o th CP/ hel fil fo furt ine a th firs line o th fil followe b informatio section whic begi wit lin whos firs characte i colo an en wit eithe th firs lin o th nex informatio sectio o th en o th file. :HELP: General Information on CP/M CP/ i monito contro progra fo microcompute syste developmen whic use IBM-compatibl flexibl disk (flopp disks fo mas storage Usin microcompute mainfram base o Intel' 808 o Zilog' Z8 microp e a an give tim ar displaye t him HEL ca b ver usefu too fo on-lin referenc t th user It i conjunctio wit th man HL file no available ha alread prove t be of significant value.  l Richard Conn :HELP: How to use the HELP Command Th HEL Comman i execute i on o thre ways:  (1) by just typing 'HELP'  /(2) by typing 'HELP FILENAME', where FILENAME  is the name of a dis ectory is full SOURCŠ FIL NAM ERRO - Th for o th sourc fil nam i invalid not tha MA i invoke b 'MA filename' an th .AS fil typ i NO specified. SOURCE FILE READ ERROR - Error in reading source file OUTPUT FILE WRITE ERROR - Error in writing output file CANNOT CLOSE FILE - An output file cannot be closed. UNBALANCED MACRO LIBRARY - No ENDM encountered for a MACRO definition INVALIĠ PARAMETE - Invali assembl paramete wa foun i th in 9mbl languag sourc o librar files Intersperse control ar denote b "$ i th firs colum o th inpu lin followe immediatel b parameter. :Assembler Pseudo-Ops The following Pseudo-Ops are supported --  DB 'defines data bytes or strings of data  DS reserves storage areas  DW defines words of storage  ELSE alternate to IF  +END terminates the physical program  ENDIF marks t 3op an contro parameters. Th patc fil XMAC.AS contain th patche use t conver MAà int XMAC. Th堠 librar file MAC40.LI  an XMAC40.LI  contai th macro necessar t assembl cod fo th Inte 404 microprocessor fo example MAC40.LI rename th 404 mnemonic fo ADD SUB etc. t ADD4 SUB4 etc. s tha i wil no conflic wit MAC XMAC40.LI doe no renam these, since XMAC does not recognize these in the first place. :Assembly Control P pu line. 9ilename' an th .AS fil typ i NO specified. SOURCE FILE READ ERROR - Error in reading source file OUTPUT FILE WRITE ERROR - Error in writing output file CANNOT CLOSE FILE - An output file cannot be closed. UNBALANCED MACRO LIBRARY - No ENDM encountered for a MACRO definition INVALIĠ PARAMETE - Invali assembl paramete wa foun i th in he end of conditional assembly  $ENDM marks the end of a MACRO  'EQU performs a numeric "equate"  6EXITM abort expansion of the current MACRO level  IF begins conditional assembly  1IRP INLINE MACRO with string substitution  4IRPC INLINE MACRO with character substitution  BLOCAL define LOCAL variables unique to each MACRO repetition  )MACLIB specify MACRO Library to load  MACRO defixarameters Th contro paramete lis i precede b $ an ma contai an o the following in any order --  0A - controls the source disk for the .ASM file  ), equal-to (=), not-equal-to (<>), less-  ? than-or-equal-to (<=), and greater-than-or-equal-to (>=) are   provided. Additionally, the le --  $A $Generate a listing at the terminal  $E +Set Trace Mode for execution under RUNALG  $AE Do Both of the above :ALGOL/M Reserved Words AND ARRAY BEGIN CASE CLOSE DECIMAL DO ELSE END FILE FUNCTION GO GOTO IF INTEGER NOT OF ONENDFILE OR PROCEDURE READ STEP STRING TAB THEN TO UNTIL WHILE WRITE WRIT&EON :ALGOL-M LANGUAGE DESCRIPTION  B Although ALGOL-M was modeled after ALGOL-60, no attempt ical sector map (1 = 2 phys sec.) DW 512 ; bytes per sector DB 0C0H ; mini + skew DW TRANS5M ; 10 sector skew ; ; cp/m double density 512 byte/sector double sided mini drive 48 tpi ; DB 0D2H ; flag DB 0000$0101B ; internal code DP512M48DBL: ;1D/128 DISK PARAMETER BLOCK - MINI DW 40 ;SECTORS PER TRACK DB 3 ;BLOCK SHIFT FACTOR DB 7 ;BLOCK MASK DB 0 ;NULL MASK DW 387 ;DISK SIZE-1 DW 127 ;DIRECTORY MAX DB 240 ;ALLOC 0 DB 0 ;ALLOC 1 DW 32 ;CHEC-able is set to 1.0 and execution continues.  7The variable's allocation size should be increased in  it's declaration statement. DI Disk file variable format error. DZ Decimal division by zero, result is set to 1.0. EF End of file on read. IA Integer addition/subtraction over/under flow  result is set to 1. II Invalid Console Input. Try input again. IR Record number incorrect or random file is not initialized. IZ Integer division by zero. Div file  y declaration statement. :ALGOL-M Compiler Error Messages AS Function/Procedure on left hand side of assignment  ~statement. BP Incorrect bound pair subtype (must be integer). DE Disk error; no corrective action can be taken  in the program. DD Doubly declared identifier, label, variable etc. FP Incorrect file open statement. IC Invalid special character. ID Subtypes incompatible (decimal values can not be  assigned to K SIZE DW 3 ;TRACK OFFSET DB NSECTS ; ccp + bdos length in sectors DB 17 ; number of sectors on track 0 DB 40 ; DW 40 ; number of sectors on track 1 DB 1024/128 ; cpm block size/cpm sector size DB 512/128-1 ; disk sector size/cpm sector size DB 2 ; logical to phisical sector map (1 = 2 phys sec.) DW 512 ; bytes per sector DB 0C0H ; DW TRANS5M ; ENDIF ; if dblock ENDIF ; if 512 ENDIF ; if skew ENDIF ; if mini48 IF MINI96 ; ; cp/m double isor set to 1 and  ~division is completed. NX Negative exponential. Exponentiation not done. SO Characters lost during string store. 3Iof file on read. IA Integer addition/subtraction over/under flow  result is set to 1. II Invalid Console Input. Try input again. IR Record number incorrect or random file is not initialized. IZ Integer division by zero. Div Qlinteger variables). IO Integer overflow. IT Identifier is not declared as a simple variable or  function. NG No ALG file found. NI Subtype is not integer. NP No applicable production exists. NS Subtype is not string. NT For clause,Step expression,Until clause expressions are not  ~of the same subtype.(must all be integer or decimal). PC Number of parameters in procedure call does not match the  'number in the procedure declaration. P ! density 128 byte/sector single sided mini drive 96 tracks per in. ;96 DB 054H ; flag DB 0000$0001B ; internal code DP128M96SGLBK: ;1D/128 DISK PARAMETER BLOCK - MINI DW 30 ;SECTORS PER TRACK DB 4 ;BLOCK SHIFT FACTOR DB 15 ;BLOCK MASK DB 0 ;NULL MASK DW 142 ;DISK SIZE-1 DW 127 ;DIRECTORY MAX DB 192 ;ALLOC 0 DB 0 ;ALLOC 1 DW 32 ;CHECK SIZE DW 3 ;TRACK OFFSET DB NSECTS ; ccp + bdos length in sectors DB 17 ; number of sectors on track 0 DB 30 ; nu l sector map (1 = 2 phys sec.) DW 128 ; bytes per sector DB 00,00,00 ; ; cp/m double density 128 byte/sector double sided mini drive 48 TPI ; DB 0D0H ; flag DB 0000$0101B ; internal code DPDD1MBK: ;1D/128 DISK PARAMETER BLOCK - MINI DW 30 ;SECTORS PER TRACK DB 3 ;BLOCK SHIFT FACTOR DB 7 ;BLOCK MASK DB 0 ;NULL MASK DW 287 ;DISK SIZE-1 DW 63 ;DIRECTORY MAX DB 192 ;ALLOC 0 DB 0 ;ALLOC 1 DW 16 ;CHECK SIZE DW 3 ;TRACK OFFSET DB NSECTS ; ccp + bdos l D Undeclared parameter. PM Parameter type does not match the declared type. SO Stack overflow. SI Array subscript is not of subtype integer. TD Subtype has to be integer or decimal. TM Subtypes do not match or are incompatible. TO Symbol table overflow. TS Undeclared subscripted variable. UD Undeclared identifier. UF Undeclared file/function. UL Undeclared label. UP Undeclared procedure. US Undeclared simple variable. VO Varcmber of sectors on track 1 DW 30 DB 128/128 ; cpm block size/cpm sector size DB 128/128-1 ; disk sector size/cpm sector size DB 0 ; logical to phisical sector map (1 = 2 phys sec.) DW 128 ; bytes per sector DB 00,00,00 ; ; cp/m double density 128 byte/sector double sided mini drive 96 tpi ; DB 0D4H ; flag DB 0000$0101B ; internal code DP128M96DBL: ;1D/128 DISK PARAMETER BLOCK - MINI DW 30 ;SECTORS PER TRACK DB 4 ;BLOCK SHIFT FACTOR DB 15 ;BLOCK MASK DB 0 ;Nength in sectors DB 17 ; number of sectors on track 0 DB 30 ; number of sectors on track 1 DW 30 DB 128/128 ; cpm block size/cpm sector size DB 128/128-1 ; disk sector size/cpm sector size DB 0 ; logical to phisical sector map (1 = 2 phys sec.) DW 128 ; bytes per sector DB 00,00,00 IF SKEW IF F512 IF DBLOCK ; ; cp/m double density 512 byte/sector single sided mini drive 48 tpi ; DB 52H ; flag DB 0000$0001B ; internal code DP512M48SNGBK: ;1D/128 DISK PARAMETE#0 table overflow. Possibly caused by too many  Clong identifiers. :ALGOL-M Run-Time Error and Warning Messages  ERROR Messages AB Array subscript out of bounds. CE Disk file close error. DB Input field length is larger then the buffer size. DW Disk file write error. ER Variable block size write error. IO Integer overflow(intege|r value greater than 16383). IR Record number incorrect or random file is not initialized. ME Disk file creation may be  ? specified by prefixing the actual file name with the desired  ? drive letter followed by a colon. Additionally, if random  ? file access is desired, the file name identifier may be  ; followed by a comma and an integer constant or variable.  A This integer value specifies the record within the file which  ' is to be used for input/output.  9 Prior to the use of a file name identifier in a READ R BLOCK - MINI DW 40 ;SECTORS PER TRACK DB 3 ;BLOCK SHIFT FACTOR DB 7 ;BLOCK MASK DB 0 ;NULL MASK DW 187 ;DISK SIZE-1 DW 127 ;DIRECTORY MAX DB 240 ;ALLOC 0 DB 0 ;ALLOC 1 DW 32 ;CHECK SIZE DW 3 ;TRACK OFFSET DB NSECTS ; ccp + bdos length in sectors DB 17 ; number of sectors on track 0 DB 40 ; DW 40 ; number of sectors on track 1 DB 1024/128 ; cpm block size/cpm sector size DB 512/128-1 ; disk sector size/cpm sector size DB 2 ; logical to phisr error. NA No AIN file found on directory. OV Decimal register overflow during arithmetic operation/  load. RE Attempt to read past end of record on blocked file. RU Attempt to random access a non-blocked file. SK Stack overflow(no more memory available).  K WARNING Messages AZ Attempt to allocate null decimal or string,  isystem defaults to 10 digits/characters. DO Decimal overflow during store operation. The value of  the vari, ? or WRITE statement, the file name identifier must appear in  ? a file declaration statement. The file name identifier can  ? only be referenced within the same block (or a lower block)  ? as the file declaration. Files are normally treated as  ? unblocked sequential files. However, if blocked files are  ? desired, the record length may optionally be specified in  4 brackets after the file name identifier in theqy&!@SGL>2~&!@,3COMPARE!@FIMAP!@\aDCOPY!@txCOPY!@ÐDFORMڴ!@çFORMڼ!@DVALIDG!@VALIDO!@CODE>2&>2|&2&2&2w&<2&:&1!@'.COMPAREÀ!@AGNOFILLO>2x&!@_dNOVERl>2w&!@|ÀCOPYÍ~!# Ã̓w %ʴ yÚ:&y2&!@WITHw ͜%ҽ2&!&w  y2&!@TO- operly,  * most likely cause is a full disk, erase  $ and retry CANNO CLOS FIL ) Outpu fil canno b closedchect  ! see if disk is write protected 6 ddetermine the point of error OUTPUT FILE WRITE ERROR Output files cannot be written prrmat  filename.PRN - listing file I th cas o th secon command thes file ar create accordin to the parameters specified --  ASM filename.pqr where  Cp : A,B,... - designates the disk name which contains the source  Aq : A,B,... - designates the disk name to receive the hex file  Z $- skips generation of the hex file  @r : A,B,... - designates the disk name which will receive the   w ͜%ҽ2&!&w C SOURCE AND DESTINATION DRIVE ARE THE SAME $  l IS THIS WHAT YOU WANT? (Y/N) $N  f$:&ʾ Ó COMPARING DISK $  :&%ð WITH DISK $  :& COPYING DISK $  :&% TO DISK $  :&%#:& :&Lʕ !&:&/ $ , TRACKS $  D < , TRACK $2  *&p  S  |J {0__J :&!&ʕ Ç THRU $  *&J :&"#$:&"#$:&T :&"#2' NO FORMAT CODE ON SOURCE DISK $  T  DISK FORMAT DW 256 ; bytes per sector DB HDBIT ; DB 00,00 ; ENDIF ; IF QUANTUM ; cp/m hard disk 512 byte/sector 128 sectors/track DB 26H ;CODE BYTE DB 0FFH ;DUMMY HDQUANTUMBK: DW 64 ;SECTORS PER TRACK DB 5 ;BLOCK SHIFT FACTOR (4 k blocks) DB 31 ;BLOCK MASK DB 1 ;NULL MASK DW 2047 ;DISK SIZE-1 DW 511 ;DIRECTORY MAX DB 240 ;ALLOC 0 DB 0 ;ALLOC 1 DW 0 ;CHECK SIZE (fixed media no check) DW 3 ;TRACK OFFSET DB NSECTS ; ccp + bdos length in sectors DB  print file  X &- outputs the listing to the console  Z - skips generation of the print file :Assembler Pseudo-Ops ORG Set the program or data origin END End program EQU Numeric equate SET Numeric set IF LBegin conditional assembly ENDIF End conditional assembly DB Define data bytes DW Define data words DS 0Define data storage area :Assembler In-Line ErrIS $  :' M = 128 BYTE SECTORS, DOUBLE DENSITY$  >2|& 2&͟*(J n BYTE SECTORS, $^  :&Ą$:}&’ :' :~&¾ :&G:&¾ ñ DOUBLE SIDED, $  >2}& DOUBLE DENSITY$  >2|& SINGLE DENSITY$  :'G:&"#T OT  :}&T yB FORMAT CODES DO NOT MATCH...$"  :&2&*(<$> 2&! :&w !>2&:|&ʫ >D̈́%:&2&):&ʫ !ʫ !ʫ ! :2&"'<$ڹ ï y2&:}& :&2&!&>WͰ!Q'>WͰ PRESS RETURN TO BEGIN...$   kC^P ^2 Please put a disk in drive "B", Then press return ^^1 M gDFOCO DVALID A: SIZE 512 B: DVALID B: SIZE 512 ^2 *** System test complete, ready for use ***^# $SEQDN COM,DSKTYP COM -SAFMT COM.DUMP ASM!/0PROM183 ASM=12D COM3 DI $$$ BACKUP COM ]or Messages Ġ Dat error elemen i dat statemen canno b place i th  cspecified data area Š Expressio error expressio i ill-forme an canno b  kcomputed at assembly line ̠ Labe error labe canno appea i thi contex (ma b  `duplicate label) Π No implemented: feature whic wil appea i futur AS  Mversions O Overflow: expression is too complicated to compute; si P:&2&2&:&!&W D LOAD SOURCE DISK, PRESS RETURN $"  :&$"#:|&2':&G:&O(x2m&!&!& >S̈́%!'ẍ́ͩ!:'ʔ >D̈́%:}&ʡ #ڶ :&!&  :&"*'k x2&:&!&>:& LOAD COMPARISON$    LOAD DESTINATION$  + DISK, PRESS RETURN $ :&$"#:&G:&O(x2m&!&!Q'b>S̈́%!'ẍ́!:'ʂ>D̈́%:}&ʂ#ڗ:&!Q'ʨ ʡ:&"*'Lx2& :& DISK COMPARISON COMPLETE$ P COPY COMPLETE$ P>2&! witches}$  $ NDefault "SIZE" = 128 *** Single density $$ \ $Y âFORMAT defaults to IBM 3740 CP/M Standard single density $g ð $ Typical "Switches" = DBL, MINI48, MINI96, TRACK, NOVAL etc.$  $ 3Example: DFORMAT B: SIZE 512 DBL $ f(See Gen-op manual for additional info)$> u $q ð******* SPACE BAR WILL ABORT COMMANDS ******* $  "R" will repeat commands$  $  *$ Vmplify Р Phas error labe doe no hav th sam valu o tw  wsubsequent passes through the program Ҡ Registe error th valu specifie a registe i no  rcompatible with the operation code ֠ Valu error operan encountere i expressio i improperl  Hformed :Assembler Console Error Messages NO SOURCE FILE PRESENT 'The file specified in the ASM command  does not ͜% 2&:&"#, THE DISK IN DRIVE $ :&%ʕ:'^€u IS SINGLE DENSITY IBM 3740 STANDARD$P × IS DOUBLE DENSITY $ :'øDOUBLE SIDED, $ WITH $ :'!=)J  BYTE SECTORS$  THE ACTUAL FORMAT CODE IS $ :'B4Ɛ'@'_+LH $H :&PÊ IS DOUBLE DENSITY WITH 128 BYTE SECTORS$a î HAS NO FORMAT CODE $ BYTE 7FH OF TRACK ZERO SECTOR ONE IS $ :'+( WOULD YOU LI >2z&1&!s#  >C~Aa:{: w# '7!'A!+&<:R`~# y`> 2y&2{&2w&2x&2|&2&2&2'2&2}&2~&2&2&2'">2&<2&> 2&>32&!"&!"&!"&:S̈́%!'Ͱ!&is# x?G ## 7!@NOVAL#>2{&!@38RETRYF͌#C<2y&!@V\MINI48|>2&>2&>2'2|&2&>H2'ï!@ÒMINI96ү>2&>2&>2'2|&2&>L2'!@SIZEy$!@DBL>2&2}&!@DD>2|&2q(exist on disk NO DIRECTORY SPACE )The disk directory is full, erase files  ? which are not needed, and retry SOURCE FILE NAME ERROR >Improperly formed ASM file name SOURCE FILE READ ERROR (Source file cannot be read properly by  # the assembler, execute a TYPE to  e determine the point of error OUTPUT FILE WRITE ERROR Output files cannot be written prInvoking the Assembler Assembler Pseudo-Ops Assembler In-Line Error Messages Assembler Console Error Messages :Invoking the Assembler The CP/M Assembler is invoked by typing --  ASM filename or ASM filename.parms where 'filename' is the name of the file 'filename.ASM' to be assembled. In the case of the first command, the following files are created --  filename.HEX )- "HEX" file containing machine code in  Intel hex fotim programs Simpl typ HEL CP . 4. SURVEY.CO wil loo ove al i.o port an repor wha i bein used Interestin t us whe yo wan t ad somethin else to the system and want to avoid clashes. (why not ?) 5.) MDISK is now with us. - WHAT IS MDISK you ask ? I i kin o cach memor syste tha i CP/͠ orienteda _{ozgO{ozgi`N#Fogo&og_{_z#W OK = Y -S {-_ ! s+p+q*  ͼ 2 <2 : ! ڗ  K ! 4Á ! 6: =! ڻ * & NK ! 4œ >3  03} Z; { ) #   k!!BK"]!]~ (w#x2=G!~$ww#x2=4l No data file present error $J Û Utility progam aid of 10/14/81$z  Program load address --- $ !|Ɛ'@'_} $ !"" *"*1 !""D!6" >2 !M" !"!`">2 *~O#" !" !"!l"*}y q#"}s1#!C:= _!6!C*6!CRl!C!Rl{>2  Data file over-runs top of RAM, re, I take th plac o th "D driv an i a larg a you pocke book Fo al intent an purpose i i dis drive Onl i store it' dat i RAM I ca b expande i 48 increment t abou 500K I yo d lo o assemble o compile wor an ca thin o severa hundre bette thing t d tha si waitin fo th processo t complet it' task thi ma b useful t you. Typica performanc increase ove ou flopp time wil b i exces o 10 pe cent (Thbooting...$ [*D:<*3!1 |P}P~O+#Ch\Ɛ'@'O+SÒ x |o{0O+o Cmd buffer --- End buffer --- Cmd length --- Max ---  ͓Q!ͷ͓Q͌Q!.ͷ6y#G͙Qà!2ͷQ͓͌Q!>ͷq eg͙Q:zJEËC–EQyQxQRQ** {zҷ*~#" <AOGƐ'@'OxƐ'@'ON# a mean yo wil onl hav t si hal a long Thos o yo wh ar familia wit ou syste wil realiz tha a w ar alread th fastes around thi i som rea improvment Comparin i t a Appl o a Orang i joke. MDIS wil assembl 20 assembl sourc progra producin 30 .PR fil an associate .HE an .SY files als readin i tw 20 MACR LI file i 2 second Ou Appl too 1/ minute and our Plastic Shack 2 min and 14 secs to do similar ta^z8O!B N#N ¾SP.* |} !9":q!".>+.INX DAD LDAXDCX :=_!"!" "!\" ͶO^}# \~$y!>" Ͷ1(2( Pʿ@OͶ^(O+!" (O(! !\" *~#">2!"\**D.DAT $TYPE  !í 1 models used in XOR systems in the past. 7. Th dis driver fo 4 an 9 tpi singl an doubl side min 5 drive hav bee turne o i th distributio versio o th CP/ "A an "B disks W strongl recommen (i fac insist? tha yo us th 51 byt pe secto mod fo al th min types T ru mini wit 8 drives simpl plu i th drive an ru DFOC t forma th minis Th comman lin t correctl forma 9 tp doubl side driv i DFOC woul mo know!) 2.) BACKUP.COM will help first time users make that initial important backup of their CP/M source disks. BACKUP should be the FIRST program that you run after receiving your computer. The SOURCE disk goes in drive "A" and a BLANK destination disk in drive "B". BACKUP will format the destination disk and copy A to B. (In all XOR systems drive "A" is on the left and drive "B" is on the right.) 3. HELP.CO wil ai firs user o CP/M BASIC an man othe ru  *( * " 3*1 #" " " *5 " > # R : B * +" ! +s#r( ! 6: " * ~2 * #" * +" > ʶ : 2 Ғ * +" : <2 O>ҳ ! 6* #" * ~2 p K* DMf = * *% DMf = * *% DMf = *( #"( K*# DMf = * *% DMf = : AOK :K . g S -A >>!  ~?l W >#^ : /!:' —  ʑ #‹  W ʢ #™ i`N#FogDM!>))덑o|g =¼ DM!>)) = ^#V) ^#V|g}o  be * DFORMAT C: SIZE 512 MINI96 DBL We are assuming drives "A" and "B" are 8" and drives "C" and "D" are strapped as minis. After formatting and PIPing data to the mini, the operating system may be transferred to the mini useing DSYSGEN. See the manual for specifics on using DSYSGEN. Transfer method #3 where you answer , to the first two questions and then take the OS directly from the 8" floppy and put it on the mini would be the easiest to do. After a writte an rename DIABLO.CO o MX80.CO o TI810.CO (fo example) Thes ca b ver simpl program tha merel modif on o tw cell i syste memory Th memor cel 30H byte pas th war boo entr i th jum tabl i wher th currentl logge printe i kept Byte a 31H,32H an 33H offse fro war boo ar th bau rat byte fo th cp brg seria boar an respectivly Th syste ca handl 1 seria port an Centronic typ por wit part ava es of that disk is to use the system utility DDUMP.COM to modify the byte on the system tracks of the floppy. You will find the bios jump table on track 1 sector 20. DDUMP  (OPERATOR INPUT) * C (PROGRAM RESPONSE) T 1 S 20 EDIT (OPERATOR INPUT) - EDIT (PROGRAM RESPONSE) 33   (OPERATOR INPUT) 0033 00  (PROGRAM RESPONSE) 05   (OPERATOR INPUT) 0037 0 (PROGRA RESPONSE SE T 0 o singl side diskette t doubl side diskette DSYSGE wil tel yo "th sourc an destinatio format d no agree d yo wis t continue?" o may type yes and the transfer will be complete. Anothe ite t b noted al XO system ar compatibl wit standar 12 singl density howeve ther i no enoug roo o th syste track o th dis t plac th system Yo mus boo u o Doubl densit diskett i "A drive Singl density filesyilabl fro you US SALES OFFICE. A a offse 30H fro war boo wil selec channe "A seria por o th cpu Thi i printe 0 CXLS alway initialize t thi printer Printer 1,2,3 an 4 ar expecte t b o a optiona seria expansio boar tha i availabl fro you U.S MICR SALE OFFICE. Printe 5 i expecte t b th paralle por o th CPU A exampl o progra tha woul selec printe numbe an se th bau rat t 120 bau FO 6MӠ SEE .  ,(OPERATOR INPUT) TERMINATES EDIT WRITE  -(OPERATOR INPUT) WRITES YOUR EDIT TO DISK ^C (OPERATOR INPUT) RETURNS TO CP/M ^C A third method is to use a text editor to modify the bios source code module IO.ASM which contains the bios jump table. You will need the Digital Research MAC assembler to do this. It may be purchased f`rom your closest U S MICRO SALES OFFICE. Obviously if you should want to switch back to sK successfully accomplishing the above two feats, re-strapping the floppy controller so that the minis are "A" and "B" will allow you to boot from them after a reset. Som problem hav bee notice bootin min floppie b certai manufacturers I wil wor bu sometim no alway o th firs try I i cause b driv read signa no bein availabl a i o 8 systems ne versio o th boot prom (vers 1.85 i corrects this problem. 8 INCH JUMPER S( i a follows: ORG 100H START:  MVI A,03H ; printer select  LHLD 1 ; get warm boot address  LXI D,30H ; offset  DAD D ;  MOV A,M ; set printer The baud rate port on the CPU is at I.O. port location 0BH. A slight complication arises in that you probably would not wish to change the baud that the system terminal is running at. In this case you would have to read the CP U baud ratqerial output, the same byte should be set to a "0". Not tha anothe comple printe drive optio ha bee supplie i th for o CXLST.AS an it associate PRINTER.COM CXLS ma requir modificatio t ge you printe t wor properly I th comman submi fil BLKSYS61.SUB severa module ar concatenate b PIP.CO t assembl th syste bios I yo pla o changin anything jus tackl th modul yo nee an generat whol ne bio b doin anot5>TRAPS AS SHIPPED FROM FACTORY A,B = 8" C,D = MINI  O  O   | | |  | |___ | |   | | |  |___ | | |   | | |  | | | |  O  O! 5 INCH AS A and B  O  O   | | | |   | | | |   .e switch and ORI the upper 4 data bits on to your new lower 4 bits before re- programming the brg. Look at how things are done in PRINTER.ASM as an example if you have any problems. 9). Anothe commo proble w ge call o bear mentioning I i explaine i th Genera Operatin proceedure sectio o you manual ho t pu th operatin syste fro on diskette t another bu fo som reaso man customer don' understan this procedure. I yo wan t trahe submit Th distributio versio als contain simpl drive calle STDLST.ASM Yo ma wan t replac CXLST.AS wit STDLST.AS an re-assemb th bios U t si printe driver ca b residen i th bio a on tim usein CXLST PRINTER.COM will select the printers by simply typing PRINTER 3 (for example). PRINTER.COM can also change the baud rate that is supplied to the respective printer. PRINTER.CO͠ ha "TEST mod (invoke b typein  | | | |  O  O 8. paralle printe drive ha bee installe i th bio STDLST.ASM Thi drive ca b use fo Centronic typ cabl interfaces (Se th appendi fo paralle cabl wiring. Thre method ma b use t "tur on thi driver A shippe th bio drive th seria por "A o th CP wit al CP/͠ lis outputs. T switc al outpu t th paralle por o temporar basdnsfe th operatin syste fro on dis t another simpl loa DSYSGE an answe (N an (N t th firs tw question tha com o th screen tabl wil the appea wit sub-lin askin "COD BYTE FO SOURC DISK?". Usuall yo wil nee t ente 1A whic signifie 51 byt singl sided Th othe commo cod byt i 9A whic i fo 51 byt sectors bu doubl sided Afte determinin th typ o sourc dis an driv name hi ' whic wil pol th selecte printe port' statu por an displa th contro bit o th screen BEFOR yo tr t sen dat t you printer ru PRINTER.CO i th tes mod t se i th statu bit ar se correctly Thi wil sav a enormous ammount of time in getting things to run. PRINTER.CO͠ als wil sen eithe singl character o continuous string so that system handshaking can be tested. Custo PRINTER.CO typ program ca b i yo ca se byt i memor a EE33 t 05H Thi ca b don wit DD o BASI wit "POKE instruction Thi memor ca b calculate fo differen syste size b pickin u th th bio jum tabl an ca b calculate fo differen syste size b pickin u th war boo entr addres a memor locatio an 2 an addin 30 t tha address (30 4 decimal) A second method, which is permanent for the disk that the change was made on and all copi Kestio aske wil b fo th cod byt fo th destinatio disk Afte tellin dsysge th typ an drive i wil d th transfer It' reall ver simpl an shoul tak n mor tha 1 second t do I yo fin yoursel wel int th firs hour REA TH MANUAL Ther i ste b ste exampl i there Don' forge tha th destinatio dis mus hav suitabl forma o it I you no sur o thi point us DFOC t forma th disk. .pa I yo ar copyin syste TTRK LDED TRK DSBC DE JNZ NOMATCH1 ; ; SAME TRACK, SAME SECTOR? LHLD HSTSEC LDED SEKHST ;SEKHST = HSTSEC? DSBC DE JNZ NOMATCH1 ;SKIP IF MATCH JMP MATCH ; ; NOMATCH: ; REWRITE IF REQUIRED LDA HSTWRT ;MUST NOT ALLOW R/W ROUTINES TO KNOW ORA A ;THAT NEW DISK IS TO BE SELECTED UNTILL JZ FILHST ;CURRENT BUFFER IS DUMPED, NOTE THAT A NEW DRIVE,, LDA NEWDISK ;TRK OR SECTOR COULD HAVE GOTTON US HERE. STA UNADSK ;NOTE THAT DSK DRIVERS USE 'LASTFLOP' AS OLDISK. LDA BUFDSK ;  ;PUT IT ALL BACK FOR NEXT TIME BACK1: CALL CRLF MVI A,'*' CALL OUTA CALL INECO LXI D,3 LXI H,CMDS MOV B,A MVI C,0FFH CLOOP MOV A,M CMP B JZ FOUND CMP C JZ ERROR DAD D JMP CLOOP ERROR MVI A,'?' CALL OUTA JMP STARTX CMDS DB 'L' DW LOAD DB 'G' DW GO DB 'D' DW DUMP DB 'M' DW MOVE DB 'V' DW VIEW DB 'F' DW ZERO DB 'X' DW MEM DB 'H' DW HSRCH DB 'F'-40H DW BOOT ; dp - dsk DB 'C'-40H DW BOOT ; DB 0FFH FOUND CALL SPACE INX H MOV E  ; ORA H ; RZ ; no trk 0's are skewed DCX H ; MOV A,L ; ORA H ; RZ ; or trk 1's MOV A,C ; ANI MINIBIT ; 0100$0000b JZ SKIP2 ; DCX H ; MOV A,L ; minis use 0,1,2 for system ORA H ; so no skew on them neither RZ ; SKIP2: ; LHLD TRANSTBL ; some other trk DAD D ; MOV E,M ; DCX D ; make rel 0 RET ; ENDIF ; ;**4 ;* * ;* LOCAL DATA STORAGE FOR BLK - DEBLOC TRACK TABLE UPDATE RTNS FOR 179X ARE TOLD ABOUT CALL SELOK ;FACT THAT NEWDISK IS NOT OLDISK, BUT STILL NEED CALL AWRITE ; LDA UNADSK ; STA NEWDISK ; MOV C,A ; MVI A,0FFH ;A LITTLE PFM STA UNADSK ; MOV A,C ; CALL SELOK ; JMP FILHST ; NOMATCH1: ; LDA HSTWRT ; ORA A ; CNZ AWRITE ;TO KNOW THE 'OLDISK'(LASTFLOP) TO STORE TRK INFO ORA A ; RNZ ; ; FILHST: ;MAY HAVE TO FILL THE HOST BUFFER XRA A STA HSTWRT ;BUFFER IS NOW READ DATA LXI H,HSTBUF ;POI ,M INX H MOV D,M XCHG PCHL HSRCH: CALL IN2AD PUSH IX PUSH H INX D PUSH D MVI D,00H INLP: PUSH D CALL INHX POP D DB 0DDH,71H,00H ;MOV 0(X),C ORA A JNZ FIND1 DB 0DDH,2BH ;DCX IX INR D CALL SPACE JMP INLP FIND1: POP B CALL CRLF FIND: POP H DB 0DDH,0E1H ;POP IX MOV E,D DB 0DDH,7EH,00H ;MOV A,0(X) DB 0EDH,0B1H ;CPIR JPO STARTX DB 0DDH,0E5H ;PUSH IX PUSH H FND: DCR E JZ RPT DB 0DDH,7EH,0FFH ;MOV A,-1(X) CMP M JNZ FIND INX H DB 0DDH,2BHK * ;* * ;** ; ; TEMP1: DS 2 ;TEMP TEMP2: DS 2 ;TEMP TEMP3: DS 2 ;TEMP ; SECVEC: DB 00 SEKHST: DW 0000 ;SEEK SHR SECSHF ; UNADSK: DB 00 ;LAST UNALLOC DISK UNATRK: DW 0000 ;LAST UNALLOC TRACK UNASEC: DW 0000 ;LAST UNALLOC SECTOR BUFDSK: DB 00 ; qRSFLAG: DB 00 ;READ SECTOR FLAG READOP: DB 00 ;1 IF READ OPERATION WRTYPE: DB 00 ;WRITE OPERATION TYPE ; ;** ;* * NT TO BUFFER SHLD HSTDMA ;SAVE IT AS DMA ADDRESS LHLD TRK SHLD HSTTRK LHLD SEKHST SHLD HSTSEC LDA RSFLAG ;NEED TO READ? ORA A ;NOTE THAT RSLG CANNOT EVER BE FF CNZ AREAD ;YES, IF 1 CPI 0FFH ;ERROR STATUS, INFREQUENT BUT... RZ ;THROW UP ; IF MMPM JMP MATCH ;SIMILAR 'MATCH' IS ABOVE COMMONBASE ELSE ; MATCH: ;COPY DATA TO OR FROM BUFFER LDA NEWDISK STA BUFDSK ;THIS GUY OWNS THIS DATA STA OLDISK ;IF YOU GET THIS FAR, THERE ARE NO REWRITES LDA SECVEC ;SECTOR MAPq ;DCX IX JMP FND RPT: POP H PUSH H DCX H PUSH B CALL ADOUT CALL CRLF POP B JMP FIND ; OHOH: PUSH PSW CALL CONSTAT1 JNZ STARTX POP PSW RET ; LOAD CALL INADR LOAD1 CALL CRLF CALL ADOUT LOAD2 MVI A,'-' CALL OUTA MOV B,M CALL OUTHX CALL SPACE MVI A,'<' CALL OUTA CALL SPACE CALL INHX CPI 0DH JZ NNTRY MOV M,C NNTRY INX H JMP LOAD1 DUMP CALL IN2AD DUMP1 CALL CRLF CALL ADOUT MVI B,8 DUMP2 PUSH B MOV B,M CALL OUTHX CALL SPACE MOV A,D ORA E -; **s* ; ; This is the DELTA PRODUCTS 2K boot prom for use with ; standard floppy systems. ; PROM185 11/20/82 *** ; FALSE EQU 0 TRUE EQU NOT FALSE ; VERSION EQU 0185H ; CODE RETURNED WHEN CONSTAT CALLED (L,H) SIO EQU FALSE ; TRUE FOR REV C CPU'S (TYPE 1.95) I8251 EQU TRUE ; TRUE FOR REV B CPU'S (TYPE 1.85) DBUG EQU FALSE ; TRUE TO RUN IN RAM FOR TESTING STK EQU 8000H ; ONAPING LXI H,HSTBUF ;THE MAIN BUFFER LXI D,80H ;ONE CPM SECTOR CPI 0 JZ WRITCELL SECLOOP: DAD D ;WITHIN DISK DRIVE DCR A JNZ SECLOOP WRITCELL: LDED DMAADD ;FILE BUFFER LXI B,128 ;LENGTH OF MOVE LDA READOP ;WHICH WAY? ORA A JNZ RWMOVE ;SKIP IF READ ; ; WRITE OPERATION, MARK AND SWITCH DIRECTION MVI A,1 STA HSTWRT ;HSTWRT = 1 XCHG ;SOURCE/DEST SWAP ; RWMOVE: ; C INITIALLY 128, DE IS SOURCE, HL IS DEST LDIR ; ; DATA HAS BEEN MOVED TO/FROM HOST BUFFER LDA WRTYP~ JZ STARTX DCX D INX H POP B DCR B JNZ DUMP2 CALL OHOH JMP DUMP1 ZERO CALL SPACE LXI H,STARTX PUSH H HRZ1 CALL INADR PUSH H CALL INADR PUSH H CALL INHX MOV B,C POP D POP H HRZ2 MOV M,B INX H MOV A,L CMP E JNZ HRZ2 CALL OHOH MOV A,H CMP D JNZ HRZ2 RET MOVE CALL SPACE LXI H,STARTX PUSH H HRM1 CALL INADR PUSH H CALL INADR PUSH H CALL INADR POP B POP D XCHG HRM2 MOV A,M STAX B INX H INX B DCX D MVI A,0 CMP E JNZ HRM2 CALLLY FOR DEBUGING ; ; Console and List I/O port equates ; STAT EQU 3 DATA EQU 2 LSTSTAT EQU 1 LSTDAT EQU 0 IF SIO RxMASK EQU 0000$0001B TxMASK EQU 0000$0100B LISTMASK EQU 0010$1100B ENDIF IF I8251 RxMASK EQU 0000$0010B TxMASK EQU 0000$0001B LISTMASK EQU 1000$0101B ENDIF ; WAITX EQU 0FCH SECT EQU 0FAH DCOM EQU 0F8H DDATA EQU 0FBH DSTAT EQU 0F8H DENS EQU 0FDH ; ;**$ MACLIB Z80 ; IF DBUG ORG 080E ;WRITE TYPE CPI WRDIR ;TO DIRECTORY? MVI A,00 ;RETERN ERROR CODE FOR CPM RNZ ;NO FURTHER PROCESSING ; ; CLEAR BUFFER, DIRECTORY WRITES CANNOT WAIT XRA A ;0 TO ACCUM STA HSTWRT ;BUFFER WRITTEN STA UNACNT ; CALL AWRITE ; RET ; ENDIF ; if not mmpm NOBLK: LDA HSTACT ;IF SKIPPING DEBLOCK, NEED TO CLEAR BUFFER ORA A JZ NOWRITE ;NOTHING IN BUFFER LDA HSTWRT ;IS BUFFER WRITE TYPE DATA? ORA A MVI A,0 STA HSTACT ;IN ANY CASE, INACTVATE BUFFER JZ NOWRITE X< OHOH CMP D JNZ HRM2 RET INECO CALL INA CALL OUTA RET CRLF: MVI A,0DH CALL PRINT MVI A,0AH JMP PRINT ; TST1: MOV D,A CPI 48 JM ER1 CPI 71 JP ER1 CPI 58 JP LTR ANI 0FH TST2: MOV C,A MOV A,D STC RET LTR: CPI 65 JM ER1 ANI 0FH ADI 9 JMP TST2 ER1: ORA A RET ; INADR: LXI H,0000H CALL INH RNC MOV L,C MOV B,C CALL INH JNC REXIT CALL RLT CALL INH JNC REXIT MOV H,B MOV B,L CALL RLT CALL INH JNC REXIT MOV H,B CALL RLT REXI00H ELSE ORG 0F800H ENDIF ; PROM EQU $ JMP MONINZ ;INITIALIZE ROUTINE JMP MONTR ;MONITOR W/O INIZ JMP CONSTAT ;CONSOLE STATUS JMP CONIN ;CONSOLE INPUT (LOCAL PORT 'B') JMP CONOUT ;CONSOLE OUTPUT (LOCAL PORT 'B') JMP LIST ;LOCAL PORT 'A' JMP OUTHX ;BINARY TO HEX OUTPUT (CHAR IN 'B' REG) JMP ADOUT ;ADDRESS TO HEX OUT (IN H,L) JMP GETVERS ;GET VERS IN HL ; MONTR: LXI D,BACK1 JMP GETSTACK STARTX: EXX ;Z-80 EXX TO GET STACK ADRESS SPHL ;IT'S IN HL EXX?RA A STA HSTWRT ;BUFF WILL NOT CONTAIN WRITE DATA STA UNACNT LDA NEWDISK STA UNADSK LDA BUFDSK CALL SELOK CALL AWRITE LDA UNADSK ;WANT UNADSK TO KNOW WE'VE CHANGED DRIVES STA NEWDISK MOV C,A MVI A,0FFH STA UNADSK MOV A,C CALL SELOK NOWRITE: LHLD TRK ;SET UP FOR 128 BYTE DISK I.O. SHLD HSTTRK LHLD SECT SHLD HSTSEC LHLD DMAADD SHLD HSTDMA LDA READOP ORA A JNZ AREAD JMP AWRITE ; IF SKEW BLKTRANS: ; de has sector to translate LHLD TRK ; MOV A,Ln FOR statements for which a NEXT could not be found. PROGRAM CONTAINS n UNMATCHED WHILE STATEMENT(S) There are n WHILE statements for which a WEND could not be found. WARNING: INVALID CHARACTER IGNORED Th previou lin contain a invaxli ASCI character thi characte is ignored by the compiler, and a question mark is printed in its place.  o 2-Letter Error Codes CE -- Close Error The intermediate (.INT) file could not be closed. DE -- Dis[nted  Compiler/Interpreter BASIC   Language Facility for   CP/M Systems  February 17, 1978 :CBASIC: CBASIC Compile-Time Toggled Options Compile toggle ar serie o switche tha ca b se whe th compile i executed Th toggle ar se b typin dollar-sig ($ followe b th lette desigJnation o th desire toggle startin on spac o mor afte th pr -- Table Overflow Th progra i to larg fo th system Th progra mus b simplified or the system size increased. UL -- Undefined Line number A line number that does not exist has been referenced. US -- Undefined String A string has been terminated by a carriage return rather than quotes. VO -- Variable Overflow Variable names are too long for one statement. This should not occur. WE -- WHILE Error The expression immediately following a W k Error A disk error occurred while trying to read the .BAS file. DF -- Disk Full Ther wa n spac o th dis o th dis director wa full Th .INT file was not created. DL -- Duplicate Line number Th sam lin numbe wa use o tw differen lines Othe compile error ma caus D erro messag t b printe eve i duplicat lin numbers do not exist. DP -- Defined Previously A variable in a DIM statement was previously defined. EF -- Expon oogra nam o th comman line Toggle ma onl be set for the compiler. Examples of compiler toggles and invocation forms are --  CBASIC INVENTRY $BGF  B:CBASIC A:COMPARE $GEC  CBASIC PAYROLL $B  CBASIC B:VALIDATE $E  CBASIC Compiler Toggles TOGGL B Suppresse th listin o th progra o th consol durin compilation I a erro i detected th sourc lin wit th erro an th erro messag wil b pr HILE statement is not numeric. WU -- WHILE Undefined A WEND statement occurs without an associated WHILE statement. :CBASIC: Run-Time Error Messages -- Warnings Tw textua run-tim erro message ar presente b CRUN: NO INTERMEDIATE FILE fil nam wa no specifie wit th CRU command o n fil o typ .IN an th specifie fil nam wa foun o disk. IMPROPER INPUT - REENTER Thi messag occur whe th field entere fro th consol d no matc ential Format numbe i exponentia forma wa inpu wit n digit followin th E. FD -- Function Definition functio nam tha ha bee previousl define i bein redefine i a DEF statement. FI -- FOR Index A expressio whic i no a unsubscripte numeri variabl i bein used as a FOR loop index. FN -- Function parameter Number A function reference contains an incorrect number of parameters. FP -- Function Parameter type functio referenc  ]inte eve i Toggl i set Toggl doe not affect listing to the printer (Toggle F) or disk file (Toggle G). Toggle B is initially off. TOGGLŠ C Suppresse th generatio o a IN file Engagin thi toggl wil provid synta chec withou th overhea o writin th intermediat file. Toggle C is initially off. TOGGL D Suppresse translatio o lower-cas letter t upper-case Fo example i Toggl i on 'AMT wil no refe t th sam  th fiel specifie i th INPU statement Thi ca occu whe fiel type d no matc o th numbe o field entere i differen fro th numbe o field specified Al field specifie b th INPU statemen mus b reentered.  2-Letter Warning Codes DZ -- Divide by Zero numbe wa divide b zero Th resul i se t th larges vali CBASI number. FL -- Field Length fiel lengt greate tha 25 byte wa encountere durin*paramete typ doe no matc th paramete typ used in the function's DEF statement. FU -- Function Undefined A function has been referenced before it has been defined. IE -- IF Expression A expressio use immediatel followin a IƠ evaluate t typ string. Only type numeric is permitted. IF -- In File variabl use i FIL statemen i o typ numeri wher typ string is required. IP -- Input Prompt An input prompt string is not surroundekvariabl as 'amt'. Toggle D is initially off. TOGGLŠ E Cause th run-tim progra (CRUN t accompan an erro message wit th CBASI lin numbe i whic th erro occurred Toggl mus b se i orde fo th TRAC optio (se sectio 13. o th manual to work. Toggle E is initially off. TOGGLŠ F Cause th compile outpu listin t b printe o th LST: device in addition to the system console. Toggle F is initially off. TOGGLCBASIC in General CBASIC Compile-Time Toggled Options Compiler Error Messages Run-Time Error Messages -- Warnings Run-Time Error Messages -- Error Codes CBASIC Reserved Words :CBASIC: CBASIC in General CBASIà i compile BASI whic ma b execute o an flopp dis base CP/ syste havin a leas 20 byte o memory I orde t mak th bes us o th powe an flexibilit o CBASIC dua flopp dis syste an a leas 32 o memor i recommended I CBASI i d by quotes. IS -- Invalid Subscript A subscripted variable was referenced before it was dimensioned. IU -- Invalid Use A variable defined as an array is used with no subscripts. MF -- Mixed Format An expression evaluates to type string when type numeric is required. MM -- Mixed Mode Variable o typ strin an typ numeri ar combine i th sam expression. NI -- NEXT Index variabl reference b NEX statemen doe no matc th variabl refeŠ G Cause th compile outpu listin t b writte t diskette Th fil containin th compile listin ha th sam nam a the .BAS file, but its type is .LST. Toggle G is initially off. :CBASIC: Compiler Error Messages  Text Messages NO SOURCE FILE: .BAS Th compile coul no locat sourc fil use i eithe CBASI command or an INCLUDE directive. PROGRAM CONTAINS n UNMATCHED FOR STATEMENT(S) There are n execute in a system smaller than 20K, a CP/M LOAD ERROR may occur. Th CBASI syste consist o tw program -- CBASI an CRUN CBASI i th compiler an CRU i th run-tim intepreter I typica CBASI session th use wil writ th progra usin ED compil i usin CBASI (with the $B option to suppress listing), and run it using CRUN. Refer to the 84-page CBASIC manual --  C B A S I C  A Commercially Orieerenced by the associated FOR statement. NU -- NEXT Unexpected A NEXT statement occurs without an associated FOR statement. OO -- ON Overflow More than 25 ON statements were used in the program. SE -- Syntax Error The source line contains a syntax error. SN -- Subscript Number A subscripted variable contains an incorrect number of subscripts. SO -- Syntax Overflow Th expressio i to comple an shoul b simplifie an place o more than one line. TOc}---  A |  []| Serial  B |[]  | Port B (Right) [Terminal]  C |[]  | Set for  D |[]  | 9600 BAUD  |__ _|  X = O F F #O = O N Baud D C B A  Baud D C B A -------|---  --|--- 5 00  /1200 ( 07 ) 75 | O O O rite/ Baud rate generator 0C CTC chan 1 0D CTC chan 2 0E CTC chan 3 0F CTC CMD Th 825 ca b programme unde softwar contro t d numbe o things Th followin cod ca b use t initializ wha might` be a "normal" mode for the 8251. ( The chip must be initialized or it will do nothing. )   MVI A,0AAH ; Load A   OUT 03 ; Initialize Port B   OUT 01 ; Initialize Port A   MVI A,40H ;or A erro occurre whil creatin o extendin fil becaus th dis director wa full. MP -- MATCH Parameter Th thir paramete i MATC functio wa zer o negative. NF -- Number of FILE Th fil numbe specifie wa les tha o greate tha 20. NM -- No Memory There was insufficient memory to load the program. NN -- No Number field A attemp wa mad t prin numbe wit PRIN USIN statemen bu ther wa no numeri dat fiel i th ڽ X ( 01H ) 91800 | X O O O ( 08H ) 110 | O O X O ( 02H ) 92000 | X O O X ( 09H ) 134.5 | O O X X ( 03H ) 92400 | X O X O ( 0AH ) 150 | O X O O ( 04H ) 93600 | X O X X ( 0BH ) 300 | O X O X ( 05H ) 94800 | X X O O ( 0CH ) 60 06  %720 ( 0DH ) | %9600 | X X X O ( 0EH ) |  19200 | X X X X ( 0P Load A   OUT 03 ; With Internal Reset   OUT 01 ; Write to Both Ports  5 MVI A,4EH ; 1 Stop bit, no parity, 8 data bits   OUT 01 ; 16X clock   OUT 03 ;  4 MVI A,37H ; RTS = 1, reset errors, enable Rx,   OUT 01 ; DTR = 1, Tx enabled   OUT 03 ; Thi initializatio wil se u dat bits on sto bi an n parity You printer an terminal hav t b se KUSIN string. NS -- No String field A attemp wa mad t prin strin wit PRIN USIN statemen bu ther wa no strin fiel i th USIN string. OD -- Overflow Data REAĠ statemen wa execute wit n DAT available. OE -- OPEN Error A attemp wa mad t OPE fil tha didn' exis an fo whic n I EN statemen ha bee previousl executed. OI -- ON Index Th expressio specifie i a O .. GOSU o a OΠ .. GOT statemen ev [ REA LINE Onl th firs 25 character o th recor ar retained. LN -- Logarithm error Th argumen give i th LO functio wa zer o negative Th valu o th argumen i returned. NE -- NEgative number negativ numbe wa specifie followin th rais t powe operato (^) Th absolut valu i use i th calculation. OF -- OverFlow calculatio produce numbe to large Th resul i se o th larges vali CBASI number.  qu t receiv the same pattern. 825 Statu Flag (whe yo inpu statu port thi i wha byt will mean): Bit: 07 06 05 04 03 02 01 00 --E- DSR SY FE OE PE TXE RXR TXR <-Output bit (RDY when Hi)   A   |--bInput bit (RDY when Hi) .pa Ports for the Serial IO are: A Status = 1 A Data = 0 (on left)  / B Status = 3 B Data = 2 (on right) Th  ^aluate t numbe les tha o greate tha th numbe o lin number containe i th statement. OM -- Overflow Memory The program ran out of memory during execution. QE -- Quote Error A attemp wa mad t PRIN t fil strin containin quotatio mark. RE -- READ Error A attemp wa mad t rea pas th en o recor i fixe file. RG -- RETURN with no GOSUB A RETURN occurred for which there was no GOSUB. RU -- Random Undefined rand  SQ -- SQuare root error negativ numbe wa specifie i th SQ function Th absolut valu i used. :CBASIC: Run-Time Error Messages -- Error Codes AC -- AsCii error Th strin use a th argumen i a AS functio evaluate t nul string. CE -- Close Error An error occurred upon closing a file. CU -- Close Undefined file clos statemen specifie fil numbe tha wa no active. DF -- Defined File A OPE o CREAT wa specifie wit   positio DI switc a th lowe righ han corne o th boar i broke int tw bi sections Th uppe bit selec th IϠ bau fo th lef 825 an th lowe bit selec th bau fo th right W connec th lef 825 t th "A paddl car an th righ on t th "B paddl card Th paddl card ar mounte t th rea pane an mak strappin adjustment easier Th "A por i committe i th CP/ bio softwar t the printer, and the "B" port to the CRT T_o rea o prin wa attempte t othe tha fixe file. SB -- SuBscript A arra subscrip wa use whic exceede th boundarie fo whic th arra wa defined. SL -- String Length concatenatio operatio resulte i strin o mor tha 25 bytes. SS -- SubString error Th secon paramete o MID functio wa zer o negative. TF -- Too many Files A attemp wa mad t hav mor tha 2 activ file simultaneously. TL -- TAB Length TA stafil numbe tha wa alread active. DU -- Delete Undefined file DELET statemen specifie fil numbe tha wa no active. DW -- Disk Write error A erro occurre whil writin t file Thi occur whe eithe th director o th dis i full. EF -- End of File rea pas th en o fil occurre o fil fo whic n IƠ EN statemen ha bee executed. ER -- Error in Record A attemp wa mad t writ recor o lengt greate tha M]erminal. Th switche ar use i binar patter t se th rate a follows:  DIP  Switch    OFF ON   ___  A |[] | Serial  B |  []| Port A (Left) [Printer]  C |[] | Set for   D |  []| 300 BAUD   ---|---|-- then may be transferred from "B" to "A" with PIP. CPU INFO - Port assignments: 00 Channel "A" status (See status flag below) 01 Channel "A" data 02 Channel "B" status (See status flag below) 03 Channel "B" data 04 Parallel "A" data 05 Parallel "B" data 06 Parallel "C" data 07 Parallel command port 08 Memory management 09 Prom Toggle, 00 = on 01 = off 0A Boot prom disable 0B Read/ Baud rate switch Wth maximu recor siz specifie i th associate OPEN CREATE o FIL statement. FR -- File Rename A attemp wa mad t renam fil t a existin fil name. FU -- File Undefined A attemp wa mad t rea o writ t fil tha wa no active. IR -- Invalid Record number A record number less than one was specified. LW -- Line Width lin widt les tha o greate tha 13 wa specifie i a LPRINTE WIDT statement. ME -- MAKE Err+  2Gf 2Hfm\ڡ\!`]nG~2MfQ ʸ=&È 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $Z á $ W2Nf *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$   2Gf 2Hfm\ڡ\!`]nG~2MfQ ʸ=&È 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $Z á $ W2Nf *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$  NT STR$  AS #FEND LINE RANDOMIZE SUB  -ASC FILE LOG READ TAB  -ATN FOR LPRINTER RECL TAN  CALL FRE LT REM THEN  CHR$ GE MATCH REMARK TO  CLOSE GO MID$ RENAME USING  CONSOLE GOSUB NE RESTORE VAL  .COS GOTO NEXT RETURN WEND  CREATE GT NOT RIGHT$ WHILE  Oriented  Compiler/Interpreter BASIC   Language Facility for   CP/M Systems   Version 2  May 1, 1979 :CBASIC2: CBASIC2 Compile-Time Toggled Options Compile toggle ar serie o switche tha ca b se whe th compile i executed Th toggle ar se b typin dollar-sig ($ followe b th lette designation o th desire tog  2Gf 2Hfm\ڡ\!`]nG~2MfQ ʸ=&È 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $Z á $ W2Nf *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$   2Gf 2Hfm\ڡ\!`]nG~2MfQ ʸ=&È 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $Z á $ W2Nf *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$ w  DATA IF ON RND WIDTH  -DEF INP OPEN SGN XOR  DELETE INPUT OR SIN  $DIM INT OUT SIZE  ELSE LE PEEK SQR  $END LEFT$ POKE STEP , RESTORE VAL  .COS GOTO NEXT RETURN WEND  CREATE GT NOT RIGHT$ WHILE gle startin on spac o mor afte th progra nam o th comman line Toggle ma onl be set for the compiler. Examples of compiler toggles and invocation forms are --  CBAS2 INVENTRY $BGF  B:CBAS2 A:COMPARE $GEC  CBAS2 PAYROLL $B  CBAS2 B:VALIDATE $E  CBASIC Compiler Toggles TOGGL B Suppresse th listin o th progra o th consol durin compilation I a erro i detected th sourc lin wit t CBASIC in General CBASIC2 Compile-Time Toggled Options XREF Cross Reference Facility Compiler Error Messages Run-Time Error Messages -- Warnings Run-Time Error Messages -- Error Codes CBASIC2 Reserved Words CBASIC2 Expression Hierarchy CBASIC2 Predefined Functions :CBASIC2: CBASIC in General CBASIà i compile BASI whic ma b execute o an flopp dis base CP/ syste havin a leas 20 byte o memory I orde t mak th bes us o th powe an flexibilit o CBAS   2Gf 2Hfm\ڡ\!`]nG~2MfQ ʸ=&È 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $Z á $ W2Nf *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$   2Gf 2Hfm\ڡ\!`]nG~2MfQ ʸ=&È 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $Z á $ W2Nf *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$  ih erro an th erro messag wil b printe eve i Toggl i set Toggl doe not affect listing to the printer (Toggle F) or disk file (Toggle G). Toggle B is initially off. TOGGLŠ C Suppresse th generatio o a IN file Engagin thi toggl wil provid synta chec withou th overhea o writin th intermediat file. Toggle C is initially off. TOGGL D Suppresse translatio o lower-cas letter t upper-case Fo example i Toggl )IC dua flopp dis syste an a leas 32 o memor i recommended I CBASI i execute in a system smaller than 20K, a CP/M LOAD ERROR may occur. Th CBASI syste consist o tw program -- CBASI an CRUN CBASI i th compiler an CRU i th run-tim intepreter I typica CBASI session th use wil writ th progra usin ED compil i usin CBASI (with the $B option to suppress listing), and run it using CRUN. Refer to the 84-page CBASIC manual --   2Gf 2Hfm\ڡ\!`]nG~2MfQ ʸ=&È 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $Z á $ W2Nf *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$   2Gf 2Hfm\ڡ\!`]nG~2MfQ ʸ=&È 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $Z á $ W2Nf *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$  i on 'AMT wil no refe t th sam variabl as 'amt'. Toggle D is initially off. TOGGLŠ E Cause th run-tim progra (CRUN2 t accompan an erro message wit th CBASI lin numbe i whic th erro occurred Toggl mus b se i orde fo th TRAC optio (se sectio 13. o th manual t work. Toggle E is initially off. TOGGLŠ F Cause th compile outpu listin t b printe o th LST: device in addition to the system console. [}  C B A S I C  A Commercially Oriented  Compiler/Interpreter BASIC   Language Facility for   CP/M Systems  February 17, 1978 CBASIC i a upward-compatabl (i term o sourc code extensio o th origina CBASIC I additio t al o th feature o th origina CBASIC, CBASIC2 adds the following:  1. Integ  2Gf 2Hfm\ڡ\!`]nG~2MfQ ʸ=&È 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $Z á $ W2Nf *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$   2Gf 2Hfm\ڡ\!`]nG~2MfQ ʸ=&È 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $Z á $ W2Nf *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$ !temen containe paramete les tha o greate tha th curren lin width. UN -- UNdefined edit string PRIN USIN statemen wa execute wit nul edi string. WR -- WRite error A attemp wa mad t writ t fil afte oi ha bee read bu befor i ha bee rea t th en o th file. :CBASIC: CBASIC Reserved Words  CBASIC Reserved Words  ABS EQ LEN POS STOP  !AND EXP LET PRIer variables  $2. Chaining with common variables  &3. Additional pre-defined functions  4. Cross Reference capability Not tha CBASIC i upward-compatabl wit CBASI onl i term o th sourc cod files A IN fil create unde CBASI wil no execut with the Version 2 Run-Time Monitor (CRUN2). For further info6rmation, refer to the 100-page reference manual --  C B A S I C  A Commercially  th dis an permit outpu t th list device; same as A and B combined. Toggle D: Causes output to be 80 columns wide instead of 132. Toggle E: Produces output with only the identifiers and their usage. Fo example mth followin comman produce cros referenc listin on the list device which is 80 columns wide --  5 XREF PROG $CD :CBASIC: Compiler Error Messages  # Text Messages NO SOURCE FILE: {number of subscripts. SO -- Syntax Overflow Th expressio i to comple an shoul b simplifie an place o more than one line. TO -- Table Overflow Th progra i to larg fo th system Th progra mus b simplified or the system size increased. UL -- Undefined Line number A line number that does not exist has been referenced. US -- Undefined String A string has been terminated by a carriage return rather than quotes. VO -- Variable Overflow Geviousl define i bein redefine i a DEF statement. FE -- FOR Error mixe mod expressio exist i FO statemen whic th compile cannot correct. FI -- FOR Index A expressio whic i no a unsubscripte numeri variabl i bein used as a FOR loop index. FN -- Function parameter Number A function reference contains an incorrect number of parameters. FP -- Function Parameter type functio referenc paramete typ doe no matc th paramete typ.BAS Th compile coul no locat sourc fil use i eithe CBASI command or an INCLUDE directive. PROGRAM CONTAINS n UNMATCHED FOR STATEMENT(S) There are n FOR statements for which a NEXT could not be found. PROGRAM CONTAINS n UNMATCHED WHILE STATEMENT(S) There are n WHILE statements for which a WEND could not be found. WARNING: INVALID CHARACTER IGNORED Th previou lin contain a invali ASCI character thi characte is ignored by the compile Toggle F is initially off. TOGGLŠ G Cause th compile outpu listin t b writte t diskette Th fil containin th compile listin ha th sam nam a the .BAS file, but its type is .LST. Normall th dis listin wil b place o th sam sourc driv a th sourc file Th operato ma selec anothe driv b specifyin th desired drive, enclosed in parens, following the G toggle; for example,  CBAS2 B:TAX $G(A:) extract  used in the function's DEF statement. FU -- Function Undefined A function has been referenced before it has been defined. IE -- IF Expression A expressio use immediatel followin a IƠ evaluate t typ string. Only type numeric is permitted. IF -- In File variabl use i FIL statemen i o typ numeri wher typ string is required. IP -- Input Prompt An input prompt string is not surrounded by quotes. IS -- Invalid Subscript A r, and a question mark is printed in its place. OUT OF DISK SPACE Th compile ha ru ou o dis spac whil attemptin t writ either the INT or LST files.  Text Messages (Con't) OUT OF DIRECTORY SPACE Th compile ha ru ou o director entrie whil attemptin t create or extend a file. DISK ERROR A disk error occurred while trying to read or write to a disk file. INCLUDE NES2TING TOO DEEP NEAR LINE n A includ states the source from drive B: and sends the listing to drive A:. Toggle G is initially off. :CBASIC2: XREF Cross Reference Facility Th XREF.CO͠ Cros Referenc utilit progra produce fil whic contain a alphabetize lis o al identifier use i CBASIà program Th usag o th identifie (function parameter o global i provided a wel a lis o eac lin i whic tha identifie i used Th fil create ha th sam nam a th CBASI sourc fil an i subscripted variable was referenced before it was dimensioned. IT -- Invalid Toggle An invalid compiler directive was encountered. IU -- Invalid Use A variable defined as an array is used with no subscripts. MF -- Mixed Format An expression evaluates to type string when type numeric is required. MM -- Mixed Mode Variable o typ strin an typ numeri ar combine i th sam expression. MS -- Mixed String A numeric expression was used where a string exprgmen nea lin i th sourc progra exceed th maximum level of nesting of source files.  2-Letter Error Codes BF -- Branch into Function A branch into a multiple line function from outside was attempted. BN -- Bad Number An invalid numeric constant was encountered. CE -- Close Error The intermediate (.INT) file could not be closed. CI -- Close Include An invalid file name in an %INCLUDE statement. CS -- COMMON Statement error to typ XRF The standard output is 132 columns wide. The following command is used to invoke XREF --  XREF [disk ref] [$] ['title'] I th dis referenc i specified i instruct XRE a t wha dis to place the output on. The toggles are described on the next display. Th optiona titl fiel mus b th las fiel i th comman line Al character followin th firs apostroph o th comman lin u t th secon apostrophession is required. ND -- No DEFFN A FEND statement was encountered without a corresponding DEF. NI -- NEXT Index variabl reference b NEX statemen doe no matc th variabl referenced by the associated FOR statement. NU -- NEXT Unexpected A NEXT statement occurs without an associated FOR statement. OF -- Out of Function branc ou o multipl lin functio fro insid th functio wa attempted. OO -- ON Overflow More than 25 ON statements w 4 COMMO statemen whic wa no th firs statemen i th progra wa detected. CV -- COMMON Variable error An improper reference to a subscripte variable in a COMMON statement. DE -- Disk Error A disk error occurred while trying to read the .BAS file. DF -- Disk Full Ther wa n spac o th dis o th dis director wa full Th .INT file was not created. DL -- Duplicate Line number Th sam lin numbe wa use o tw differen lines Othe compi  o unti th en o th comman lin becom th title Th titl i truncate t 3 character i th listin i 13 column wid and 20 characters if the D toggle (80 column listing) is specified.  XREF Toggles Toggl A Cause th listin t b otpu t th lis devic a wel as the disk file. Toggl B Suppresse outpu t th disk I onl th toggl i specified, no output is produced. Toggl C Suppre sse outpu t Xere used in the program. PM -- ?? DE statemen appeare withi multipl lin function Function may not be nested. SE -- Syntax Error The source line contains a syntax error. SF -- SAVEMEM File SAVEME statemen use a expressio o typ numeri t specif th fil t b loaded Thi expressio mus b string Possibl th quotation marks were left off a string constant. SN -- Subscript Number A subscripted variable contains an incorrect  <le error ma caus D erro messag t b printe eve i duplicat lin numbers do not exist. DP -- Defined Previously A variable in a DIM statement was previously defined. EF -- Exponential Format numbe i exponentia forma wa inpu wit n digit followin th E. FA -- Function Attribute functio nam appear o th lef sid o a assignmen statemen but is not within that function. FD -- Function Definition functio nam tha ha bee pr9  th calculation. OF -- OverFlow calculatio produce numbe to large Th resul i se o th larges vali CBASI number. SQ -- SQuare root error negativ numbe wa specifie i th SQ function Th absolut valu i used. :CBASIC: Run-Time Error Messages -- Error Codes AC -- AsCii error Th strin use a th argumen i a AS functio evaluate t nul string. BN -- BUFF Number Th valu followin th BUF optio i a OPE o CREAT  . DELETE DIM ELSE END EQ =EXP FEND FILE FOR FRE GE GO GOSUB GOTO GT >IF INITIALIZE INP INPUT INT INT% LE ?LEFT$ LEN LET LINE LOG LPRINTER LT MATCH MID$ NE NEXT NOT ON OPEN OR OUT PEEK POKE POS PRINT RANDOMIZE READ RECL RECS REM REMARK RENAME RESTORE RETUR M -- No Memory There was insufficient memory to load the program. NN -- No Number field A attemp wa mad t prin numbe wit PRIN USIN statemen bu ther wa no numeri dat fiel i th USIN string. NS -- No String field A attemp wa mad t prin strin wit PRIN USIN statemen bu ther wa no strin fiel i th USIN string. OD -- Overflow Data REAĠ statemen wa execute wit n DAT available. OE -- OPEN Error A attemp wa statemen i less than 1 or greater than 52. CC -- Chain Code chaine program' cod are i large tha th mai program' cod area. CD -- Chain Data chaine program' dat are i large tha th mai program' dat area. CE -- Close Error An error occurred upon closing a file. CF -- Chain Function chaine program' constan are i large tha th mai program' constant area. CP -- Chain Var Storage chaine program' variabl storaN RIGHT$ RND SADD SGN SIN SIZE SQR STEP STOP STR$ SUB TAB TAN THEN TO UCASE$ USING VAL WEND WHILE WIDTH XOR :CBASIC2: Expression HierarchEy The Hierarchy for expression evaluation is a follows --  1. nested parentheses ()  2. power operator ^  3. * /  %4. + - concatenation[+] unary[+ -]  5. relational operators:   < mad t OPE fil tha didn' exis an fo whic n I EN statemen ha bee previousl executed. OI -- ON Index Th expressio specifie i a O .. GOSU o a OΠ .. GOT statemen evaluate t numbe les tha o greate tha th numbe o lin number containe i th statement. OM -- Overflow Memory The program ran out of memory during execution. QE -- Quote Error A attemp wa mad t PRIN t fil strin containin quotatio mark. Rg are i large tha th mai program's variable storage area. CS -- Chain SAVEMEM chaine progr reserve differenc amoun o memor wit SAVEME statement than the main program. CU -- Close Undefined file clos statemen specifie fil numbe tha wa no active. DF -- Defined File A OPE o CREAT wa specifie wit fil numbe tha wa alread active. DU -- Delete Undefined file DELET statemen specifie fil numbe tha wa no activ Variable names are too long for one statement. This should not occur. WE -- WHILE Error The expression immediately following a WHILE statement is not numeric. WU -- WHILE Undefined A WEND statement occurs without an associated WHILE statement. :CBASIC: Run-Time Error Messages -- Warnings Tw textua run-tim erro message ar presente b CRUN: NO INTERMEDIATE FILE fil nam wa no specifie wit th CRU command o n fil o typ .IN an th speB -- Random BUFF Rando acces wa attempte t fil activate wit th BUFƠ optio specifying more than 1 buffer. RE -- READ Error A attemp wa mad t rea pas th en o recor i fixe file. RG -- RETURN with no GOSUB A RETURN occurred for which there was no GOSUB. RU -- Random Undefined rando rea o prin wa attempte t othe tha fixe file. SB -- SuBscript A arra subscrip wa use whic exceede th boundarie fo whic th arrae. DW -- Disk Write error A erro occurre whil writin t file Thi occur whe eithe th director o th dis i full. EF -- End of File rea pas th en o fil occurre o fil fo whic n IƠ EN statemen ha bee executed. ER -- Error in Record A attemp wa mad t writ recor o lengt greate tha th maximu recor siz specifie i th associate OPEN CREATE o FIL statement. FR -- File Rename A attemp wa mad cifie fil nam wa foun o disk. IMPROPER INPUT - REENTER Thi messag occur whe th field entere fro th consol d no matc th fiel specifie i th INPU statement Thi ca occu whe fiel type d no matc o th numbe o field entere i differen fro th numbe o field specified Al field specifie b th INPU statemen mus b reentered.  R 2-Letter Warning Codes DZ -- Divide by Zero numbe wa divide b zero wa defined. SL -- String Length concatenatio operatio resulte i strin o mor tha 25 bytes. SO -- SAVEMEM Th fil specifie i SAVEME statemen coul no b locate o th referenced disk. SS -- SubString error Th secon paramete o MID functio wa zer o negative. TF -- Too many Files A attemp wa mad t hav mor tha 2 activ file simultaneously. TL -- TAB Length TA statemen containe paramete les tha o greate that renam fil t a existin fil name. FT -- File Toggle A FILE statement was executed when 20 files were already active. FU -- File Undefined A attemp wa mad t rea o writ t fil tha wa no active. IF -- Invalid File name A file name was invalid. IR -- Invalid Record number A record number less than one was specified. IV -- Invalid Version A attemp wa mad t execut a IN fil create b Versio Compiler. IX -- ?? FE Th resul i se t th larges vali CBASI number. FL -- Field Length fiel lengt greate tha 25 byte wa encountere durin REA LINE Onl th firs 25 character o th recor ar retained. LN -- Logarithm error Th argumen give i th LO functio wa zer o negative Th valu o th argumen i returned. NE -- NEgative number negativ numbe wa specifie followin th rais t powe operato (^) Th absolut valu i use i th curren lin width. UN -- UNdefined edit string PRIN USIN statemen wa execute wit nul edi string. WR -- WRite error A attemp wa mad t writ t fil afte i ha bee read bu befor i ha bee rea t th en o th file. :CBASIC: CBASIC Reserved Words ABS AND AS ASC ATN BUFF CALL CHAIN CHR$ CLOSE COMMAND$ COMMON CONCHAR% CONSOLE CONSTAT% COS CREATE DATA DEF  ONĠ statemen wa encountere prio t executin RETUR statement. LW -- Line Width lin widt les tha o greate tha 13 wa specifie i a LPRINTE WIDT statement. ME -- MAKE Error A erro occurre whil creatin o extendin fil becaus th dis director wa full. MP -- MATCH Parameter Th thir paramete i MATC functio wa zer o negative. NF -- Number of FILE Th fil numbe specifie wa les tha o greate tha 20. N> i%) RND SGN(x)  ATN(x) COS(x)  EXP(x) # LOG(x) [e] SIN(x) SQR(x) TAN(x)  ! String Functions ASC(a$) uCHR$(i%) LEFT$(a$,i%) LEN(a$) UCASE$(a$) MATCH(a$,b$,i%) MID$(a$,i%,j%) RIGHT$(a$,i%) STR$(x) VAL(a$) COMMAND$ SADD(a$)  5Disk Functions RENAME(a$,b$) SIZE(a$)  User-Defined Functions  For example, A>cc1 foobar.c -s6 supresses errors for undefined variables and sets symbol table size to 6K bytes; A>cc1 zot.c -e sets symbol table size to 14K bytes. Note that the option list must contain no blanks. A>cc1 b:td.c takes the source file from disk B and writes the .CCI file to disk B (regardless of what the currently logged disk is.) On an 8080, speed is about 12 lines source/sec. :Overview -- C Compiler, Pass 2 CC2: This is the second half of the compile pInvoking BDS C using C.SUB Overview of the BDS C Language System Overview -- C Compiler, Pass 1 Overview -- C Compiler, Pass 2 Overview -- C Linker Overview -- C Librarian Overview -- C Skeleton File Variable Types Braces Variable Accessing ARIES-1 C Library Special I/O using CIO :Invoking BDS C using C.SUB BDӠ à ma b invokin eithe b th conventiona mean o b usin th SUBMI fil C.SUB I th SUBMI fil i used i i engaged as follows -- SUBMIT  Or The general forms are -- [] DEF [] = and  8[] DEF []   .   .   .  [] FEND  6 Disk Functions RENAME(a$,b$) SIZE(a$)  User-Defined Functions  8r. CC2 accepts a ".CCI" file as input, and writes out a ".CRL" file if no errors are detected. (CRL is mnemonic for 'C ReLocatable') If all goes well, writing out of the CRL file is followed by deletion of the "CCI" file, and compilation is complete. As for CC1, if a disk is specified explicitly as in A>cc2 c:yahoo then the .CCI file is loaded from the specified disk and the .CRL file is written to that same disk. On an 8080, execution time = about 35 lines/sec. :Overview - C filename wher 'filename i th nam o 'filename.C' th fil t compile Not tha th use i NO t t typ filename.C bu i jus t typ filename. A executio o th tw passe o th compile an th linke proceeds th use wil b give th chanc t abor processin a variou critica point i th proces b th executio o th ABORTSU  program I a erro ha occurre durin th previou processing, ABORT when this program is execute i- C Linker CLINK: This program links a "main" function from some CRL file together with C.CCC (for common system subroutines) and any subordinate functions which "main" may require (from perhaps many CRL files). A successful linkage causes a ".COM" file to be generated. At this point, the 8080 absolute machine code file is ready to be executed (for better or worse) as a transient command by CP/M. The first argument on the command line must be the name of a CRL file containing a "maid. :Overview of the BDS C Language System The main components of C are: 4 executable programs, a standard library file, and one skeleton run-time subroutine file. A description of each follows: :Overview -- C Compiler, Pass 1 CC1: Because C loads the entire source file into memory in one shot, the compilation is broken up into two phases (not "passes", strictly; The two phases end up taking about 8 passes to actually implement), maximizing the amount of memory available for the s! <= > >= = <> LT LE GT GE EQ NE  6. NOT  7. AND  /8. OR XOR :CBASIC2: Predefined Functions  ` I/O Functions CONSTAT - Return th consol statu a a integer I ready logica  VTRUE is returned. CONCHAR% - Reads one character from the console device.  ,Machine-Language Functions PEEK ()  D- Return th content o th memor locatio give b th  expresource file. CC1, the first half of the compiler, accepts a C source file with any filename and extension (say, "foo.c") and writes out a temporary file (with the same filename and extension ".CCI") containg a symbol table and an encoded form of the source code. The file extension ".C" is NOT assumed for the input file, so saying "FOO" for "FOO.C" would not work. If the source file name is preceded by a disk designation, then the input is taken from the specified disk and the ouphsion. POKE ,  D- Low-orde eigh bit o secon expressio ar store i memor  6location selected by first expression. CALL  V- CALL a machine language program at address specified. SAVEMEM ,  t- Reserv into the reserved area.   Numeric Functions FRE ABS(x)  INT(x)  INT%(x) FLOAT(ut is also written to that disk. If any errors are detected during CC1, the output file will not be written. In addition to the name of the source file, a few options may also be specified on the command line by preceding the option list with a dash (-): s causes undeclared identifiers to be implicitly declared as integer variables, wherever possible. hex digit (4-f) sets symbol table size to the specified value (in K bytes); default is 8 (5 for versions x.xT.)   the .COM file is to be written to. Both of these values, if omitted, default to the currently logged in disk. The first argument may also be preceded by a disk designation, to specify where all .CRL files are to be searched for (by default). For example, the command A>clink b:zot.ac tells CLINK to get C.CCC and DEFF.CRL from disk A; to write the ouput file to disk C; and to find ZOT.CRL on disk B. Any other CRL files to search may also be specified on the command line (WITHOUT t UOLE ; ; INPUT ADDR,BUFLEN ; ; ADDR START OF TEXT BUFFER ; BUFLEN LENGTH OF BUFFER (DEFAULT IS 127) ; INPUT MACRO ADDR,BUFLEN MVI C,10 IF NOT NUL ADDR LXI D,ADDR ;;SET BUFFER ADDRESS ENDIF IF NOT NUL BUFLEN MVI A,BUFLEN ;;SET BUFFER vLENGTH STAX D ELSE MVI A,127 STAX D ;;SET BUFFER DEFAULT MAXIMUM ENDIF CALL 5 ;;BDOS ENTRY ENDM ; ; . U. ; ; PRINT MACRO PRINT A STRING ON CONSOLE ; ; PRINT (CARRIAGE RETURN, LINE F \ are assumed to reside on the currently logged in disk; output also goes to the currently logged in disk. A>clink b:ihtfp.aa -s belle -o zot is the same as the last example except: the output file is called ZOT.COM, DEFF.CRL and C.CCC are assumed to reside on A, and output goes to A. A>clink stoned -t7000 -s sets top of memory to 7000h and prints out load statistics. Current disk used for everything. Note that if the load statistics tell you that the "LAST ADDRESS" is greate 'heir .CRL suffixes), causing those to be searched in the order specified. The default disk to search will be the same disk from which the original CRL file was taken; this default can be overridden by specifying an explicit disk designation for any appropriate CRL file name needing it. For example, A>clink c:foo.bb bar a:zot fraz causes disk C to be searched for the files FOO.CRL, BAR.CRL and FRAZ.CRL, while disk A would be searched to find ZOT.CRL. Disk B is where CLINK would expect EED) ; PRINT 'LITERAL' ; PRINT <'LITERAL',CR,LF,'SECOND LITERAL'> ; ; PRINT ADDR,$ (ASCII OUTPUT UNTIL $) ; PRINT ADDR,L,H (HEX OUTPUT L CHARACTERS) ; PRINT ADDR,L,A (ASCII OUTPUT L CHARACTERS) ; ; LITERALS MUST BE IN SINGLE QUOTES 'LIT' ; IF LITERAL CONTAINS CONTROL CODES ENTIRE STRING IN <> BRACKETS ; MACRO ALSO ASSEMBLES ; CR = CARRIAGE RETURN ; LF = LINE FEED ; BEL = BELL CODE ; ; MACRO ASSUMES ADDR ALREADY LOADED TO HL IF ARGUMENT OMITTED ; PRINT MACRO ?STRING,LEN,TC L =; -- NEW MACRO LIBRARY -- ; ; BY S. J. SINGER ; REVISION - FEB 1981 ; ; ; SAVE MACRO SAVE SPECIFIED REGISTERS ; ; SAVE R1,R2,R3,R4 ; ; R1-R4 MAY BE B,D,H OR PSW SAVED IN ORDER SPECIFIED ; IF REGS ARE OMITTED SAVE B,D AND H ; SAVE MACRO R1,R2,R3,R4 IF NOT NUL R1&R2&R3&R4 IRP R,<,,,> IF NUL R EXITM ENDIF PUSH R ENDM ELSE IRPC REG,BDH PUSH REG ENDM ENDIF ENDM ; ; . . ; ; RESTORE MACRO RE DEFF.CRL and C.CCC to reside, and the output would go to disk B also. When all given CRL files have been searched, CLINK will automatically search DEFF.CRL. If there are still some unresolved references, then CLINK will ask for input from the keyboard to try resolving them. There are also several options which may be specified on the command line. Each option must be preceded by a dash (-); the space between options and their argument (if needed) is optional. The presently sup OCAL @OVER,@MESS,PLOOP,PASTCR,@CRLF CR SET 0DH LF SET 0AH BEL SET 07H IF NUL ?STRING&LEN&TC JMP PASTCR @CRLF: DB CR DB LF DB '$' PASTCR: LXI D,@CRLF MVI C,9 CALL 5 ELSE IF NUL LEN&TC JMP @OVER @MESS: DB ?STRING DB '$' @OVER: LXI D,@MESS MVI C,9 CALL 5 ;;BDOS ENTRY ELSE IF NUL TC IF NOT NUL ?STRING LXI D,?STRING ;;POINTER TO STRING ENDIF MVI C,9 CALL 5 ;;BDOS ENTRY ELSE IF NOT NUL ?STRING LXI H,?STRING ;;POINTER TO STRING ENDIF MVI C,LEN ;;LENGTH OF S 6STORE REGISTERS (INVERSE OF SAVE) ; ; RESTORE R1,R2,R3,R4 ; ; R1-R4 MAY BE B,D,H OR PSW RESTORED IN ORDER SPECIFIED ; IF REGS OMITTED RESTORE H,D AND B ; RESTORE MACRO R1,R2,R3,R4 IF NOT NUL R1&R2&R3&R4 IRP R,<,,,> IF NUL `R EXITM ENDIF POP R ENDM ELSE IRPC REG,HDB POP REG ENDM ENDIF ENDM ; ; ; . k. ; ; SAV MACRO SAVE REGISTERS B,D AND H ; SAV MACRO PUSH B PUSH D PUSH H ENDM ; ; ; . . . . ported options are: -s Prints out load statistics; -t nnnn Reserves location nnnn (hex) and above for user; default is to reserve no space. What this really does is to cause the first op in the object file to be lxi sp,nnnn instead of lxi sp,bdos. -o name Causes the .COM file generated to have the given name. Default is the name of the first .CRL file given (the one with the "main" function.) -e xxxx Sets start of data area to address xxxx TRING PLOOP: PUSH B PUSH H IF TC=H MOV A,M ;;GET A BYTE HEXOUT ;;CONV TO HEX & OUTPUT ELSE MOV E,M ;;GET A BYTE MVI C,2 ;;OUT FROM E CALL 5 ENDIF POP H POP B INX H DCR C ;;DECR LENGTH JNZ PLOOP ;;CONTINUE TILL LEN 0 E"NDIF ENDIF ENDIF ENDM ; ; . . ; ; HEXOUT MACRO CONVERT BINARY NO AND OUTPUT TO CONSOLE ; ; HEXOUT ADDR ; ; NUMBER ASSUMED IN A IF NO ARGUMENT ; HEXOUT MACRO ADDR LOCAL OUTCHR,HEXEND JM  .{ ; ; ; RES MACRO RESTORE REGISTERS H,D, AND B (INVERSE OF SAV) ; RES MACRO POP H POP D POP B ENDM ; ; ; ; . . ; ; CHARIN MACRO CONSOLE INPUT TO A ; ; CHARIN ADDR ; CHARIN MACRO ADDR MVI C,1 ;;CONSOLE INPUT CALL 5 ;;CALL BDOS IF NOT NUL ADDR STA ADDR ENDIF ENDM ; ; ; . ... ... . .. 2. ; ; CHAROUT MACRO CONSOLE OUTPUT FROM A ; ; , to maintain consistency between several separate .COM files when chaining (via the library function "exec") is used. -c Specifies that the .COM file is to be chained to from another .COM file. If the resultant .COM file is invoked directly from CP/M instead of via the "exec" function, then ARGC & ARGV processing is suspended, since upon being chained to you wouldn't want ARGC & ARGV processing to take place. Note that if you use this option, you should a n" function. If the name is specified with an extension, then that extension is interpreted specially as indicating which disks are to be involved in the operation (this is akin to the mechanism ASM uses to determine source and destination disks.) For example, if the first argument to CLINK were given as: A>clink foo.bc then CLINK would interpret the "b" in ".bc" as specifying the disk on which "DEFF.CRL" and "C.CCC" are to be found, and the "c" in ".bc" as specifying which disk 1CHAROUT ADDR ; CHAROUT MACRO ADDR IF NOT NUL ADDR LDA ADDR ENDIF MVI C,2 ;;CONOUT MOV E,A ;;CHAR TO E CALL 5 ;;CALL BDOS ENDM ; ; . . ; ; CHARSTAT MACRO CHECK CONSOLE STATUS ; ; RETURN TRUE (FF) IF CHAR READY FALSE (0) IF NOT ; CHARSTAT MACRO LOCAL EXIT MVI C,11 CALL 5 ORA A JZ EXIT MVI A,0FFH EXIT: ENDM ; ; . 4. ; ; INPUT MACRO INPUT CHARACTER STRING FROM CONS (lso use the -e option to set the data area address equal to that of the chaining .COM file. Examples: A>clink foo bar gets "main" from the file FOO.CRL, searches for needed functions first in FOO.CRL and then, if needed, in BAR.CRL and DEFF.CRL. All files are assumed to reside on the currently logged in disk. A>clink b:ihtfp belle -s searches for IHTFP.CRL and BELLE.CRL on disk B; prints a statistics summary when linkage is complete. The files DEFF.CRL and C.CCC!P!8P HEXEND HEXPRN: PUSH PSW RRC RRC RRC RRC ;;SHIFT RIGHT 4 CALL OUTCHR POP PSW OUTCHR: ANI 0FH ;;MASK 4 BITS ADI 90H ;;ADD OFFSET DAA ;;DEC ADJUST ACI 40H ;;ADD OFFSET DAA ;;DEC ADJUST MOV E,A ;;TO E FOR OUTPUT MVI C,2 ;;CONOUT JMP 5 ;;CALL BDOS HEXEND: HEXOUT MACRO ?ADDR IF NOT NUL ?ADDR LDA ?ADDR ENDIF CALL HEXPRN ENDM HEXOUT ADDR ENDM ; ; . 9. ; ; HEXIN MACRO CONVERT A NUMBER IN MEMORY FROM HEX T!H,START ;;LOAD START ADDR IF NOT NUL STOP IF BLKLEN > 255 LXI B,BLKLEN ;;LOAD BLOCK LENGTH ELSE MVI C,BLKLEN ENDIF IF NOT NUL CONST MVI E,CONST ;;LOAD CONST IF NOT NULL ELSE MVI E,0 ENDIF @FILL: MOV M,E ;;STORE A BYTE INX H ;;INCR MEMORY POINTER IF BLKLEN > 255 DCX B ;;DECR COUNT MOV A,C ;;TEST LIMIT ORA B JNZ @FILL ;;CONTINUE ELSE DCR C JNZ @FILL ENDIF ELSE IF NUL CONST MVI M,0 ;;STORE A ZERO ELSE MVI M,CONST ;;STORE SINGLE BYTE ENDIF ENDIF !EST FOR ZERO CNZ @DECOUT1 ;;RECURSIVE CALL MOV A,E ADI '0' ;;CONVERT FROM BCD TO HEX MOV C,A ;;TO E FOR OUTPUT CALL CONOUT POP H ;;POP STACK POP D POP B RET ENDDEC1: DECOUT1 MACRO ?ADDR IF NOT NUL ?ADDR LHLD ?ADDR ENDIF CALGL @DECOUT1 ;;CALL THE SUBROUTINE ENDM DECOUT1 ADDR ENDM ; ; ; . . ; ; DECIN MACRO CONVERT A NUMBER IN MEMORY FROM ASCII TO BINARY ; ; DECIN ADDR ; ; ADDR POINTS TO MEMORY LOCATION OF START !O BINARY ; ; IF NO ARGUMENT MACRO ASSUMES ADDR OF HEX STRING IN HL ; ANSWER LEFT IN HL WITH LEAST SIGNIFICANT 8 BITS IN A ; CARRY SET ON NON HEX DIGIT OTHER THAN SPACE OR ZERO. ; CONVERSION STOPS ON SPACE OR ZERO. ; HEXIN MACRO ADDR LOCAL IN1,IN2,OVERSUB JMP OVERSUB @HEXIN LXI H,0 ;;ZERO NUMBER IN1: LDAX D ;;GET A CHAR ORA A RZ ;;RETURN IF ZERO IN FIELD CPI 20H ;;SPACE WORKS TOO RZ SUI '0' ;;CHECK < 0 AND CONVERT TO HEX RC ;;RETURN, CHAR < 0 FOUND ADI '0'-'G' ;;CH!i ENDM ; ; . . ; ; ; MATCH MACRO COMPARE 2 STRINGS OF SAME LENGTH SET CARRY IF EQUAL ; ; MATCH STR1,'LITERAL STRING' ; MATCH STR1,STR2,LENGTH ; MATCH ; ; DE POINTS TO STR1 MACRO WILL LOAD REG IF ARG ; HL POINTS TO STR2 PRESENT ; C CONTAINS LENGTH ; ; SUBTRACT STR2 FROM STR1 AND SET FLAGS, ZERO INDICATES MATCH. ; NORMALLY THE SECOND ARG IS A LITERAL STRING AND THE LENGTH ; IS OMITTED. IF THE LEN ARG IS PRESENT THE SECOND STRING ; AR!OF NO, IF ; ARG OMITTED POINTER ASSUMED LOADED TO HL ; MACRO RETURNS WITH CARRY SET IF ALPHABETIC CHAR FOUND ; CONVERSION STOPS WHEN CHAR LESS THAN ZERO IS FOUND. ; BINARY NUMBER IS LEFT IN HL, MAXIMUM 65,767 ; LEAST SIGNIFICANT 8 BITS OF NUMBER IN A. ; DECIN MACRO ADDR LOCAL DLOOP,OVERSUB JMP OVERSUB @DECIN: LXI D,0 ;;ZERO DE XCHG ;;ADDR POINTER TO DE, ZERO TO HL DLOOP: LDAX D ;;GET A ASCII DIGIT SUI '0' ;;CONVERT TO BCD AND TEST ANA A ;;RESET CARRY RM ;;TERMINATE CONVERSI!NECK > F RC ADI 6 JP IN2 ;;NO BETWEEN A AND F ADI 7 RC IN2: ADI 10 ORA A ;;CLEAR CARRY MOV C,A ;;HEX DIGIT TO C MVI B,0 ;;ZERO TO B DAD H DAD H DAD H DAD H ;;SHIFT LEFT 4 DAD B ;;ADD IN NEW DIGIT INX D ;;INCR BUFFER POINTER JMP IN1 ;;RETURN FOR MORE INPUT OVERSUB: HEXIN MACRO ?ADDR IF NOT NUL ?ADDR LXI D,?ADDR ;;LOAD BUFFER ADDR ELSE XCHG ENDIF CALL @HEXIN MOV A,L ;;LEAST SIGNIFICANT 8 BITS TO A ENDM HEXIN ADDR ENDM ; ;  . !G IS ASSUMED TO BE A MEMORY ADDR. IF ALL ARGUMENTS OMITTED ; REGISTERS ASSUMED ALREADY LOADED. ; MATCH MACRO STR1,STR2,LEN LOCAL OVERSUB,M1 JMP OVERSUB @MATCH: INR C ;;PRE INCREMENT COUNT (IT MIGHT BE ZERO) M1: DCR C ;;DECR LENGTH COUNT RZ ;;RETURN IF MATCH FOUND LDAX D ;;GET A BYTE FROM ONE STRING SUB M ;;COMPARE WITH OTHER RNZ ;;RETURN INX H INX D ;;INCR STRING POINTERS JMP M1 ;;TRY SOME MORE OVERSUB: MATCH MACRO ?STR1,?STR2,?LEN LOCAL LITSTR,ENDLIT IF NUL ?STR1&?ST! ON IF < ZERO CPI 10 ;;CHECK LEGITIMATE DIGIT (0-9) CMC ;;COMPLEMENT CARRY RC ;;RET WITH CARRY SET IF ERROR INX D ;;INCR ADDR POINTER DAD H ;;SHIFT LEFT 1 PUSH H ;;SAVE RESULT DAD H DAD H ;;SHIFT LEFT 2 POP B ;;NO * 2 TO B DAD B ;;HL NOW CONTAINS 10*NO MOV C,A ;;ADD PRODUCT TO DIGIT MVI B,0 DAD B JMP DLOOP ;;BACK FOR ANOTHER DIGIT OVERSUB: DECIN MACRO ?ADDR IF NOT NUL ?ADDR LXI H,?ADDR ENDIF CALL @DECIN ;;CALL THE SUBROUTINE MOV A,L ;;LEAST SIGNIFICANT H! w. . ; ; DECOUT MACRO CONVERT A POSITIVE INTEGER TO DECIMAL AND OUTPUT ; TO THE CONSOLE. ; ; DECOUT ADDR ; ; IF ADDR OMITTED, NUMBER ASSUMED TO BE IN HL, ELSE LOADED TO HL ; LEADING ZEROS SUPRESSED. MAXIMUM NUMBER 65,767 ; DECOUT MACRO ADDR LOCAL ENDDEC,DX JMP ENDDEC @DECOUT: PUSH B ;PUSH STACK PUSH D PUSH H LXI B,-10 ;;RADIX FOR CONVERSION LXI D,-1 ;;THIS BECOMES NO DIVIDED BY RADIX DX: DAD B ;;SUBTRACT 10 INX D JC DX LXI B,10 DAD B ;;ADD! R2&?LEN CALL @MATCH ELSE IF NOT NUL ?STR1 LXI D,?STR1 ;;LOAD STRING1 POINTER ENDIF IF NUL ?LEN ;;TEST FOR LITERAL MVI C,ENDLIT-LITSTR ;;LENGTH OF LITERAL STRING LXI H,LITSTR ;;POINTER TO LITERAL CALL @MATCH JMP ENDLIT LITSTR: DB ?STR2 ;;LITERAL STRING ENDLIT: ;;END OF STRING ELSE IF NOT NUL ?STR2 LXI H,?STR2 ;;LOAD POINTER TO STRING2 ENDIF MVI C,?LEN ;;LOAD STRING LENGTH CALL @MATCH ;;CALL MATCH SUBROUTINE ENDIF ENDIF ENDM MATCH STR1,STR2,LEN ENDM ; ; . ! 0ALF OF NO TO A ENDM DECIN ADDR ENDM ; ; . . ; ; MOVE MACRO MOVE A BLOCK FROM SOURCE TO DEST ; ; MOVE SOURCE,DEST,COUNT ; ; SOURCE TO HL MACRO ASSUMES REGISTERS ALREADY ; DEST TO DE LOADED IF ARG OMITTED ; COUNT TO BC ; MOVE MACRO SOURCE,DEST,COUNT LOCAL OVERSUB JMP OVERSUB @MOVE: MOV A,B ORA C RZ ;;EXIT COUNT ZERO MOV A,M ;;GET A BYTE STAX D ;;STORE IT INX H INX D DCX B JMP @MOVE ;;BACK TO MOVE LOOP OVERSUB: !  RADIX BACK IN ONCE XCHG MOV A,H ORA L ;;TEST FOR ZERO CNZ @DECOUT ;;RECURSIVE CALL MOV A,E ADI '0' ;;CONVERT FROM BCD TO HEX MOV E,A ;;TO E FOR OUTPUT CHAROUT ;;CONSOLE OUTPUT POP H ;;POP STACK POP D POP B RET ENDDEC: DECOUT MACRO ?ADDR IF NOT NUL ?ADDR LHLD ?ADDR ENDIF CALL @DECOUT ;;CALL THE SUBROUTINE ENDM DECOUT ADDR ENDM ; ; . K. ; ; DECOUTLOC CONVERT A POSITIVE INTEGER TO DECIMAL AND OUTPUT ; !. . ; ; INSTR MACRO SEARCH STRING FOR SUBSTRING AND SET CARRY IF FOUND ; ; INSTR STRING,LENGTH,SUBSTR ; ; HL POINTS TO STRING ; DE POINTS TO SUBSTRING ; B CONTAINS STRING LENGTH ; C CONTAINS SUBSTRING LENGTH ; ; MACRO RETURNS POINTER TO END OF SUBSTRING IN HL ; INSTR MACRO STRING,LENGTH,SUBSTR LOCAL OVERSUB,S1,SSX JMP OVERSUB @INSTR: MOV A,B ;;STRING LENGTH SUB C ;;SUBTRACT SUBSTR LENGTH CMC ;;COMP CARRY RNC ;;ERROR RETURN ! MOVE MACRO SRC,?D,?C IF NOT NUL SRC LXI H,SRC ENDIF IF NOT NUL ?D LXI D,?D ENDIF IF NOT NUL ?C LXI B,?C ENDIF CALL @MOVE ;;CALL THE MOVE SUBROUTINE ENDM MOVE SOURCE,DEST,COUNT ENDM ; ; . . ; ; FILL MACRO - FILL A BLOCK OF MEMORY WITH A CONSTANT ; ; FILL START,STOP,CONSTANT ; ; CONSTANT OMITTED, FILL WITH 0 ; END OMITTED, FILL ONE BYTE ; FILL MACRO START,STOP,CONST LOCAL @FILL,BLKLEN BLKLEN SET STOP-START+1 LXI ! TO THE CONSOLE. ; ; DECOUTLOC ADDR (THIS MAC CALLS LOCAL "CONOUT" FOR OUTPUT) ; ; IF ADDR OMITTED, NUMBER ASSUMED TO BE IN HL, ELSE LOADED TO HL ; LEADING ZEROS SUPRESSED. MAXIMUM NUMBER 65,767 ; DECOUTLOC MACRO ADDR LOCAL ENDDEC1,DX1 JMP ENDDEC1 @DECOUT1: PUSH B ;PUSH STACK PUSH D PUSH H LXI B,-10 ;;RADIX FOR CONVERSION LXI D,-1 ;;THIS BECOMES NO DIVIDED BY RADIX DX1: DAD B ;;SUBTRACT 10 INX D JC DX1 LXI B,10 DAD B ;;ADD RADIX BACK IN ONCE XCHG MOV A,H ORA L ;;T""wOWER HALF MOV L,A RET OVER: HALF MACRO ?I IF NOT NUL ?I LHLD ?I ENDIF CALL @HALF ENDM HALF I ENDM HECK ZERO STC JZ ENDSEC CPI 128 ;CHECK > 127 CMC JC ENDSEC MVI B,0 MOV C,A ;MOVE TO C CALLBIOS DSETSEC ENDSEC: ENDM ; . . ; ; HALF MACRO DIVIDES A 16 BIT NUMBER BY 2 ; HALF MACRO I LOCAL OVER JMP OVER @HALF: XRA A ;;CLEAR CARRY MOV A,H RAR ;;SHIFT UPPER HALF MOV H,A MOV A,L RAR ;;SHIFT L"AD D ;;DOUBLE ADD IF NUL MOD SHLD POINTER ELSE PUSH H LXI D,-MOD DAD D ;;SUBTRACT MODULUS JNC IND1 POP H ;;GET BACK NO IND1: SHLD POINTER ENDIF ENDM ; ; . . ; ; FILFCB MACRO FILL IN THE ID FIELDS OF FCB ; ; FILFCB FCB,IDSTRING ; ; IDSTRING CONTAINS FILE NAME AND TYPE (FILNAM.TYP) ; CARRY SET IF ERROR (NAME TOO LONG) ; FILFCB MACRO FCB,IDSTRING LOCAL OVERSUB,F1,F2,F3,F4,F5,F6 JMP OVERSUB @FLFCB: MVI M,0 ;;CLEAR FIR"2FCB ; 21 WRITE FCB ; 22 MAKE FCB ; 23 RENAME FCB ; 24 ?LOGIN ; 25 ?DRIVE ; 26 SETDMA BUFFER ; 27 ?ALLOC ; SEE CP/M INTERFACE GUIDE FOR DETAILED INFORMATION ON THE ; DISK ACCESS PRIMITIVES ; ; DISKIO READ,FCB (TYPICAL MACRO CALL) ; DISKIO MACRO FUNCTION,PARAMETER LIFTHEAD SET 12 INITIAL SET 13 LOGIN SET 14 OPEN SET 15 CLOSE SET 16 SEARCH SET 17 SERNXT SET 18 DELETE SET 19 READ SET 20 WRITE SET 21 MAKE SET 22 RENAME SET 23 ?LOGIN SET 24 ?DRIVE SET 25 SETDM"OSUBSTR > STRING MOV B,A ;;NEW STRING LIMIT TO B S1: PUSH B PUSH D PUSH H MATCH POP H POP D POP B JZ SSX ;;MATCH IF ZERO ON RET ANA A ;;RESET CARRY DCR B ;;BYTES LEFT RM ;;FINISHED IF MINUS, NO MATCH INX H ;;INCR STRING POINTER JMP S1 ;;TRY AGAIN SSX: MVI B,0 ;;SET D TO 0 DAD B STC ;;SET CARRY RET OVERSUB: INSTR MACRO ?STR,?LEN,?SUBSTR LOCAL LITSTR,ENDLIT IF NUL ?STR&?LEN&?SUBSTR CALL @INSTR ELSE IF NOT NUL ?STR LXI H,?STR ENDIF MVI B,?LEN MVI "|ST BYTE OF FCB INX H PUSH H ;;SAVE POINTER TO NAME MVI C,11 ;;SIZE OF ID FIELD MVI A,' ' ;;SPACE TO A F1: MOV M,A ;;FILL NAME WITH SPACES INX H DCR C JNZ F1 POP H ;;RESTORE NAME POINTER MVI C,8 ;;MAXIMUM SIZE OF NAME F2: LDAX D ;;GET BYTE FROM ID FIELD CPI ' ' ;;LEADING SPACES? JNZ F3 INX D ;;SKIP LEADING SPACES JMP F2 F3: LDAX D ;;GET ID BYTE CPI 0 ;;ZERO END OF FIELD RZ CPI ' ' ;;SPACE END OF FIELD RZ CPI '.' ;;PERIOD TYPE SEPARATOR JZ F4 ;;DO TYPE "&A SET 26 ?ALLOC SET 27 ; ?C SET FUNCTION IF NOT NUL PARAMETER LXI D,PARAMETER ENDIF MVI C,?C CALL 5 ;;BDOS ENTRY ENDM ; ; . . ; ; CALLBIOS MACRO CALL BIOS ROUTINES DIRECTLY ; ; CALLBIOS FUNCTION,PARAM ; CALLBIOS MACRO FUNCT,PARAM LOCAL @CALL ; DCOLD SET 00H DWBOOT SET 03H DSTAT SET 06H DCONIN SET 09H DCONOUT SET 0CH ;;CHAR IN C DLIST SET 0FH ;;CHAR IN C DPUNC=H SET 12H DREADER SET 15H DHOME SET 18H DSELDSK SET 1BH D"CC,ENDLIT-LITSTR LXI D,LITSTR CALL @INSTR JMP ENDLIT LITSTR: DB ?SUBSTR ENDLIT: ENDIF ENDM INSTR STRING,LENGTH,SUBSTR ENDM ; ; . . ; ; SCAN MACRO SCAN A STRING UNTIL A CHAR IS FOUND, SKIP BLANKS ; AND CONTROL CHARACTERS ; ; ZERO SET IF NO DATA FOUND IN SPECIFIED FIELD ; ; SCAN MACRO ADDR,LENGTH LOCAL OVERSUB JMP OVERSUB @SCAN: MOV A,M ;;GET A BYTE CPI 21H ;;SPA;CE OR LESS? RP INX H ;;INCR POINTER DCR C ;;DECR SC"MOV M,A ;;STORE NAME BYTE INX H INX D ;;INCR POINTERS DCR C ;;DECR MAXIMUM COUNT JP F3 ;;LOOP BACK STC ;;SET CARRY NAME TOO LARGE RET F4: INX D ;;SKIP THE PERIOD MOV A,C ORA A JZ F6 ;;TEST C FOR ZERO F5: INX H DCR C JNZ F5 ;;INDEX TO TYPE FIELD F6: MVI C,3 ;;SIZE OF TYPE FIELD F7: LDAX D ;;GET ID BYTE CPI 0 ;;ZERO? RZ ;;FINISHED CPI ' ' ;;SPACE? RZ MOV M,A ;;STORE TYPE BYTE INX H INX D ;INCR POINTERS DCR C ;;DECR MAX COUNT JNZ F7 ;;LOOP BACK R"SETTRK SET 1EH DSETSEC SET 21H ;;SECTOR NO IN C DSETDMA SET 24H ;;DMA ADDR IN BC DREAD SET 27H DWRITE SET 2AH ; ?F SET FUNCT IF NOT NUL PARAM MVI C,PARAM ENDIF LHLD 1 ;;ADDR OF BIOS MVI L,?F ;;JUMP OFFSET SHLD @CALL+1 ;;MODIFY CALL !ADDR @CALL: CALL 0 ENDM ; ; . . ; ; DLOAD MACRO DOUBLE PRECISION INDEXED LOAD HL ; ; LOAD (ADDR + INDX) TO HL ; DLOAD MACRO ADDR,INDX IF NUL INDX LHLD ADDR ELSE LHLD INDX LXI D,ADDR "AN COUNT RZ ;;RETURN IF COUNT ZERO JMP @SCAN ;;KEEP SEARCHING OVERSUB: SCAN MACRO ?ADDR,?LEN IF NOT NUL ?ADDR LXI H,?ADDR ENDIF IF NOT NUL ?LEN MVI C,?LEN ELSE MVI C,127 ;;DEFAULT SCAN LENGTH 127 BYTES ENDIF CALL @SCAN ;;CALL .SUBROUTINE ENDM SCAN ADDR ENDM ; ; ; . . ; ; UPPER MACRO SCAN A STRING CONVERTING ALL LOWER CASE CHAR TO UPPER ; CASE (Only a - z are converted) ; ; ; UPPER MACRO ADDR,LENGTH LOCAL OVER"ףET OVERSUB: FILFCB MACRO ?FCB,?ID IF NOT NUL ?ID LXI D,?ID ENDIF IF NOT NUL ?FCB LXI H,?FCB ENDIF CALL @FLFCB XCHG ENDM FILFCB FCB,IDSTRING ENDM ; ; . . ; ; SETTRK MACRO SET AND TEST TRACK NUMBER ; ; ; SETTRK MACRO TRKNO LOCAL ENDTRK LDA TRKNO MOV C,A LDA TRKNO+1 MOV B,A CALLBIOS DSETTRK ENDTRK: ENDM ; ; . 2. ; ; SETSEC MACRO SET AND TEST SECTOR NUMBER ;" b< DAD D MOV E,M INX H MOV D,M XCHG ENDIF ENDM ; . . ; ; CPHL MACRO SUBTRACT DE FROM HL AND SET FLAGS ; CPHL MACRO LOCAL @END MOV A,H CMP D ;;COMPARE HIGH BYTES JNZ @END MOV A,L CMP E ;;COMPARE LOW BYTES @END: ENDM ; ; . u. ; ; DJZ MACRO DOUBLE PRECISION TEST HL AND JUMP ON ZERO ; DJZ MACRO ADDR MOV A,H ORA L JZ ADDR ENDM ; . " SUB JMP OVERSUB @UPPER: MOV A,M ;;GET A BYTE CPI 03H ;;Control C JZ UU2 ;;Exit with Carry Set CPI 61H ;;LOWER CASE A JM UU1 ;;LESS THAN A CPI 7BH ;;LOWER CASE Z + 1 JP UU1 ;;MORE THAN Z XRI 20H ;;MASK OFF LOWER CASE BIT MOV M,A ;;STORE THE BYTE BACK UU1: INX H ;;INCR POINTER XRA A ;;CLEAR CARRY BIT DCR C ;;DECR SCAN COUNT RZ ;;RETURN IF COUNT ZERO JMP @UPPER ;;KEEP SEARCHING UU2: STC ;;Set Carry RET OVERSUB: UPPER MACRO ?ADDR,?LEN IF NOT NUL ?ADDR LXI H,"  ; RETURN WITH CARRY SET < 1 OR > 128 ; SETSEC MACRO SECNO LOCAL ENDSEC IF NOT NUL SECNO LDA SECNO ENDIF ORA A ;CHECK ZERO STC JZ ENDSEC CPI 128 ;CHECK > 127 CMC JC ENDSEC MVI B,0 MOV C,A ;MOVE TO C CALLBIOS DSETSEC ENDSE C: ENDM ; . . ; ; HALF MACRO DIVIDES A 16 BIT NUMBER BY 2 ; HALF MACRO I LOCAL OVER JMP OVER @HALF: XRA A ;;CLEAR CARRY MOV A,H RAR ;;SHIFT UPPER HALF MOV H,A MOV A,L RAR ;;SHIFT L" . . ; ; DSTORE MACRO DOUBLE PRECISION INDEXED STORE HL ; ; STORE (HL) IN (ADDR + INDX) ; DSTORE MACRO ADDR,INDX IF NUL INDX SHLD ADDR ELSE PUSH H LHLD INDX XCHG LXI H,ADDR DAD D POP D MOV M,E INX H MOV M,D ENDIF ENDM ; ; . . ; ; INDEX MACRO INDEX AN ADDRESS POINTER BY A CONSTANT ; MOD MODULUS ; ; INDEX POINTER,INCR,MODULUS ; INDEX MACRO POINTER,INCR,MOD LOCAL IND1 LHLD POINTER LXI D,INCR D" ?ADDR ENDIF IF NOT NUL ?LEN MVI C,?LEN ELSE MVI C,127 ;;DEFAULT SCAN LENGTH 127 BYTES ENDIF CALL @UPPER ;;CALL SUBROUTINE ENDM UPPER ADDR ENDM ; ; . . ; ; DISKIO MACRO EXECUTE BDOS DISK ACCESS PRIMITIVES ; ; DISKIO FUNCTION,PARAMETER ; ; NO FUNCTION ENTRY PARAM ; ; 12 LIFTHEAD ; 13 INITIAL ; 14 LOGIN DISK NO 0 - 1 ; 15 OPEN FCB ; 16 CLOSE FCB ; 17 SEARCH FCB ; 18 SERNXT FCB ; 19 DELETE FCB ; 20 READ #B##=H ENDM BITX MACRO ?N,?D @CHK ?D DB 0DDH,0CBH,?D,?N*8+46H ENDM BITY MACRO ?N,?D @CHK ?D DB 0FDH,0CBH,?D,?N*8+46H ENDM SETX MACRO ?N,?D @CHK ?D DB 0DDH,0CBH,?D,?N*8+0C6H ENDM SETY MACRO ?N,?D @CHK ?D DB 0FDH,0CBH,?D,?N*8+0C6H ENDM RESX MACRO ?N,?D @CHK ?D DB 0DDH,0CBH,?D,?N*8+86H ENDM RESY MACRO ?N,?D @CHK ?D DB 0FDH,0CBH,?D,?N*8+86H ENDM JR MACRO ?N DB 18H,?N-$-1 ENDM JRC MACRO ?N DB 38H,?N-$-1 ENDM JRNC MACRO ?N DB 30H,?N-$-1 ENDM JRZ MAC#DW ?NNNN ENDM SBCD MACRO ?NNNN DB 0EDH,43H DW ?NNNN ENDM SDED MACRO ?NNNN DB 0EDH,53H DW ?NNNN ENDM SSPD MACRO ?NNNN DB 0EDH,73H DW ?NNNN ENDM SIXD MACRO ?NNNN DB 0DDH,22H DW ?NNNN ENDM SIYD MACRO ?NNNN DB 0FDH,22H DW ?NNNN ENDM SPIX MACRO DB 0DDH,0F9H ENDM SPIY MACRO DB 0FDH,0F9H ENDM PUSHIX MACRO DB 0DDH,0E5H ENDM PUSHIY MACRO DB 0FDH,0E5H ENDM POPIX MACRO DB 0DDH,0E1H ENDM POPIY MACRO DB 0FDH,0E1H ENDM EXAF MACRO DB ## RO ?N DB 28H,?N-$-1 ENDM JRNZ MACRO ?N DB 20H,?N-$-1 ENDM DJNZ MACRO ?N DB 10H,?N-$-1 ENDM PCIX MACRO DB 0DDH,0E9H ENDM PCIY MACRO DB 0FDH,0E9H ENDM RETI MACRO DB 0EDH,4DH ENDM RETN MACRO DB 0EDH,45H ENDM INP MACRO ?R DB 0EDH,?R*8+40H ENDM OUTP MACRO ?R DB 0EDH,?R*8+41H ENDM INI MACRO DB 0EDH,0A2H ENDM INIR MACRO DB 0EDH,0B2H ENDM IND MACRO DB 0EDH,0AAH ENDM INDR MACRO DB 0EDH,0BAH ENDM OUTI MACRO DB 0EDH,0A3H END# 08H ENDM EXX MACRO DB 0D9H ENDM XTIX MACRO DB 0DDH,0E3H ENDM XTIY MACRO DB 0FDH,0E3H ENDM LDI MACRO DB 0EDH,0A0H ENDM LDIR MACRO DB 0EDH,0B0H ENDM LDD MACRO DB 0EDH,0A8H ENDM LDDR MACRO DB 0EDH,0B8H ENDM CCI MACRO DB 0EDH,0A1H ENDM CCIR MACRO DB 0EDH,0B1H ENDM CCD MACRO DB 0EDH,0A9H ENDM CCDR MACRO DB 0EDH,0B9H ENDM ADDX MACRO ?D @CHK ?D DB 0DDH,86H,?D ENDM ADDY MACRO ?D @CHK ?D DB 0FDH,86H,?D ENDM ADCX MACRO# # M OUTIR MACRO DB 0EDH,0B3H ENDM OUTD MACRO DB 0EDH,0ABH ENDM OUTDR MACRO DB 0EDH,0BBH ENDM RLCR MACRO ?R DB 0CBH, 00H + ?R ENDM RLCX MACRO ?D @CHK ?D DB 0DDH, 0CBH, ?D, 06H ENDM RLCY MACRO ?D @CHK ?D DB 0FDH, 0CBH, ?D, 06H ENDM RALR MACRO ?R DB 0CBH, 10H+?R ENDM RALX MACRO ?D @CHK ?D DB 0DDH, 0CBH, ?D, 16H ENDM RALY MACRO ?D @CHK ?D DB 0FDH, 0CBH, ?D, 16H ENDM RRCR MACRO ?R DB 0CBH, 08H + ?R ENDM RRCX MACRO ?D @CHK ?D DB 0DDH, # t ?D @CHK ?D DB 0DDH,8EH,?D ENDM ADCY MACRO ?D @CHK ?D DB 0FDH,8EH,?D ENDM SUBX MACRO ?D @CHK ?D DB 0DDH,96H,?D ENDM SUBY MACRO ?D @CHK ?D DB 0FDH,96H,?D ENDM SBCX MACRO ?D @CHK ?D DB 0DDH,9EH,?D ENDM SBCY MACRO ?D @CHK ?D DB 0FDH,9EH,?D ENDM ANDX MACRO ?D @CHK ?D DB 0DDH,0A6H,?D ENDM ANDY MACRO ?D @CHK ?D DB 0FDH,0A6H,?D ENDM XORX MACRO ?D @CHK ?D DB 0DDH,0AEH,?D ENDM XORY MACRO ?D @CHK ?D DB 0FDH,0AEH,?D ENDM ORX MACRO ?D @C##0CBH, ?D, 0EH ENDM RRCY MACRO ?D @CHK ?D DB 0FDH, 0CBH, ?D, 0EH ENDM RARR MACRO ?R DB 0CBH, 18H + ?R ENDM RARX MACRO ?D @CHK ?D DB 0DDH, 0CBH, ?D, 1EH ENDM RARY MACRO ?D @CHK ?D DB 0FDH, 0CBH, ?D, 1EH ENDM SLAR MACRO ?R DB 0CBH, 20H + ?R ENDM SLAX MACRO ?D @CHK ?D DB 0DDH, 0CBH, ?D, 26H ENDM SLAY MACRO ?D @CHK ?D DB 0FDH, 0CBH, ?D, 26H ENDM SRAR MACRO ?R DB 0CBH, 28H+?R ENDM SRAX MACRO ?D @CHK ?D DB 0DDH, 0CBH, ?D, 2EH ENDM SRAY MACRO ?D #HK ?D DB 0DDH,0B6H,?D ENDM ORY MACRO ?D @CHK ?D DB 0FDH,0B6H,?D ENDM CMPX MACRO ?D @CHK ?D DB 0DDH,0BEH,?D ENDM CMPY MACRO ?D @CHK ?D DB 0FDH,0BEH,?D ENDM INRX MACRO ?D @CHK ?D DB 0DDH,34H,?D ENDM INRY MACRO ?D @CHK ?D DB 0FDH,34H,?D ENDM DCRX MACRO ?D @CHK ?D DB 0DDH,035H,?D ENDM DCRY MACRO ?D @CHK ?D DB 0FDH,35H,?D ENDM NEG MACRO DB 0EDH,44H ENDM IM0 MACRO DB 0EDH,46H ENDM IM1 MACRO DB 0EDH,56H ENDM IM2 MACRO DB 0EDH,5#; @CHK MACRO USED FOR CHECKING 8 BIT DISPLACMENTS ; @CHK MACRO ?DD ;; USED FOR CHECKING RANGE OF 8-BIT DISP.S IF (?DD GT 7FH) AND (?DD LT 0FF80H) 'DISPLACEMENT RANGE ERROR - Z80 LIB' ENDIF ENDM LDX MACRO ?R,?D @CHK ?D DB 0DDH,?R*8+46H,?D ENDM LDY MACRO ?R,?D @CHK ?D DB 0FDH,?R*8+46H,?D ENDM STX MACRO ?R,?D @CHK ?D DB 0DDH,70H+?R,?D ENDM STY MACRO ?R,?D @CHK ?D DB 0FDH,70H+?R,?D ENDM MVIX MACRO ?N,?D @CHK ?D DB 0DDH,36H,?D,?N ENDM MVIY MACRO ?N,?D @CHK ?D#Û @CHK ?D DB 0FDH, 0CBH, ?D, 2EH ENDM SRLR MACRO ?R DB 0CBH, 38H + ?R ENDM SRLX MACRO ?D @CHK ?D DB 0DDH, 0CBH, ?D, 3EH ENDM SRLY MACRO ?D @CHK ?D DB 0FDH, 0CBH, ?D, 3EH ENDM RLD MACRO DB 0EDH, 6FH ENDM RRD MACRO DB 0EDH, 67H ENDM 8, 26H ENDM SRAR MACRO ?R DB 0CBH, 28H+?R ENDM SRAX MACRO ?D @CHK ?D DB 0DDH, 0CBH, ?D, 2EH ENDM SRAY MACRO ?D #TEH ENDM BC EQU 0 DE EQU 2 HL EQU 4 IX EQU 4 IY EQU 4 DADC MACRO ?R DB 0EDH,?R*8+4AH ENDM DSBC MACRO ?R DB 0EDH,?R*8+42H ENDM DADX MACRO ?R DB 0DDH,?R*8+09H ENDM DADY MACRO ?R DB 0FDH,?R*8+09H ENDM INXIX MACRO DB 0DDH,23H ENDM INXIY MACRO DB 0FDH,23H ENDM DCXIX MACRO DB 0DDH,2BH ENDM DCXIY MACRO DB 0FDH,2BH ENDM BIT MACRO ?N,?R DB 0CBH,?N*8+?R+40H ENDM SETB MACRO ?N,?R DB 0CBH,?N*8+?R+0C0H ENDM RES MACRO ?N,?R DB 0CBH,?N*8+?R+80# DB 0FDH,36H,?D,?N ENDM LDAI MACRO DB 0EDH,57H ENDM LDAR MACRO DB 0EDH,5FH ENDM STAI MACRO DB 0EDH,47H ENDM STAR MACRO DB 0EDH,4FH ENDM LXIX MACRO ?NNNN DB 0DDH,21H DW ?NNNN ENDM LXIY MACRO ?NNNN DB 0FDH,21H DW ?NNNN ENDM LDED MACRO ?NNNN DB 0EDH,5BH DW ?NNNN ENDM LBCD MACRO ?NNNN DB 0EDH,4BH DW ?NNNN ENDM LSPD MACRO ?NNNN DB 0EDH,07BH DW ?NNNN ENDM LIXD MACRO ?NNNN DB 0DDH,2AH DW ?NNNN ENDM LIYD MACRO ?NNNN DB 0FDH,2AH $$  $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ $a DW 512 ; bytes per sect DB QSKEWBIT ; miniskew mask DW TRANS5 ; translate table ENDIF ; f512 ENDIF ; skew ENDIF ; dblock ENDIF ; maxi8 IF MINI48 ; cp/m double density 128 byte/sector single sided mini drive 48 TPI ; DB 050H ; flag DB 0000$0001B ; internal code DPSD1MBK: ;1D/128 DISK PARAMETER BLOCK - MINI DW 30 ;SECTORS PER TRACK DB 3 ;BLOCK SHIFT FACTOR DB 7 ;BLOCK MASK DB 0 ;NULL MASK DW 137 ;DISK SIZE-1 DW 63 ;DIRECTORY MAX DB 192 $ectors on trk 0 DB 52 ;number of sectors on trk 1 DW 26 ; physical sects trk 1 DB 2048/128 ; cpm block size/cpm sector size DB 256/128-1 ; disk sector size/cpm sector size DB 1 ; logical to phisical sector map (1 = 2 phys sec.) DW 256 ; bytes per sector DB 0000$0000B ; miniskew mask DW 0000 ; address of translate table ; cp/m 2.2 256 byte per sector double density DOUBLE SIDED ; DB 91H ; flag DB 0000$0101B ; internal code DPDDDS2XBK: DW 52 ;26 - 256 BYTE SECT$  $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ $ DEE00D4051E00040F001F017F00C0002000037C :10FAFE00002C111E1E0001000080005E019F :10FB0E002800040F01B8007F00C000200003002C65 :10FB1E00112828000403020002C0B9F7DE052800F0 :10FB2E00040F0078017F00C000200003002C112874 :10FB3E0028001003020002C0B9F7E5021A000307FD :10FB4E0000F2003F00C000100002002C191A1A002B :09FB5E0001000080001D :02FDE700E7FD36 :10FB670018F806F809F8FE0128117DB4200DE521E3 :10FB770067FB1166EE010600EDB0E12266FB216E20 :10FB8700FCCD1AF03A7F00213CFDE620FE20CC1A7E :10FB9700F03A7F0021$ ORS/TRACK - SPT DB 4 ;BLOCK SHIFT FACTOR - BSH DB 15 ;BLOCK MASK - BLM DB 0 ;EXTENT MASK DW 495 ;DISK SIZE IN BLOCKS - DSM DW 127 ;DIRECTORY MAX ENTRIES - DRM DB 0C0H ;DIR. ALLOC. MASK - AL0 DB 0 ;DIR. ALLOC. MASK - AL1 DW 32 ;DIR. CHECK SIZE - CKS DW 2 ;TRACK OFFSET - OFF DB NSECTS ;CPM SYSTEM SIZE (FOR WMBOOT) DB 25 ;number of sectors on trk 0 DB 52 ;number of sectors on trk 1 DW 26 ; physical sects trk 1 DB 2048/128 ; cpm block size/cpm$   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ $ ,B6FCFEDDC2A9FBCD1AF0C307 :10FBA700EAFBFE10CAD0FB21C5FCCD1AF021E1FC0F :10FBB7003A7F00E603B7CAD0FB3C21ACFC11020038 :10FBC700193DC2C7FB5E2356EBCD1AF02126FDCDAA :10FBD7001AF02134FD3A7F00E640C2E7FB2138FDE9 :10FBE700CD1AF03A0400212B00BD3A0400C2F8FBFD :10FBF700AF060F21B5EFBECA06FC2B05C2FDFB7889 :10FC070032A5EF3204003A34EE4FB7DB0BCA1AFCC9 :10FC1700E6F0B1D30B3A35EED33A3A36EED3BA2AF9 :10FC270066FB3E04BCCA3BFCBDCA3BFC3EACD307EB :10FC37003EFFD3057DE6F0FE90C24BFC3E2C3233EF :10FC4700F03234F01E040E1F2167FC06070$  sector size DB 256/128-1 ; disk sector size/cpm sector size DB 1 ; logical to phisical sector map (1 = 2 phys sec.) DW 256 ; bytes per sector DB 0000$0000B ; miniskew mask DW 0000 ; address of translate table ENDIF ; f256 IF SKEW IF F512 ; ; cp/m 2.2 512 byte sector double density ; DB 1AH ; code byte DB 0000$0001B ; internal code DPDS5XBKSK: DW 64 ;16 - 512 BYTE SECTORS/TRACK DB 5 ; DB 31 ; DB 3 ;EXTENT MASK DW 149 ; DW 127 ; DB $  $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ $C0CED82 :10FC5700B31DC24FFC1E040E9F3EC9325CFC18E860 :10FC670018044405EA03C10D0A58204F20522020EA :10FC770043502F4D2056657273203631206F662012 :10FC870031322E32302E38322000202030203438C6 :10FC9700203936313434313932323430323838332E :10FCA7003336333834B6FCC5FCF2FC03FD14FD20B3 :10FCB7005374616E6461726420312E3420262032C1 :10FCC7002E3220636F6D70617469626C65206469A0 :10FCD700726563746F72790D0A0031323820627968 :10FCE7007465732F736563746F72003235362062E3 :10FCF700797465732F736563746F720035313220C1 :10FD070$i128 ; DB 0 ; DW 32 ; DW 2 ; DB NSECTS ;CP/M BLK SIZE DB 25 ; 128 type sects on tk 0 DB 64 ; 128 type sects on tk 1 DW 16 ; physical sect trk 1 DB 4096/128 ; cpm block size/cpm sector size DB 512/128-1 ; disk sector size/cpm sector size DB 2 ; logical to physical sector map (1 = 2 phys sec.) DW 512 DB QSKEWBIT ; miniskew mask DW TRANS5 ; translate table ; ; cp/m 2.2 512 byte sector double density, double sided SKEW ; DB 9AH ; code byte DB 000$e3 ;* END OF BLOCKING - DEBLOCKING * ;* * ;** ; 3: DS 2 ;TEMP ; SECVEC: DB 00 SEKHST: DW 0000 ;SEEK SHR SECSHF ; UNADSK: DB 00 ;LAST UNALLOC DISK UNATRK: DW 0000 ;LAST UNALLOC TRACK UNASEC: DW 0000 ;LAST UNALLOC SECTOR BUFDSK: DB 00 ; RSFLAG: DB 00 ;READ SECTOR FLAG READOP: DB 00 ;1 I | Will not work on 8251, use CTS, pin 5  14 ___V__ 25 DB-25 / .\ - As a MODEM appears -   / .\ ( and your computer )   -- 13   1 2 3 4 5 6 7   F T R R C D G ! 8 DATA BITS, 1 STOP, NO PARITY  % BASE ADDRESS = C0  SOME TIPS ON HOOKING UP PRINTERS Almosal seria printer us fou basi lines Ou computer "look lik modem i term o RS-23 specifications Tha i becaus originall terminal attache themselve t modem tha i tur talke ove phon line t mainframes Whe chea Micro computer cam o th scen i wa logica t mak the plu directl int th terminals Th minimu line neede t maintai communicatio arTrans%d verify OUT DCOM ; PUSH H ; status not always immediatly availble POP H ; IN WAIT ; in case seek error CALL HDELAY ; ; IF NOT MMPM IODCMD: ; LDA CMDBKT ; OUT DCOM ; XCHG ;DMA IN DE POP H ;(R/W LOOP PTR.) LXI B,IOCOMP ;EFFECTIVE RETURN ADDRESS PUSH B ;PRETEND IT'S A RETURN PCHL ;GO TO RLOOP OR WLOOP ; ELSE JMP IODCMD ENDIF IOCOMP: IN DSTAT ;READ DISK STATUS. RET ; DOHOME: LXI H,0 ; IF DBLOCK SHLD HSTTRK ; ELSE % GS. JZ CHKS4 ;READ ADR OK IF 0. CALL DOHOME1 ;OTHERWISE, DO HARDWARE RESTORE JMP CHKS5 CHKS4: MOV A,B ;UPDATE TRACK REGISTER. OUT TRACK CHKS5: CALL SEEK ;MOVE THE HEAD TO IT. MOV A,D ;GET ERROR BITS. ORA A ;SET FLAGS. RET ;vRETURN FROM ERCHK. ; ; WRITE THE SECTOR AT HSTSEC ON THE TRACK IN HSTTRK, ; USING THE STARTING ADDRESS AT DMAADD ;**M ; WRITE WRITE: IF MDISK LDA NEWDISK ; CPI 3 ; JZ MWRIT% mit Receive Logi Ground an Fram Ground Thes ar o DB-2 connecto o pin 3,2, an respectively. Thes term onl hol tru i yo ar modem DB-2 connecto piassignment shoul alway b referre t a i th mode wa th subject Therefor i pi 3 i "Transmit" i yo ar terminal yo shoul receiv o pi 3 Ther ar othe signal o DB-2 RS-23 seria connecto tha ar standard Thes signal wer originall intende fo mode us an t%  SHLD TRK ; ENDIF DOHOME1: CALL SELECT ; select disk CALL CHKRDY ; see if drive rdy MVI A,1 OR 0CH ;6MS RESTORE OUT DCOM ; PUSH H ; POP H ; time for status to become valid IN WAIT ; PUSH H ; POP H ; IN DSTAT ; ANI 04H ; MVI A,0 ; good status RNZ ;RETURN IF OK LXI H,HEMSG ;HOME ERROR CALL PMSG ; LXI H,DOHOME1 ; PUSH H ; JMP ERMSG1 ;DO COMMON ERROR MESSAGES ; DENSITY: PUSH B PUSH H ;SAVE DRIVE HEADER VECTOR L% E ; ENDIF MVI A,RTCNT ; STA ERCNT ; WIORTY: MVI A,0A8H ;1791 CODE FOR WRITE WITH HEAD LOAD LXI H,WLOOP ;POINT TO WRITE I/O LOGIC CALL IOCOM ;DO COMMON I/O ANI 0FDH ;LOOK AT THESE BITS. LXI H,0 PROCER: RZ ;RETURN IF NO ERR. CALL ERCHK ;CHECK/CORRECT SEEK ERR. LDA ERCNT DCR A ;DECREMENT COUNT. STA ERCNT JNZ WIORTY LXI H,WTMSG ; print ' write' CALL PMSG MOV A,D ;GET ERROR BITS. ANI 40H ;LOOK AT BIT 6. LXI H,WPMSG ;PRINT "PROTECT ". CNZ % hei name reflec thes intentions The are CT (Clea t send) RT (Reques t send) DS (Dat se ready) DTR (Data terminal ready). Thes "secondar signals a the ar calle ar use tinfor th termina use whe th compute an transmissio equipmen ca sen data. Whe attachin printer w us th principa signal t conve dat i bot direction an th secondar signal t "handshake" T handshak mean t infor eac othe whe yo ar prepare t com%XI H,DFLAGS ;POINT AT DENSITY FLAGS MVI B,0 DAD B PUSH H ;WE WILL WANT POINTER IF MDISK MVI A,3 ; CMP C ; JZ INITDIR ; ENDIF IF DBLOCK LHLD HSTTRK ; dblocking decides what trk ELSE LHLD TRK ; includes head info ENDIF SHLD TEMPTRK ;DONT LEAVE NO TRACKS LXI H,0 ;FORCE TO ZERO IF DBLOCK SHLD HSTTRK ELSE SHLD TRK ; includes head info ENDIF CALL DOHOME1 ;MAY NOT WANT TO RESET HOST ACTIV FLAG ORA A ; JNZ DENEXIT ; IF DBLOCK%OPMSG MOV A,D ;GET ERROR BITS. ANI 20H ;LOOK AT BIT 5. LXI H,WFMSG ;PRINT "FAULT ". CNZ PMSG LXI H,WRITE PUSH H ; return from common messages ; to write routine JMP ERMSG1 ;DO COMMON MESSAGES. ; IF NOT MMPM ; WLOOP: ; IN WAIT ;WAIT FOR READY. ORA A ;SET FLAGS. RP ;INTRQ - OPERATION COMPLETE ; LDAX D OUT DDATA ;WRITE ONTO DISK. INX D ;INCREMENT MEM PTR. PCHL ENDIF ; ;*** ; MISC%municate It' rathe lik pickin u th phon afte hearin i rin an sayin "Hello" The th othe perso identifie himselfan s on Human "handshake i man way tha ar no readil apparent Facin someon an noddin you hea t star conversation is "handshaking". O ou Paddl card a th bac o th compute ar place fo tw resistors The ar calle "pul up resistor an mus b installe i th seria por handshakin line DS an CTӠ ar no t %FH )  N O T E : Mak sur whe usin th abov char tha th position w sho correspon t th typ o switc yo hav o th board Som earlier models of switches have the "ON" to the opposite side. .pa  #4 Port serial Port assignments  = LOW SERIAL PORTS 20 CHANNEL A DATA 21 "  A STATUS 22 "  B DATA 23 "  B STATUS 24 %. SUBROUTINES IOCOM: DI STA CMDBKT ;SAVE 1791 COMMAND PUSH H ;SAVE READ/WRITE LOOP POINTER CALL UPDATETRK ; replace trk regs to what they were if needed CALL SELECT ; CALL CHKRDY ; CALL SEEK ; LDA OLDISK ; MOV C,A ; LDA NEWDISK ; CMP C ; if new drive, wait for head to stop bounce STA OLDISK ; CNZ HDELAY ; no bounces please ; IF DBLOCK LHLD HSTDMA ELSE LHLD DMAADD ;GET STARTING ADR. ENDIF ; IF DBLOCK LDA HSTSEC ; dblocking decides%gb used These resistor ca b anythin fro 1 t 10K I buffe ful handshakin i t b used th correc lin mus b locate whic indicate tha statu o th printe yo ar using Th resisto "pullin up th statu lin yo wis t us mus b remove (eithe ca b used) an jumpe soldere betwee th RS-23 lin an plac wher th resisto was Th othe availabl handshakin lin ca b use fo OΠ LINE OF LINŠ statu o ?? Bu fo an transmissi%"  C DATA 25 "  C STATUS 26 "  D DATA 27 "  D STATUS 3A BAUD RATE SELECT  ! HIGH SERIAL PORTS A0 "  A DATA A1 "  A STATUS A2 "  B DATA A3 "  B STATUS A4 "  C DATA A5 "  C STATUS A6 "  D DATA A7 "  D STATUS AA BAUD RATE SELECT PMMI MODEM&&DATE, NO HDLOAD, NO VARIFY, 15 MS OUT DCOM ; RETRY2: IN DSTAT ; RRC ; JRC RETRY2 ; DCR B ; JRNZ RETRY1 ; JR BOOT1 ; BOOT: MVI A,5 ;RETRYS PUSH PSW ; BOOT1: MVI A,0D0H ;FORCE INTRUPT OUT DCOM ; HOME1: XTHL ; XTHL ; IN DSTAT ; RRC ; JRC HOME1 ;WAIT FOR NOT BUSY FROM 1795 MVI A,01 ;DO REGULAR RESTORE OUT DCOM ; LXI H,0 ;LOOP COUNT HOME2: XTHL ; XTHL ; INX H ; MOV A,L ; ORA H ; JZ RETRY ; IN DSTAT ; ANI 85H ;READY, TRK 0, BUSY CPI 04H ; JNZ&tCIMAL NUMBER, PLEASE START OVER$ CMX TRACK NUMBER MUST BE BETWEEN 0-76 $1 Ck $i _G{ډ> ʦÆþ SEEK ERROR TRACK $ =  DRIVE $ :w&% DENS = $ :o&>D>S_C>!>>!I!|&:w&_w>!e ERROR IN HOMING DRIVE $L :w&%C:l&2h&É:l&2h&:b&"&xw#Ö2':f&<2f&:h&=2h&*&É:k&*&>w# :' DRIVE $ :w&&\FBEEFBFFFB205374616E6461726454 :10FBAA0020312E34202620322E3220636F6D706170 :10FBBA007469626C65206469726563746F72790D29 :10FBCA000A003132382062797465732F7365637461 :10FBDA006F72003235362062797465732F736563EC :10FBEA00746F72003531322062797465732F7365D0 :10FBFA0063746F7200313032342062797465732F06 :10FC0A00736563746F720020646F75626C6520732C :10FC1A00696465640020352200203822002048618A :10FC2A007264206469736B002028534B455729007E :02FC3A004AFD81 :00 & HOME2 ; MVI A,2 ; OUT DENS ;SINGLE DENSITY DCR A ;= 1 OUT SECT ; LXI H,0 ;ADDRESS MVI A,8CH ; OUT DCOM ; RLOOP: IN WAITX ; ORA A ; JP RDONE ; IN DDATA ; MOV M,A ; INX H ; JR RLOOP ; RDONE: LXI H,MONINZ; PUSH H ; LXI H,NOSYSMSG IN DSTAT ; ORA A ; JRNZ RDONE1 ; LDA 0 ; CPI 31H ; JRNZ MSOUT0 ; RST 0 ; RDONE1: STA 100H ; LXI H,UNDEFMSG ANI 90H ;READY, CRC ERROR JRZ MSOUT0 ;UNDEFINED ERROR LXI H,CRCMSG ANI 10H ;CRC JRNZ MSOUT0 ; LXI H,NRDYM&% NOT READY$ C, PERMANENT $ :'ʌPRECORD NOT FOUND$? e (DENS = $[ :o&y>D{>S_>)_û:'ʬáLOST DATA$ ûóCRC$  ERROR TRACK $ *`&=  SECTOR $ *b&=  DRIVE $ :w&%:p&0 " SIDE $  *&= !d&4>7$D :l&2h&2':b&"&x #[ :f&<2f&:h&=2h&*&N !:&ʛ !=ʛ !=ʛ !:' VERIFY ERROR TRACK $  2'2'h :l&2h& :l&2h&:b&x& *d&= :d&=V# HARD ERRORS$ CK VALIDATION ERROR DRIVE $1 êe HARD ERROR$Y CÇ THERE WAS 1 RETRY$s !=)Ø"s(>2o&ö:o&ʻ>Dw%Ͷ#!͏%2x&:o&:&ʬ FORMAT WITH $ *&=  BYTES PER SECTOR $ :p&91DOUBLE SIDED, $" :o&dSDOUBLE DENSITY $C *&= ÈwSINGLE DENSITY $g :&o&= á SECTORS PER TRACK $ ó $ STANDARD IBM 3740 FORMAT $ >2'!&ͣ!@OFF&~SG ; MSOUT0: CALL MSOUT ; CALL CRLF ; MSO: IN STAT ; ANI TXMASK ; RNZ ; JR MSO ; ; MSOUT: MOV A,M CPI '$' RZ MOV C,A CALL CONOUT INX H JMP MSOUT ; MEM: LXI H,MEMMSG CALL MSOUT CALL INA ANI 7 OUT 8 JMP STARTX ; CONIN: CALL CONSTAT1 JRZ CONIN IN DATA ANI 7FH RET CONOUT: IN STAT ANI TxMASK JRZ CONOUT MOV A,C OUT DATA RET ; GETVERS: CONSTAT: LXI H,VERSION ; CALL TO CONSTAT RETURNS VERS IN HL CONSTAT1: IN STAT ANI RxMASK MVI A,& zT: CALL SPACE CALL SPACE CALL SPACE CALL SPACE RET ; RLT: MOV A,L ANI 0FH RLC RLC RLC RLC ADD C MOV L,A RET ; INH: CALL INA CPI 0DH RZ CPI '.' JZ STARTX CALL TST1 JNC INH CALL OUTA STC RET ; INHX: PUSH H LXI H,0000H CALL INH JNC EXT1 MOV L,C CALL INH JNC EXT CALL RLT MOV C,L EXT MVI A,00H EXT1 POP H RET ; SPACE MVI A,' ' PRINT CALL OUTA RET OUTHX MOV A,B RRC RRC RRC RRC CALL NIB MOV A,B CALL NIB RET NIB ANI 0FH & SET #2u&5INSERT DISK TO BE FORMATTED IN DRIVE $ :x&%_ PRESS CARRIAGE RETURN $F C:x&# :n&CØ VALIDATING DISK $ ÷O:&G:o&:&G3!@SIZE 512:'<U(q#  'yW"(w#:o&:&+:u&+> 2u&:&2&G:p&B:&xw!u(ͬ:&2&h:&=2&R *&"&!u(u(!>ͻ`:p&ʕ"F:&<2&O:&>Y7$:u&k!&ͼ"F:&2&:o&2':&2':&2':'<>2&>2&*&"'!"&:& 0 RZ CMA RETURN: RET ; LIST: IF SIO MVI A,10H ; RESET EXT/STATUS INTERRUPTS OUT LSTSTAT ENDIF IN LSTSTAT ANI LISTMASK ; MASK ALL BUT CTS,DCD,TxBUFFER EMPTY CPI LISTMASK ; CTS,DCD, & TxBUFFER EMPTY MUST BE HIGH JNZ LIST ; IF NOT, WAIT MOV A,C OUT LSTDAT RET ; MONINZ: IN 0AH IN 0BH ;GET BAUD RATE OUT 0BH ;SET BAUD RATE LXI D,BACK2 JMP GETSTACK BACK2: LXI H,INZLST ; POINT AT INITLIZE LIST INZLOOP: MOV B,M ; GET # OF PRAMETERS INX H MOV C,M ; GET POR&  CPI 10 JNC P10 ADI '0' CALL OUTA RET P10 ADI 'A'-10 CALL OUTA RET ADOUT MOV B,H CALL OUTHX MOV B,L CALL OUTHX JMP REXIT GO CALL INADR CALL CRLF PCHL IN2AD: CALL INADR PUSH H CALL INADR POP D CPI 0DH JZ LIE MOV A,L SUB E MOV L,A MOV A,H SBB D JC ERROR MOV H,A XCHG RET LIE LXI H,00B7H XCHG RET ; VIEW LXI H,STARTX PUSH H HRV1 CALL INADR MVI A,1 CALL OUTA XRA A HERE9 LXI D,0 CALL CRLF CALL CRLF CALL ADOUT CALL REXIT LOOPX: MVI& J&2':'<>>2&*&"':'<(!+!"&2&>Sw%!&ͣ:'>H> G:'G:'2'G:p&c>2':'p>2':'2&:'2&*'"&:'2&*'"&:'ʝ>Dw%!&ͣ:p&°>Y2&:p&>2&ɯ2&"2&:&:u&>2u&:&2&G:&xw!u(͐:&2&<:&=2& *&"&!u(ͥ:&?:'::<2[)!u(>T~#G`:p&j":&<2&O:&>Y7$:u&!&ͼ"(͜͜6#͜:&ʽN͜NP͜ ͜͜6#N2͜͜6#͜6#:&&T INX H DCR B ; TEST FOR 0 PRAMETERS INR B JZ PERIZFIN ; IF 0 THEN FINISHED OUTIR ; BLOCK OUTPUT JMP INZLOOP ; PERIZFIN: LXI H,MSG1S CALL MSOUT POP H ;STACK ADDRESS CALL ADOUT JMP STARTX ; ;THIS ROUTINE FINDS THE END OF CONTIGIOUS ;MEMORY (STARTING AT ZERO OF COURSE) ;AND SETS THE STACK POINTER TO RESIDE THERE. ; ;NOTE: ; JUMP TO THIS ROUTINE WITH D&E SET TO THE ADDRESS ; YOU WISH TO RETURN TO ; GETSTACK: IF DBUG EXX LXI H,STK PUSH H EXX LXIX STK-30H & B,64 LOOPX1: MOV A,M ANI 7FH CPI 20H JP ASCI MVI A,' ' ASCI: CALL OUTA INX D INX H PUSH H LXI H,1536 DSBC DE POP H JZ WAIT DCR B JNZ LOOPX1 CALL CRLF CALL ADOUT CALL REXIT JMP LOOPX WAIT CALL INA CPI ' ' JZ STARTX CPI 0DH JZ HERE9 JMP WAIT ; INA: CALL CONIN RET OUTA: PUSH B MOV C,A CALL CONOUT POP B RET ; RETRY: POP PSW ; DCR A ; PUSH PSW ; JZ RDONE ;TIMEOUT, GO REPORT ERROR MVI B,5 ; RETRY1: MVI A,01000011B ;STEP IN, NO UP& ͜͜6#͜6# ͜͜6#͜6# ͜͜6#*&͜6#:&_͜N͜ ͜͜6#*&͜6#:&_N͜p#{œ&:&2&*&!(:&w## w#:&w:&=2&µ&:&2&*&!(:&!(=!):&w## w#:&w:&=2&µ:o&Np#z!K)=#:v&#:{&w[\& :v&2x&#:m&*&} FORMATTING ERROR DRIVE $c :x&ʞÓB $ CåA $ C MISSING OPERAND, PLEASE START OVER $ C  ERROR IN ENTERING DE&_*B~<2wG*@~w?  **O* PASS NUMBER $ p S |J{0__*Jâ  **$* PASS NUMBER $z *J *** FUNCTION COMPLETE **$ **DDSYSGEN COMLGHIJKLMDTCSYS60HEXDNOPPRISYS60HEXNQRSSTDSYS60HEX1TUBLKSYS61SUBV0'f'" ; if b, also re-set baud RST 0 ; re-boot when done S0121: PRINT <'PRINTER # '> ; LDA S003D ; get printer # STA S0349 ; stor in local JMP S016F ; put on screen DEC$CONV: DECOUT ; RET ; S016F: LHLD S0349 ; get local printer INX H ; CALL DEC$CONV ; PRINT ; RST 0 S0186: LXI D,BAUMSG ; MVI C,09H ; CALL S0005 ; S02A1: LXI D,SELMSG ; MVI C,09H ; CALL S0005 ; CHARIN ; get choice CPI '1' ' | | CPU Component Side | ** |  /C U S T U M E R S E R V I C E H O T L I N E |    7 1 4 - 8 9 8 - 5 5 2 5 ** |    - XOR DATA SCIENCES, INC. - &'K R X X T T S N   M S S R D    PARALLEL CABLE WIRING This cable is used for Centronics interface printers. It uses a 8255, PA0-7 are used for data transfer, PB0-7 are tied together for data strobe PC6 for ACK from printer. NOTE Thi cabl i availabl ?fro you ՠ Ӡ MICRϠ SALE SALES OFFICE. 26 Pin 36 Pin -- ' ; less than 1 ? JC S02A1 ; abort CPI '9'+1 ; greater than 9 ? JNC S02A1 ; abort ANI 0FH ; mask ascii DCR A ; rel to 0 LXI H,BAUDTABLE ; ready to convert MVI D,0 ; MOV E,A ; S02B7: DAD D ; MOV A,M ; correct binary pattern for generator STA S034A ; local storage S02EE: LXI D,PRTMSG ; now to find out which channel MVI C,09H ; CALL S0005 ; CHARIN ; S02FD: CPI 03H ; RZ ; CPI '0' ; JZ S0310 ; CPI '1' ; 'stio aske wil b fo th cod byt fo th destinatio disk Afte tellin dsysge th typ an drive i wil d th transfer It' reall ver simpl an shoul tak n mor tha 1 second t do I yo fin yoursel wel int th firs hour REA TH MANUAL Ther i ste b ste exampl i there Don' forge tha th destinatio dis mus hav suitabl forma o it I you no sur o thi point us DFOC t forma th disk. .pa I yo ar copyin syste'  -- CPU CABLE | | CENT. CONN. (1) AD0 |--- -> ---|D0 (2) (2) AD1 |--- -> -- -|D1 (3) P (3) AD2 |--- -> -- -|D2 (4) R 8 (4) AD3 |--- -> -- -|D3 (5) I 2 (5) AD4 |--- -> -- -|D4 (6) N 5 (6) AD5 |--- -> ---|D5 (7) T 5 '- JZ S0326 ; CPI '2' ; JZ S0314 ; JMP S02EE ; S0310: IN 0BH ; cpu baud rate switch ANI 0F0H ; mask lower MOV C,A ; LDA S034A ; get new baud ORA C ; OUT 0BH ; baud rate port RST 0 ; S0314: LDA S003C ; get baud rate ANI 0F0H ; mask off lower nibble MOV C,A ; LDA S034A ; ANI 0FH ; ORA C ; S0320: OUT 0BAH ; port ba is baud rate gen on serial i.o. bd STA S003C ; RST 0 ; S0326: LDA S003C ; ANI 0F' o singl side diskette t doubl side diskette DSYSGE wil tel yo "th sourc an destinatio format d no agree d yo wis t continue?" o may type yes and the transfer will be complete. Anothe ite t b noted al XO system ar compatibl wit standar 12 singl density howeve ther i no enoug roo o th syste track o th dis t plac th system Yo mus boo u o Doubl densit diskett i "A drive Singl density files '] (7) AD6 |--- -> -- -|D6 (8) E (8) AD7 |--- -> ---|D7 (9) R   |  |______ (9-16)BD0-7 |=== -> ---|STROBE (1)   |  | (21) CD4 |--- <- ---|ON LINE (13)   |  | (22) CD5 |--- <- ---|BUSY (11)  '}H ; MOV C,A ; LDA S034A ; ANI 0F0H ; ORA C ; JMP S0320 ; ; SELMSG: DB cr,lf,lf,'Select baud rate -> $' PRTMSG: DB cr,lf,lf,lf,'0 = CPU chan "A", 1 = left serial i.o., 2 = right serial i.o.' DB cr,lf,'Which Baud Generator ? -> $' BAUMSG: DB cr,lf DB '1 = 300 baud',cr,lf DB '2 = 600 baud',cr,lf DB '3 = 1200 baud',cr,lf DB '4 = 1800 baud',cr,lf DB '5 = 2400 baud',cr,lf DB '6 = 3600 baud',cr,lf DB '7 = 4800 baud',cr,lf DB '8 = 9600 baud',cr,lf ' $ ORG 100H MACLIB MACRO $-M ; ;** * ; ; PRINTER ; 09/15/82 ;*** ; S0005 EQU 5H S003C EQU 3CH S003D EQU 3DH S0000 EQU 0H S005D EQU 5DH ; ; START: LXI SP,STACK ; PRINT <'XOR Printer control utility Vers. 1.0 09/12/82'> PRINT , PRINTER {p}, PRINTER {b}'> PRINUT <', PRINTER {p},{b}'> PRINT PRINT <'and b ' I |  |___ (23) CD6 |--- <- ---|ACK (10)   |  | (26) GND |--- <-> ---|SIGNAL (16)   | ---}GROUND (14) --  --U- CPՠ 825 connecto pinou lookin fro fron wit edg connecto a bottom.  2 4 6 8  26 Serial Conn. ' e DB '9 = 19200 baud',cr,lf DB '$' ; BAUDTABLE: DB 0000$0101B ; 300 DB 0000$0110B ; 600 DB 0000$0111B ; 1200 DB 0000$1000B ; 1800 DB 0000$1010B ; 2400 DB 0000$1011B ; 3600 DB 0000$1100B ; 4800 DB 0000$1110B ; 9600 DB 0000$1111SB ; 19200 ; S0338 DW 0 S0349 DW 0 S034A DW 0 DS 64 STACK: EQU $ ; END 0 baud',cr,lf DB '5 = 2400 baud',cr,lf DB '6 = 3600 baud',cr,lf DB '7 = 4800 baud',cr,lf DB '8 = 9600 baud',cr,lf ' = request to re-set baud rate',cr,lf,lf> LXI H,S005D ; get command tail MOV A,M ; printer no. INX H ; comma INX H ; b for "baud" MOV B,M ; may be a sp CPI 42H ; is "B" ? JZ S0186 ; jump to baud select routine CPI 20H ; space ? JZ S0121 ; no input, simply report printer ANI 07H ; ah, a printer, mask ascii DCR A ; printer 1 = hex 0 STA S003D ; 3d = printer, 3c = baud MOV A,B ; get printer # ANI 7FH ; mask msb CPI 42H ; B ? CZ S0186 '   ___ __  | . | |. | |--| . |\-----|. |\----| |   -- - | -- | | |  \ __ \| \__ \| | | 1 3 5 7 9  25 | | | | 'f LISTER3 and LISTER0, you will have the printer in physical location 3 (meaning port 1 of SIO U12 on the serial board) assigned to logical location 0. You must then exchange STAT3 with STAT0 (in the STATTBL) so that the correct list status routine will be called when the corresponding printer is accessed. At this point, you are ready to build a new operating system with the new printer routine, CXLST. To add CXLST to your operating system, change the XXXSYS60.SUB(( CK - MINI DW 40 ;SECTORS PER TRACK DB 3 ;BLOCK SHIFT FACTOR DB 7 ;BLOCK MASK DB 0 ;NULL MASK DW 184 ;DISK SIZE-1 DW 127 ;DIRECTORY MAX DB 240 ;ALLOC 0 DB 0 ;ALLOC 1 DW 32 ;CHECK SIZE DW 3 ;TRACK OFFSET DB NSECTS ; ccp + bdos length in sectors DB 17 ; number of sectors on track 0 DB 40 ; DW 40 ; number of sectors on track 1 DB 1024/128 ; cpm block size/cpm sector size DB 512/128-1 ; disk sector size/cpm sector size DB 2 ; logical to phisical (   :10F61600BEC235F62AE9F7ED5BEFF7ED52C25EF6AC :10F626002AEBF7ED5B43F7ED52C25EF6C387F63A77 :10F63600E8F7B7CA67F63AD3F73245F73A4AF7CD4D :10F64600D7EFCD2FF03A45F732D3F74F3EFF32458D :10F65600F779CDD7EFC367F63AE8F7B7C42FF0B717 :10F66600C0AF32E8F72114FB22EDF72AEFF722E9C3 :10F67600F72A43F722EBF73A4BF7B7C42CF0FEFF15 :10F68600C83AD3F7324AF732D4F73A42F72114FB95 :10F69600118000FE00CAA3F6193DC29EF6ED5BF38B :10F6A600F70180003A4CF7B7C2B7F63E0132E8F7E9 :10F6B600EBEDB03A4DF7FE013E00C0AF32E8F7324F :10F6C600E7F7CD2(; ; cp/m double density 512 byte/sector single sided mini drive 96 tpi ; DB 05EH ; flag DB 0000$0001B ; internal code DP512M96SNGL: ;1D/128 DISK PARAMETER BLOCK - MINI DW 40 ;SECTORS PER TRACK DB 4 ;BLOCK SHIFT FACTOR DB 15 ;BLOCK MASK DB 1 ;NULL MASK DW 184 ;DISK SIZE-1 DW 127 ;DIRECTORY MAX DB 192 ;ALLOC 0 DB 0 ;ALLOC 1 DW 32 ;CHECK SIZE DW 3 ;TRACK OFFSET DB NSECTS ; ccp + bdos length in sectors DB 17 ; number of sectors on track 0 DB 40 ;(fsector map (1 = 2 phys sec.) DW 512 ; bytes per sector DB 0C0H ; mini + skew DW TRANS5M ; 10 sector skew ; ; cp/m double density 512 byte/sector double sided mini drive 48 tpi ; DB 0DAH ; flag DB 0000$0101B ; internal code DP512M48DBL: ;1D/128 DISK PARAMETER BLOCK - MINI DW 40 ;SECTORS PER TRACK DB 4 ;BLOCK SHIFT FACTOR DB 15 ;BLOCK MASK DB 1 ;NULL MASK DW 191 ;DISK SIZE-1 DW 127 ;DIRECTORY MAX DB 192 ;ALLOC 0 DB 0 ;ALLOC 1 DW 32 ;CHECK SI(FF0C93AE6F7B7CA05F73AE8F7F4 :10F6D600B73E0032E6F7CA05F7AF32E8F732E7F78A :10F6E6003AD3F73245F73A4AF7CDD7EFCD2FF03A6E :10F6F60045F732D3F74F3EFF3245F779CDD7EF2A9C :10F70600EFF722E9F72AF1F722EBF72AF3F722EDD2 :10F71600F73A4CF7B7C22CF0C32FF02AEFF77DB4B7 :L10F72600C82B7DB4C879E640CA35F72B7DB4C82A04 :06F73600E4F7195E1BC997 :10F742 008EF7000032 :10F75200#94FA77FAFDF8FDF78EF700003A :10F76200#94FA77FA3DF93DF88EF70000A8 :10F77200$94FA77FA7DF97DF88EF7000018 :10F7820(vXCHG PCHL ENDIF ; LXI H,0 ;SET START ADDRESS STOOP MOV A,M ;GET A BYTE MOV B,A ;SAVE IT CMA ;COMPLEMENT IT MOV M,A ;WRITE CHANGE TO MEMORY CMP M ;IS IT WHAT YOU WROTE? JNZ STONE ;IF NOT, MUST BE OUT OF MEMORY MOV M,B ;RESTORE MEMORY INR L ;MEMTEST OPTION ADDED 12/79 JNZ STOOP INR H ;POINT TO NEW PLACE IN MEMORY JMP STOOP ;KEEP ON TRUCKIN STONE: SPHL ;SET STACK TO TOP OF MEMORY PUSH H ;SAVE STACK ADDRESS EXX ;WANT TO SAVE STACK ADDRS POP H ;IN H&L IN ALTERNATE REGS F(ZE DW 3 ;TRACK OFFSET DB NSECTS ; ccp + bdos length in sectors DB 17 ; number of sectors on track 0 DB 40 ; DW 40 ; number of sectors on track 1 DB 2048/128 ; cpm block size/cpm sector size DB 512/128-1 ; disk sector size/cpm sector size DB 2 ; logical to phisical sector map (1 = 2 phys sec.) DW 512 ; bytes per sector DB 0C0H ; DW TRANS5M ; ENDIF ; if dblock ENDIF ; if 512 ENDIF ; if skew ENDIF ; if mini48 IF MINI96 ; ; cp/m double den(±00094FA77FABDF9BDF801070D13E5 :10F7920019050B111703090F1502080E141A060C8E :10F7A2001218040A10160104070A0D100306090CA8 :10F7B2000F0205080B0E0106020703080409050AD9 :10F7C2000102030405060708090A0B0C0D0E0F10AF :10F7D200 27 :10F7E200 17 :0BF7F2 00M0C :10F9FD00DD013300040F00EE005F00C000200002A7 :10FA0D00002C19333300080000800N0900521 :10FA1D003300040F00E2017F00C000200002002C23 :10FA2D001933330008000080001A(BOR MONITOR PUSH H ; EXX ; PUSH D ;PUT RET ADDRESS ON STACK LXI D,0-32D ; DAD D ; PUSH H ; POP IX ; RET ; ; ;msg UNDEFMSG: DB 'Disk error$' NOSYSMSG: DB 'No system$' CRCMSG: DB 'CRC error$' NRDYMSG: DB 'Drive not ready$' ; MEMMSG:DB 0DH,0AH,'Bank ? $' MSG1S: DB 0DH,0AH,0AH,'DELTA PRODUCTS',0DH,0AH MSG2S: DB 'SYSTEM MONITOR',0DH,0AH ; DB 'VERS ' DB ((VERSION SHR 12) AND 15) +'0' DB ((VERSION SHR 8) AND 15) +'0' DB '.' DB ((VERSION SHR 4) AND 15) +'0' DB (VERSION A(sity 128 byte/sector single sided mini drive 96 tracks per in. ;96 DB 054H ; flag DB 0000$0001B ; internal code DP128M96SGLBK: ;1D/128 DISK PARAMETER BLOCK - MINI DW 30 ;SECTORS PER TRACK DB 4 ;BLOCK SHIFT FACTOR DB 15 ;BLOCK MASK DB 0 ;NULL MASK DW 142 ;DISK SIZE-1 DW 127 ;DIRECTORY MAX DB 192 ;ALLOC 0 DB 0 ;ALLOC 1 DW 32 ;CHECK SIZE DW 3 ;TRACK OFFSET DB NSECTS ; ccp + bdos length in sectors DB 17 ; number of sectors on track 0 DB 30 ; number(01400067 :10FA3D00051F0395007F008000200002002C194057 :10FA4D001000200302000280A8F79A054000051F50 :10FA5D00012F017F008000200002002C19401000B2 :10FA6D00200302000280A8F7E5021A00030700F246 :10FA7D00003F00C000100002002C191A1A000100EE :07FA8D00008000F2 :02FD140014FDDC :10FA940018F806F809F8FE0128117DB4200DE521B7 :10FAA40094FA1166EE010600EDB0E12293FA219B6F :10FAB400FBCD19F03A7F002169FCE620FE20CC1929 :10FAC400F03A7F0021E3FBFEDDC2D6FACD19F0C384 :10FAD40017FBFE10CAFDFA21F2FBCD19F0210EFC32 :10FAE40(_ND 15) +'0' DB 0AH,0DH,'$' ; ; base io address for the sio on the rev c cpu ; INZLST: IF SIO ; ; SIO1 LIST DB 10 ; 10 PRAMETERS TO SEND DB LSTSTAT ; PORT TO SEND THEM DB 18H DB 1 DB 00H DB 4 DB 4CH DB 5 DB 068H DB 3 DB 41H DB 00 DB 10 ; 10 PRAMETERS TO SEND DB STAT ; PORT TO SEND THEM DB 18H DB 1 DB 00H DB 4 DB 4CH DB 05 DB 068H DB 3 DB 41H DB 00 ENDIF IF I8251 DB 4 ; 4 PRAMETERS TO SEND DB LSTSTAT ; PORT TO SEND THEM DB 0( of sectors on track 1 DW 30 DB 128/128 ; cpm block size/cpm sector size DB 128/128-1 ; disk sector size/cpm sector size DB 0 ; logical to phisical sector map (1 = 2 phys sec.) DW 128 ; bytes per sector DB 00,00,00 ; ; cp/m double density 128 byte/sector double sided mini drive 96 tpi ; DB 0D4H ; flag DB 0000$0101B ; internal code DP128M96DBL: ;1D/128 DISK PARAMETER BLOCK - MINI DW 30 ;SECTORS PER TRACK DB 4 ;BLOCK SHIFT FACTOR DB 15 ;BLOCK MASK DB 0 ;NULL (  in sectors DB 17 ; number of sectors on track 0 DB 30 ; number of sectors on track 1 DW 30 DB 2048/128 ; cpm block size/cpm sector size DB 128/128-1 ; disk sector size/cpm sector size DB 0 ; logical to phisical sector map (1 = 2 phys sec.) DW 128 ; bytes per sector DB 00,00,00 IF SKEW IF F512 IF DBLOCK ; ; cp/m double density 512 byte/sector single sided mini drive 48 tpi ; DB 5AH ; flag DB 0000$0001B ; internal code DP512M48SNGBK: ;1D/128 DISK PARAMETER BLO( AAH ; SET MODE DB 040H ; RESET DB 0100$1110B ; 1 STOP BIT, NO PARITY, 8 BITS, 16X DB 0011$0111B ; RTS = 1, ERROR RESET, Rx ENABLED ; DTR = 1, Tx ENABLED DB 4 ; 4 PRAMETERS TO SEND DB STAT ; PORT TO SEND THEM DB 0AAH ; SET MODE DB 040H ; RESET DB 0100$1110B ; 1 STOP BIT, NO PARITY, 8 BITS, 16X DB 0011$0111B ; RTS = 1, ERROR RESET, Rx ENABLED ; DTR = 1, Tx ENABLED ENDIF DB 0 ; END OF TABLE MARKER ; ( <MASK DW 287 ;DISK SIZE-1 DW 127 ;DIRECTORY MAX DB 192 ;ALLOC 0 DB 0 ;ALLOC 1 DW 32 ;CHECK SIZE DW 3 ;TRACK OFFSET DB NSECTS ; ccp + bdos length in sectors DB 17 ; number of sectors on track 0 DB 30 DW 30 ; number of sectors on track 1 DB 128/128 ; cpm block size/cpm sector size DB 128/128-1 ; disk sector size/cpm sector size DB 0 ; logical to phisical sector map (1 = 2 phys sec.) DW 128 ; bytes per sector DB 00,00,00 IF SKEW IF F512 IF DBLOCK )) <ISK?". Usuall yo wil nee t ente 1A whic signifie 51 byt singl sided Th othe commo cod byt i 9A whic i fo 51 byt sectors bu doubl sided Afte determinin th typ o sourc dis an driv name hi clib BD SOFTWARE C LIBRARIAN VERSION x.x FUNCTION BUFFER SIZE = xxxx BYTES * open 0 dssr * open 1 rts * t 0 1 foo * t 0 1 bar * t 0 1 zot * c 1 * ^C A> ... The "open" commands prepare to do work on a .CRL file, and associate each .CRL file opened with a digit (0-5). The "transfer" commands tell CLIB to transfer the named function from the first file (named by file #) to the *256 ; bytes per sector DB HDBIT ; DB 00,00 ; ENDIF ; IF QUANTUM ; cp/m hard disk 512 byte/sector 128 sectors/track DB 26H ;CODE BYTE DB 0FFH ;DUMMY HDQUANTUMBK: DW 64 ;SECTORS PER TRACK DB 5 ;BLOCK SHIFT FACTOR (4 k blocks) DB 31 ;BLOCK MASK DB 1 ;NULL MASK DW 2042 ;DISK SIZE-1 DW 511 ;DIRECTORY MAX DB 240 ;ALLOC 0 DB 0 ;ALLOC 1 DW 0 ;CHECK SIZE (fixed media no check) DW 3 ;TRACK OFFSET DB NSECTS ; ccp + bdos length in sectors DB 64 * s DW 40 ; number of sectors on track 1 DB 2048/512 ; cpm block size/cpm sector size DB 512/128-1 ; disk sector size/cpm sector size DB 2 ; logical to phisical sector map (1 = 2 phys sec.) DW 512 ; bytes per sector DB 0C0H ; DW TRANS5M ; ; ; cp/m double density 512 byte/sector double sided mini drive 96 tpi ; DB 0DEH ; flag DB 0000$0101B ; internal code DP512M96DBL: ;1D/128 DISK PARAMETER BLOCK - MINI DW 40 ;SECTORS PER TRACK DB 4 ;BLOCK SHIFT FACTOR DB 15* second file (also named by number). The "close" command need only be given for files which have been altered; since DSSR wasn't written to in the above example, it didn't need to be closed, but RTS did need to be closed. DEFF.CRL: This file contains the standard function library... all 60+ functions worth. See the BDS C User's Guide for documentation on these functions. :Overview -- C Skeleton File C.CCC: The run-time skeleton file, containing code for processing the command l* u ; number of sectors on cyl 0 DB 64 ; number of sectors on cyl 1 (physical) DW 16 ; cpm sectors on trk 1 DB 4096/128 ; cpm block size/cpm sector size DB 512/128-1 ; disk sector size/cpm sector size DB 2 ; logical to physical sector map (1 = 2 phys sec.) DW 512 ; bytes per sector DB QSKEWBIT+HDBIT ; special Quantum code DW TRANSQ ; trans ENDIF ; ; cp/m single density 128 byte/sector single sided IBM STANDARD ; this is the default prameter block and end of table mark*  ;BLOCK MASK DB 0 ;NULL MASK DW 376 ;DISK SIZE-1 DW 127 ;DIRECTORY MAX DB 192 ;ALLOC 0 DB 0 ;ALLOC 1 DW 32 ;CHECK SIZE DW 3 ;TRACK OFFSET DB NSECTS ; ccp + bdos length in sectors DB 17 ; number of sectors on track 0 DB 40 ; DW 40 ; number of sectors on track 1 DB 2048/128 ; cpm block size/cpm sector size DB 512/128-1 ; disk sector size/cpm sector size DB 2 ; logical to phisical sector map (1 = 2 phys sec.) DW 512 ; bytes per sector DB 0C0H ; * Iine (generating argc and argv, for you UNIX lovers), room for file I/O buffers, some math subroutines, etc. Note on the BDS C compiler: THIS IS NOT AN INTERPRETER. Some hacks, such as BASIC-E, are billed as compilers but actually just do some preprocessing and then interpret the program. BDS C is a true compiler, generating not-too-optimal but nevertheless quick 8080 code. For the gory details on the BDS C implementation, see my notes to APPENDIX A of the EXCELLENT book *er. ; NOTE: THIS TABLE MUST NOT BE REMOVED: ; TBLSTART: EQU $ DB 0E5H ; flag DB 0000$0010B ; internal code DPSD1XBK: ;1D/128 DISK PARAMETER BLOCK - IBM STANDARD DW 26 ;SECTORS PER TRACK DB 3 ;BLOCK SHIFT FACTOR DB 7 ;BLOCK MASK DB 0 ;NULL MASK DW 242 ;DISK SIZE-1 DW 63 ;DIRECTORY MAX DB 192 ;ALLOC 0 DB 0 ;ALLOC 1 DW 16 ;CHECK SIZE DW 2 ;TRACK OFFSET NSECTPOS EQU $-DPSD1XBK DB NSECTS ; ccp + bdos length in sectors DB 25 ; number of sectors on tr* DW TRANS5M ; ENDIF ; dblock ENDIF ; 512 ENDIF ; skew ENDIF ; mini96 IF PRIAM ; cp/m hard disk 128 byte/sector 104 sectors/track DB 20H ;CODE BYTE DB 0FFH ;DUMMY HDPRIAMBK: DW 104 ;SECTORS PER TRACK DB 5 ;BLOCK SHIFT FACTOR (4 k blocks) DB 31 ;BLOCK MASK DB 1 ;NULL MASK DW 1821 ;DISK SIZE-1 DW 511 ;DIRECTORY MAX DB 0F0H ;ALLOC 0 DB 0 ;ALLOC 1 DW 0 ;CHECK SIZE (fixed media no check) DW 1 ;TRACK OFFSET DB NSECTS ; ccp + bdos *q "The C Programming Language." :Variable Types Variable types supported: int char unsigned struct union arrays (of one or two dimensions) pointers simple combinations of the above For example, char *foo[10][15]; declares foo to be a two dimensional array of pointers to characters; char (*foo)(); declares foo to be a pointer to a function returning a character; char *foo, bar, zot[10]; declares foo to be a pointer to characters, bar to be a single char variab*r than the "TOP OF MEMORY", the program hasn't got the chance of a snowball in hell of running correctly. :Oveview -- C Librarian CLIB: This program maintains .CRL files, allows transfer of functions from one CRL file to another, etc. To invoke CLIB, just type A>clib Clib will print a line such as FUNCTION BUFFER SIZE = nnnnn specifying the largest function size that can be handled. Attempting to "transfer" or "extract" a function larger than this size could be destructive. *length in sectors DB 103 ; number of sectors on track 0 +1 DB 103 ; number of sectors on track 1 +1 DW 104 DB 128/128 ; cpm block size/cpm sector size DB 128/128-1 ; disk sector size/cpm sector size DB 0 ; logical to phisical sector map (1 = 2 phys sec.) DW 128 ; bytes per sector DB 00,00,00 ENDIF IF SHUGART ; cp/m hard disk 256 byte/sector 26 sectors/track DB 25H ;CODE BYTE DB 0FFH ;DUMMY HDSHUGARTBK: DW 52 ;SECTORS PER TRACK DB 5 ;BLOCK SHIFT FACTOR (4*Lle, ant zot to be an array of 10 characters. :Braces If your keyboard doesn't support the '{' and '}' characters (open and close brace, for those of you whose printer doesn't know about ascii 7B and 7D), the symbols 'begin' and 'end' may be substituted. Don't unless you have to; '{' and '}' take up less memory. The CONVERT program will perform this conversion, if necessary. :Variable Accessing Since all functions in C may be used recursively, all variable accessing is done r* Next CLIB will prompt with a "*". Typing "h" at this point will give you a command summary. Basically, you work CLIB by opening one to six CRL files (which then become associated with "file numbers"), diddling the files to your hearts content, closing all files which you altered, and typing control-C. The old version of any CRL file you change with CLIB is renamed to name.BRL (for Backup ReLative). A sample session of CLIB to, say, transfer the functions named "FOO", "BAR",* k blocks) DB 31 ;BLOCK MASK DB 1 ;NULL MASK DW 2047 ;DISK SIZE-1 DW 511 ;DIRECTORY MAX DB 240 ;ALLOC 0 DB 0 ;ALLOC 1 DW 0 ;CHECK SIZE (fixed media no check) DW 2 ;TRACK OFFSET DB NSECTS ; ccp + bdos length in sectors DB 52 ; number of sectors on track 0 DB 52 ; number of sectors on track 1 DW 26 DB 4096/128 ; cpm block size/cpm sector size DB 256/128-1 ; disk sector size/cpm sector size DB 1 ; logical to physical sector map (1 = 2 phys sec.) DW + + used These resistor ca b anythin fro 1 t 10K I buffe ful handshakin i t b used th correc lin mus b locate whic indicate tha statu o th printe yo ar using Th resisto "pullin up th statu lin yo wis t us mus b remove (eithe ca b used) an jumpe soldere betwee th RS-23 lin an plac wher th resisto was Th othe availabl handshakin lin ca b use fo OΠ LINE OF LINŠ statu o ?? Bu fo an transmissio+  C DATA 25 "  C STATUS 26 "  D DATA 27 "  D STATUS 3A BAUD RATE SELECT  ! HIGH SERIAL PORTS A0 "  A DATA A1 "  A STATUS A2 "  B DATA A3 "  B STATUS A4 "  C DATA A5 "  C STATUS A6 "  D DATA A7 "  D STATUS AA ! BAUD RATE SELECT PMMI MODEM +{  ___ __  | . | |. | |--| . |\-----|. |\----| |   -- - | -- | | |  \ __ \| \__ \| | | 1 3 5 7 9  25 | | | |  +k t tak plac bot seria unit mus b a th sam bau rat an bot handshak lines must be acive (high). NOTE: Pin 20, DTR -----> | Will not work on 8251, use CTS, pin 5  14 ___V__ 25 DB-25 / .\ - As a MODEM appears -   / .\ ( and your computer )   -- 13   1 2 3 4 5 6 7   F T R R C D G ! 8 DATA BITS, 1 STOP, NO PARITY   += BASE ADDRESS = C0  SOME TIPS ON HOOKING UP PRINTERS Almosal seria printer us fou basi lines Ou computer "look lik modem i term o RS-23 specifications Tha i becaus originall terminal attache themselve t modem tha i tur talke ove phon line t mainframes Whe chea Micro computer cam o th scen i wa logica t mak the plu directl int th terminals Th minimu line neede t maintai communicatio arTransm+  | | CPU Component Side |  | | |     - XOR data sciences, inc. -# | | | |  +  R X X T T S N   M S S R D    PARALLEL CABLE WIRING This cable is used for Centronics interface printers. It uses a 8255, PA0-7 are used for data transfer, PB0-7 are tied together for data strobe PC6 for ACK from printer. NOTE Thi cabl i availabl ?fro you ՠ Ӡ MICRϠ SALE SALES OFFICE. 26 Pin 36 Pin --  + it Receive Logi Ground an Fram Ground Thes ar o DB-2 connecto o pin 3,2, an respectively. Thes term onl hol tru i yo ar modem DB-2 connecto piassignment shoul alway b referre t a i th mode wa th subject Therefor i pi 3 i "Transmit" i yo ar terminal yo shoul receiv o pi 3 Ther ar othe signal o DB-2 RS-23 seria connecto tha ar standard Thes signal wer originall intende fo mode us an th+  CALL SELECT ; select disk CALL CHKRDY ; see if drive rdy MVI A,1 OR 0CH ;6MS RESTORE OUT DCOM ; PUSH H ; POP H ; time for status to become valid IN WAIT ; PUSH H ; POP H ; IN DSTAT ; ANI 04H ; MVI A,0 ; good status RNZ ;RETURN IF OK LXI H,HEMSG ;HOME ERROR CALL PMSG ; LXI H,DOHOME1 ; PUSH H ; JMP ERMSG1 ;DO COMMON ERROR MESSAGES ; DENSITY: PUSH B PUSH H ;SAVE DRIVE HEADER VECTOR LXI H,DFLAGS ;POINT AT DENSITY FLAG+ n -- CPU CABLE | | CENT. CONN. (1) AD0 |--- -> ---|D0 (2) (2) AD1 |--- -> -- -|D1 (3) P (3) AD2 |--- -> -- -|D2 (4) R 8 (4) AD3 |--- -> -- -|D3 (5) I 2 (5) AD4 |--- -> -- -|D4 (6) N 5 (6) AD5 |--- -> ---|D5 (7) T 5 (+ Cei name reflec thes intentions The are CT (Clea t send) RT (Reques t send) DS (Dat se ready) DTR (Data terminal ready). Thes "secondar signals a the ar calle ar use tinfor th termina use whe th compute an transmissio equipmen ca sen data. Whe attachin printer w us th principa signal t conve dat i bot direction an th secondar signal t "handshake" T handshak mean t infor eac othe whe yo ar prepare t comm+IS MVI B,0 DAD B PUSH H ;WE WILL WANT POINTER IF MDISK MVI A,3 ; CMP C ; JZ INITDIR ; ENDIF IF DBLOCK LHLD HSTTRK ; dblocking decides what trk ELSE LHLD TRK ; includes head info ENDIF SHLD TEMPTRK ;DONT LEAVE NO TRACKS LXI H,0 ;FORCE TO ZERO IF DBLOCK SHLD HSTTRK ELSE SHLD TRK ; includes head info ENDIF CALL DOHOME1 ;MAY NOT WANT TO RESET HOST ACTIV FLAG ORA A ; JNZ DENEXIT ; IF DBLOCK LHLD HSTSEC ; dblocking decide+1_ 7) AD6 |--- -> -- -|D6 (8) E (8) AD7 |--- -> ---|D7 (9) R   |  |______ (9-16)BD0-7 |=== -> ---|STROBE (1)   |  | (21) CD4 |--- <- ---|ON LINE (13)   |  | (22) CD5 |--- <- ---|BUSY (11)   +unicate It' rathe lik pickin u th phon afte hearin i rin an sayin "Hello" The th othe perso identifie himselfan s on Human "handshake i man way tha ar no readil apparent Facin someon an noddin you hea t star conversation is "handshaking". O ou Paddl card a th bac o th compute ar place fo tw resistors The ar calle "pul up resistor an mus b installe i th seria por handshakin line DS an CTӠ ar no t b+H )  N O T E : Mak sur whe usin th abov char tha th position w sho correspon t th typ o switc yo hav o th board Som earlier models of switches have the "ON" to the opposite side. .pa  #4 Port serial Port assignments  = LOW SERIAL PORTS 20 CHANNEL A DATA 21 "  A STATUS 22 "  B DATA 23 "  B STATUS 24 "+pI|  |___ (23) CD6 |--- <- ---|ACK (10)   |  | (26) GND |--- <-> ---|SIGNAL (16)   | ---}GROUND (14) --  --U- CPՠ 825 connecto pinou lookin fro fron wit edg connecto a bottom.  2 4 6 8  26 Serial Conn. ,,e relative to 1 RET ; IF PRIAM ; skew factor of 52 HDTRANS: MOV A,C ; get logical sector RAR ; divide by 2 JNC GOUT ADI 52 ; odd sector - add 52 GOUT: MVI H,0 MOV L,A INX H ; make relative to 1 RET ; ELSE HDTRANS: RET ENDIF ; ; ;**) ; ; DISK DRIVER SWAPPING ROUTINE ; ;** IF NOT PRIAM  &IF NOT SHUGART IF NOT QUANTUM ; the, ; read in ccp and bdos using prameters from drive block ; IF PRIAM or SHUGART or QUANTUM LDA BOOTDISK ; booting from hard disk ? CPI 5 ; convert to A = 0, B = 1, C = 2 D = 3 JC HWBOOT ; ENDIF ; RB1: ; MOV A,B ; select needs track STA TRK ; MOV A,C ; STA SECT ; PUSH H ; dma PUSH D ; sects PUSH B ; trk CALL SREAD ; do it RBLK1: ; POP B ; POP D ; POP H ; DCR D ; decrement sector count. JZ GOCPM ; all done when zero. , machine-executabl form. Digita Research th designe o CP/M ha provide se o nin manual whic describ th us an operatio o CP/ i detail. These manuals are:  51 A Introductio t CP/ Feature an Facilities  42. ED: A Context Editor for the CP/M Disk System  (3. ASM: CP/M Assembler User's Manual  54 DDT CP/ Dynami Debuggin Too User' Manual  5. CP/M 1.4 Interface Guide  6. CP/M 1.4 System Alter, default warm boot number BOOTDISK: DB 00 ; this is the drive that we will warm ; boot from ; this is the logical drive exchange ; table that exchanges logical drives ; A, B, ... F for phyical LUN numbers ; 0ffh is an invalid number ; indicating the drive does not exist ; duplicate entry at lun0 DRIVMAP: ; LUN # DRIVE # DB 00 ; A DB 01 ; B DB 02 ; C DB 03 ; D DB 0FFH ; E DB 0FFH ; F DB 0FFH ; G DB 0FFH ; H DB 0FF,PUSH D ; LXI D,128 ; bytes per sector DAD D ; SHLD DMAADD ; POP D ; INR C ; increment sector countR. DCR E ; e has sectors to read this trk JNZ RB1 ; read next sector STDWBT: ; LDA SECTK1 ; get sectors per track on tk 1 MOV E,A ; MVI C,1 ; otherwise reset sector =1 INR B ; increment track number JMP RB1 ; ; IF PRIAM OR SHUGART OR QUANTUM ; HWBOOT: PUSH D ; LHLD DMAADD ; lower dma address so that boot pgm LXI D,80H ; loads belo,b ation Guide  7. CP/M 2.0 User's Guide  8. CP/M 2.0 Interface Guide  9. CP/M 2.0 System Alteration Guide A th reade ca see CP/ support contex editor a assemble (Intel-compatable) an debugge system Thes ar availabl i th basi CP/ package Ther i larg variet o othe softwar availabl whic ca ru unde CP/ wit littl o n modification Suc softwar include severa assembler (bot 808 an Z80) symbol,LH ; I DB 0FFH ; J DB 0FFH ; K DB 0FFH ; L DB 0FFH ; M DB 0FFH ; N DB 0FFH ; O DB 0FFH ; P ENDIF ENDIF ENDIF IF PRIAM OR SHUGART OR QUANTUM ; the default warm boot number BOOTDISK: DB 00 ; this is the drive that we will warm ; boot from ; this is the logical drive exchange ; table that exchanges logical drives ; A, B, ... F for phyical LUN numbers ; 0ffh is an invalid number ; indicating the drive does not exist ,w ccp by 128 XRA A ; set zero flag so subtract will work DSBC DE ; SHLD DMAADD ; for this subtraction to work POP D ; INR D ; compensate for boot (nsects) LXI B,1 ; hard disk system begins at trk 0 JMP RB1 ; sect 1, not 2 ;d ENDIF ; if priam or shugart ENDIF ; if mmpm ENDIF ; if mldr ENDIF ; if xmldr ;**$ ; HOME HOME: LXI B,0 ; ;***,i debugger severa high-leve language (includin FORTRAΠ I֠ {compiler} BASIC- {translator} CBASI {translator} man interpretiv BASICs ALGOL FOCAL an C) an severa special-purpos application program (suc a tex formattin system an accountin systems). Thi HEL Fil addresse itsel specificall t th CP/ 2. Operatin Systems. :CP/M File References fil referenc identifie particula fil o grou o file o particula dis attache, General Information on CP/M CP/M File References CP/M Line Editing and Output Control CP/M Built-In Commands CP/M Transient Commands Physical Device Assignments for ARIES-1 CP/M STAT Command CP/M PIP Command CP/M ED Command CP/M ASM Command CP/M LOAD Command The UNLOAD Command CP/M DDT Command The ZDT Command CP/M SYSGEN Command CP/M SUBMIT and XSUB Commands CP/M BDOS -- Basic I/O Operations CP/M BDOS -- Basic Disk Operations CP/M File Types CP/M BIOS Jump Vector :General Information on , h* ; SET TRACK ; PARAMETERS; ; TRACK IN 'C' SETTRK: SBCD TRK ;SAVE TRACK NUMBER RET ;**o* ; SET SECTOR ; PARAMETERS; ; SECTOR IN 'C' SETSEC: SBCD SECT RET ;RETURN FROM SETSEC. ;** ; SET DMA ADDRESS PARAMETERS ; DMA IN BC ; ; SET DISK DMA ADDRESS. ; SETDMA: SBCD DMAADD ;PUT AT DMA ADR ADDRESS. RET ; ;***,  t CP/M Thes fil reference ca b eithe unambiguou (ufn o ambiguou (afn) A unambiguou fil referenc uniquel identifie singl file whil a ambiguou fil referenc ma b satisfied by a number of different files. A unambiguou fil referenc i a exac nam o th specifie file I consist o u t eigh character i th fil nam an thre character in the file type. An unambiguous file reference is of the form --   pp .sss , 0CP/M CP/͠ i monito contro progra fo microcompute softwar developmen whic use IBM-compatibl flexibl disk (flopp disks fo mas storage Usin microcompute mainfram base o Intel' 808 o Zilog' Z8 microprocessor CP/ provide genera environmen fo progra construction storage an editing alon wit assembl an progra debu facilities A importan featur o CP/ i tha i ca b easil altere t execut wit an compute config, *** ; ; this is a pointer to the cp/m drive referance number to lun address ; map table. DW DRIVMAP ; SECTRAN: ;TRANSLATE THE SECTOR GIVEN BY BC USING THE ;TRANSLATE TABLE GIVEN BY DE XCHG ; HL = trans table MOV A,H ; see if null table ORA L DAD B JZ TRANSEC ; no table CPI 1 ; this is our flag to tell us JZ HDTRANS ; to use our algorithm MOV L,M ; get translated sector MVI H,0 ; less than 256 sectors RET TRANSEC: INX H ; mak,f Th character use i specifyin a unambiguou fil referenc ma not contain any of --  < > . , ; : = ? * [ ] A ambiguou fil referenc i use fo director searc an patter matching Th for o a ambiguou fil referenc i simila t a unambiguou reference excep th symbo '? ma b intersperse throughou th fil reference I variou command throughou CP/M th '? symbo matche an characte o fil nam i th '? positio,uratio whic use a Inte 808 o Zilo Z8 Microprocesso an ha a leas 20 byte o mai memor wit u t eight IBM-compatabl diskett drives. Th CP/ monito provide acces t program throug comprehensiv fil managemen system Th fil subsyste support name fil structure allowin dynami allocatio o fil spac a wel a sequentia an rando fil access Usin thi fil system u t 12 distinc program ca b store i bot sourc an-<-  into cp/m jump table ; LXI D,JTOLAY ; distination (cpm jump table) LXI H,FDJT ; source (floppy jump overlay) LXI B,06H ; jump table overlay length LDIR ; z80 block move LDA NEWDISK ; ENDIF MOV C,A JMP FSELECT ; floppy version of select IF PRIAM or SHUGART or QUANTUM NEW$NOT$FLOP: ; move hard disk jump table overlay into cp/m jump table LXI D,JTOLAY ; distination (cpm jump table) LXI H,HDJT ; source (hard disk overlay) LXI B,06H ; jump table overlay le-3l logged-i disk provid堠 statistica  :informatio abou particula files an displa o  alter device assignment.  DPI Loa th Periphera Interchang Progra fo subsequen  /disk file and peripheral transfer operations.  ED 0Load and execute the CP/M text editor program.  ;SUBMIT Submit a file of commands for batch processing.  -XSU Use i conjunctio wit SUBMIT tr-:6 line is not sent until the carriage return key is  depressed.  /Ctrl-M Terminates input (carriage return).  >Ctrl-J Terminates current input (line feed); CRT-oriented  ,Ctrl-C CP/M system reboot (warm start).  xCtrl-Z End input from the console (used in PIP and ED). Other control functions affect console output --  @Ctrl-P Copy all subsequent console output to the currently-  assigned list devic-Wngth LDIR ; z80 block move ; LDA NEWDISK MOV C,A ; pass new disk in c to bldptr CALL MOVPARMS EI RET ENDIF ; BLDPTR: MOV L,C ;COMPUTE SEL. DRIVE HEADER VECTOR MVI H,0 ;AS 16 BIT QTY. DAD H ;*2 (BUILD 16-BYTE OFFSET) DAD H ;*4 DAD H ;*8 DAD H ;*16 LXI D,DPBASE ;TABLE BASE DAD D ;EFFECTIVE ADDRESS OF VECTOR RET ; MOVPARMS: CALL BLDPTR SETBPM: PUSH B PUSH H ;BUILD POINTER TO BLOCKING VALUES LXI D,10 ;IN BACK OF DISK PARAMETER BLOCKS DAD - ; duplicate entry at lun0 DRIVMAP: ; LUN # DRIVE # DB 04 ; A hard disk DB 05 ; B hard disk DB 06 ; C hard disk DB 07 ; D hard disk DB 0FFH ; E DB 00 ; F floppy DB 01 ; G floppy DB 0FFH ; H DB 03 ; I DB 0FFH ; J DB 0FFH ; K DB 0FFH ; L DB 0FFH ; M DB 0FFH ; N DB 0FFH ; O DB 0FFH ; P ENDIF ; map cpm drive numbers A to P into lun address ; Enter reg C = cpm drive reference, Exit Acc = lun address MAPLUN: MVI A,15 -Z#e (LST:). Output is sent to both  7the list device and the console device until the next  Ctrl-P is typed.  CCtrl-S Stop the console output temporarily. Program execution  6and output continue when the next character is typed  at the console. Typing Ctrl-C returns control to CP/M. Inpu line ca generall b u t 25 character i length The ar not acted upon until the carriage return key is typed. -wD ; MOV E,M ;POINT TO DISK PARAMETER BLOCK INX H ; MOV D,M ; XCHG ;BUILD POINTER TO LXI D,17 ;BLOCKING PARAMETERS DAD D ; LXI D,CPMSPT ;CPM SECTORS/TRACK LXI B,0BH ;BYTES TO MOVE LDIR ; POP H ; POP B ; RET ; ; CLEARCOM: LXI H,COMDATA ; LXI D,0 ; LXI B,COMLENGTH ; FILLIT: MOV M,E ; enter w/ hl > dest, e = fill char INX H ; bc block length DCX B ; MOV A,C ; ORA B ; RZ ; JMP FILLIT ; ; PMSG: M-; new drive outside table ? CMP C MVI A,0FFH RC LXI H,DRIVMAP MVI B,0 DAD B MOV A,M ; get lun address RET ;*** ; SELECT DISK ;PARAMETERS ; NEW DISK IN 'C' ; IF LOGGED IN BEFORE, ROUTINE WILL ; ONLY UPDATE 'NEWDISK'. DBLOCKING ; WILL MAKE THE CALL TO SELD1. ; SELD1 RESETS DENSITY IF NOT DONE ; ALREADY. ;**, ; SELDSK: IF MLDR OR XMLDR PUSH B -:CP/M Built-In Commands  DER af -- Th ER (erase comman remove file fro th   currently logged-in disk.  DDIҠ af -- Th DI (directory comman cause th name o al  @ file whic satisf th ambiguou fil nam af t b liste  @ o th consol device Al file ar liste i n af i  given.  DREΠ ufn1=ufn -- Th RE (rename comman allow th use t   chang th name -OV A,M ; get a character ORA A ; is it 0 RZ ; return MOV C,A ; PUSH H ; CALL COUTE ; print POP H ; INX H ; JMP PMSG ; ; IF DBLOCK SREAD: JMP BLREAD ; de-blocking read routine SWRITE: ; de-blocking write routine JMP BLWRT ; JTOLAY: AREAD: JMP READ ; this location modified by code above AWRITE: JMP WRITE ; same ELSE JTOLAY: SREAD: JMP READ ; floppy or hardisk SWRITE: JMP WRITE ; same ENDIF ; IF PRIAM or SHUGART or QUA-; CALL CLEARCOM ; common data area doesnt get init POP B ; by boot or warm boot so.... ENDIF ; DI CALL MAPLUN LXI H,0 ; error flag CPI 0FFH ; error from maplun? JNZ SELOK ; disk exists LDA BOOTDISK ; STA CDISK ; bad address EI RET SELOK: MOV C,A ; replace with lun STA NEWDISK ; remember new disk IF PRIAM or SHUGART or QUANTUM LDA OLDISK ; is old disk a flop CPI 04H ; floppy lun's are 0,1,2,3 JNC OLD$NOT$FLOP ENDIF ; save old disk (fl-.o file o disk Th fil satisfyin ufn   is changed to ufn1.  DSAVŠ uf -- Th SAV comman place page (256-byt blocks  2 onto disk from the TPA and names this file ufn.  DTYPŠ uf -- Th TYP comman display th content o th ASCI  @ sourc fil uf o th currentl logged-i dis a th   console device.  DUSE -- Upo col boot th use i automaticall logge i t   Use Ar- In Fo example X?Y.C?͠ wil matc XZY.CO an X3Y.CEM Th '* symbo i use t matc al character o fil nam o fil type Fo example *.CO wil matc XZY.COM and HELP.COM, while HELP.* will match HELP.COM and HELP.HLP. :CP/M Likne Editing and Output Control The following are the line editing functions supported by CP/M --  ;rubout Delete and echo the last character typed at the  console.  )Ctrl-Ƞ Delet th las characte- oppy) track in track table IF DUAL ;IF DUAL DRIVE, ANI 0FEH ;CLEAR OUT BIT 0. ENDIF IF PRIAM or SHUGART or QUANTUM ; this routine req because you could LDA LASTFLOP ; be on flop, go priam, come back to MOV E,A ; another flop which screws up track MVI D,0 ; register on 91 LXI H,TRTAB ; DAD D ; IN TRACK ; MOV M,A ; ; OLD$NOT$FLOP: ; is new disk a floppy ? LDA NEWDISK ; CPI 04H ; JNC NEW$NOT$FLOP ; ; move in floppy jump table overlay- 9e 0 whic i compatabl wit CP/ 1. directories  @ Th USE comman allow th use t mov t anothe logica  A are withi th sam directory area ar numbere 0-15  @ Th ERA DIR REN SAVE an TYP command appl t th  e current User Area. :CP/M Transient Commands The CP/M standard transient commands are --  DSTAԠ Lis th numbe o byte o storag and data o th  current-  typed Backspac on  character; CRT-oriented  8Ctrl-U Delete the entire line typed at the console.  DCtrl- Delet th entir lin type a th console Backspac  5t th beginnin o th curren line; CRT-oriented.  >Ctrl-R Retype current command line: types a "clean line"  ,following character deletion with rubouts.  i thi wa i exite b eithe typin a empt .o Iobyte Assign:  CON: = TTY: CRT: BAT: UC1:  RDR: = TTY: PTR: UR1: UR2:  PUN: = TTY: PTP: UP1: UP2:  . LST: = TTY: CRT: LPT: UL1: STAT DEV:  DDispla th curren logica t physica devic mapping Fo  &example, the list may appear as --  CON: = CRT:  PUN: = PTP:  RDR: = UR1: ; LST: = TTY: STAT d:afn [$R/O or $R/W or $SYS or $DIR]  Se th variou .1 and Modem  UC1: In=CRT, Out=CRT and Modem  RDR: TTY: Model 43 Teletype  PTR: Modem  !UR1: CRT and Modem w/CRT Output  UR2: CRT and Modem  PUN: TTY: Model 43 Teletype  PTP: Modem  UP1: CRT and Modem  UP2: CRT and Modem  LST: TTY:. 6 comman lin (jus carriag return o Ctrl-  & as the first character of the line.  DPIР cmn Engag PIP execut th specifie command an  G return to CP/M. The form of each command line in PIP is --  vdestination = source#1, source#2, source#3, ..., source#n The general forms of PIP command lines are --  Ex:=y:af Cop al file satisfyin af fro driv t . 1permanen fil indicators R/O=Read/Only  JR/W=Read/Write, SYS=System, DIR=Non-System STAT ld1=pd1, ld2=pd2, ...  DChang th logica t physica devic assignments Logica  Ddevic ld i assigne t physica devic pd1 etc Th vali  logical device names are --  & CON: The system console device  ) RDR: The paper tape reader device  ( PUN: The paper tape punch device   LST: /./Yransfer operations to the console. F Filter (remove) form feeds from the file. Gn Get File from User Number n (n in the range 0 - 15) He dat transfer Al dat i checke fo prope Inte he fil format. I Ignore ':00' records in the transfer of Intel hex format file. L Translate upper case to lower case alphabetics. N Add line numbers to each line transferred to the destination. O Object file (non-ASCII) transfer. Ignore End o/FStar executio a th specifie addres an se breakpoin  at the address b. Gs,b,c  Same as above with breakpoints at b and c. G,b Start execution at the current value of the PC with breakpoint b. G,b,c  Same as above with breakpoints at b and c. If Insert a file name f into the default FCB. L List 12 lines of disassembled code from the current address. Ls List 12 lines from the specified address s. Ls,f List / !disengage line numbers (verify)  0V -Print memory buffer info (free/total usage)  nW Write lines  nX "Transfer n lines to X$$$$$$$.LIB  0X Empty X$$$$$$$.LIB  nZ Sleep  #+/- n Move and type (+/- nLT)  n: #Move to absolute line (V engaged)  :n Process from current line to specified line (V engaged) :CP/M ASM Command Th AS Comman load an execute th CP/ 808 assemble/ f File. Pn Include page ejects at every n lines. Qs^ڠQui copyin fro th sourc devic o fil whe th strin (terminated by Ctrl-Z) is encountered. R Read system files Ss^Z Start copying from the source file when the string s is seen. Tn Expand tabs to every nth column. U Translate lower case to upper case alphabetics. V Verify that data has been copied correctly. W Write over R/O files without console interrogation / Flines of disassembled code from s to f. Ms,f,d Move the block from address s to f to destination at address d. R Read file in FCB into memory at 100H. Rb Read file in FCB into memory with offset b from 100H. Ss Set (examine and alter) memory starting at address s. T Trace the next instruction. Tn Trace the next n instructions. U Untrace -- like Trace, but intermediate steps are not displayed. X Examine all registers / r I i o the form --  ASM filename.xyz where  Bfilename ... is the name of the file 'filename.ASM' to assemble  x 9 ... designates the disk name which contains the source  y 7 ... designates the disk name to contain the hex file  . (y=Z suppresses generation of the hex file)  z 9 ... designates the disk name to contain the print file  . (y=X lists on CON:, y=Z suppresses listing) /  Z Zero the parity bit on input for each ASCII character. :CP/M ED Command Th EĠ Progra i th CP/͠ syste contex editor whic allow creatio an alteratio o ASCI files Complet detail ar give i th user's manual.B The following are the error indicators given by ED --  ? Unrecognized Command  > Memory buffer full  9# Cannot apply command the number of times specified  *O Cannot open LIB file in R command /Nand flags. Xr Examine specified registers or flag, where r may be --   C Carry flag   Z Zero flag   M Minus (sign) flag   I Interdigit Carry flag   A Accumulator   B BC Reg pair   D DE Reg pair   H HL Reg pair   S Stack pointer  _ P PC :The ZDT Command ZDT is a Z80 version of DDT. It is invoked by typing --  ZDT/\ Refer to the ASM Manual for further details. :CP/M LOAD Command Th LOA Comman read th fil specified whic i assume t contai Inte he forma machin cod an produce memor imag fil whic ca b subsequently executed (converts .HEX to .COM files). It is of the form -- LOAD filename where filename is the name of the file 'filename.HEX'. :The UNLOAD Command Th UNLOA Comman doe th revers o th LOA Comman -- i convert COM files to HEX fi/H The following are the control characters recognized by ED --  ^C System reboot  ^E -Physical (not entered in command)  ^H Character delete (backspace)  ^I Logical tab  ^J New line (line feed)  ^L 4Logical in search and substitute strings  ^M New line (carriage return)  ^U Line delete  ^X Line delete and backspace  ^Z /ands are --  2NUL: Send 40 Nulls (ASCII 0) to the device.  =EOF: Send a CP/M End of File character (ASCII Ctrl-Z).  @INP: Special PIP input source to be patched (see manual).  DOUT Specia PIР outpu destinatio t b patche (se  manual).  DPRN Sam a LST: bu tab ar expande a ever eight  :characte position line ar numbered an pag eject  are inse/les. It is of the form --  UNLOAD filename where filename is the name of the file 'filename.COM'. :CP/M DDT Command Th DDԠ Progra allow dynami interactiv testin an debuggin o programs generated in the CP/M environment. It is invoked by --  DDT  DDT filename.HEX  DDT filename.COM where 'filename' is the name of the program to be loaded or tested. DDT responds to the normal CP/M input line editing characters. DDT respo/u String terminator  Rubout Character delete  _Break Discontinue command The following are the commands recognized by ED --  nA Append lines  &+/- B Beginning/Bottom of buffer  $+/- nC Move character positions  +/- nD Delete characters  E  Exit  nFs^Z Find string  H # End edit, close and reopen files  Is^Z Insert characters  nJ Place /rted every 60 lines with an initial eject. Th use ca als specif on o mor PIР parameter enclose i square brackets separated by zero or more blanks. These parameters are --   Bloc mod transfer Dat i buffere b PI unti a ASCI X-  Off character (Ctrl-S) is received from the source device. D Delet character whic exten pas colum i th transfe o  Hdata to the destination from the character source. E Echo all t/ends to the following commands -- As Perform inline assembly starting at the specified address s. D Display memory from the current address for 16 display lines. Ds Display memory from address s for 16 display lines. Ds,f Display memory from address s to address f. Fs,f,c Fill memory from start address s to final address f with byte c. G Start execution at the current value of the PC. Gs Start execution at the specified address s. Gs,/lstrings in juxtaposition  +/- nK Kill (delete) lines  +/- nL Move down/up lines  nM Macro definition  O  Return to original file  +/- nP Move and print pages  Q  Quit with no file changes  R  Read library file  nSs1^Zs2^Z  Substitute s2 for s1  +/- nT Type lines  :+/- U Translate lower to upper case if U; none if -U  +/- V Engage/00bbb eeee nnnn  @ Compar memor fro addres bbb t addres eee t bloc   starting at nnnn.  D bbbb eeee  ! Dump memory from bbbb to eeee.  E bbbb eeee  @ Searc fo ASCI strin fro bbb t eeee Strin i a  5 most 16 characters. String is terminated by .  F bbbb eeee  @ Searc fo he strin fro bbb t eeee Strin i   ter0} C=2,   D=3 Open File 115 Address of FCB Byte address of FCB   in DE a if found or 0FFH if not Close File 16 Address of FCB Byte address of FCB   in DE g if found or 0FFH if not Search for File 17 Address of FCB Byte address of FCB (0-3)   in DE 0 if found or 0FFH if not Search for Next 0f-relocate directl belo th CCP Al subsequen SUBMI comman line ar processe b XSUB s tha program whic rea buffere consol inpu (BDOӠ Functio 10 receiv inpu directl fro th SUBMI File Whil XSU i i memory i print th messag "(xsu active) o eac war boot A exampl o th use of XSUB to display memory from 100H to 1FFH is --  XSUB  DDT  D100,1FF  G0 :CP/M BDOS -- Ba0;minated by .  G   Go to next breakpoint.  H aaaa nnnn  ; Hex add and subtract. Computes aaaa+nnnn and aaaa-nnnn.  I nn  # Input. Prints value at port nn.  J nnnn  ( Jump to and execute at location nnnn.  K   Keyboard echo.  L filename.typ nnnn  0 Loads specified disk file into location nnnn.  M bbbb eeee nnnn   Move block from bbbb to ee0M618 Address of FCB Byte address of next FCB   in DE g if found or 0FFH if not Delete File 19 Address of FCB Byte address of FCB (0-3)   in DE if found or 0FFH if not Function and Number Input Parameters Output Parameters Read Next Record 20 Address of FCB 0=successful read   in DE 1=read past EOF   0 }sic I/O Operations Function and Number Input Parameters Output Parameters System Reset 0 None (None Read Console 1 None kASCII Char in A Write Console 2 ASCII Char in E None Read Reader 3 None XASCII Char in A Write Punch 4 ASCII Char in E None Write List `5 ASCII Char in E None Direct Con I/O 6 ASCII Char in E I/O Status in0 ee-1 to nnnn.  N aaaa  ! Enter offset aaaa for loading.  O nn dd  Output byte dd to port nn.  P bbbb  @ Inpu he int memor fro keyboar startin a bbbb or backs pointer.  Q bbbb eeee  $ Dumps from bbbb to eeee in ASCII.  R n ll tt ss bbbb  @ Rea bloc o dat fro dis o lengt l (256-byt pages  starting at 0 BO ^ 2=reading random data Write Next Rec 21 Address of FCB 0=successful write   in DE 1=error in extending  2=end of disk data  %255=no more dir space Make File 422 Address of FCB Byte address of FCB or   in DE 1 255 if no more dir space Rename FCB 0 ΁0 A if E=0FFH Get I/O Status 7 None I/O Status in A Put I/O Status 8 I/O Status in E None Print Buffer 9 Address of string None   terminated by $  Q in DE Read Buffer 10 Address of Read Read Buffer is filled  1 Buffer in DE Console Ready 11 None LSB of A is 1 if char  0 ,2track tt and sector ss placing the data at bbbb.  S bbbb eeee  1 Disassembly (symbolic dump) from bbbb to eeee.  T bbbb eeee  / Destructive memory test from bbbb to eeee-1.  U bbbb   Set breakpoint at bbbb.  V  , Display all currently-set breakpoints.  W n ll tt ss bbbb  @ Writ o dis th dat a bbb fo lengt o l startin  * at track tt, sector ss. ll is in 256-byt0̋723 Address of FCB Byte Address of Dir entry   in DE 7 or 255 if no match Return Log Code 24 None 6Login vector in HL Read Drive No 25 None Number of logged-in drive  O (A=0, B=1, C=2, D=3) Set DMA Address 26 Address of 128 None  Pbyte buffer in DE Function and Number Input Parameters Output P0 ready *All function numbers are passed in Reg C. I/O Status Byte -- Value Bits 6&7 Bits 4&5 Bits 2&3 Bits 0&1 00 CON:=TTY: RDR:=TTY: PUN:=TTY: LST:=TTY: 01 . CRT: PTR: PTP: CRT: 10 . BAT: UR1: UP1: LPT: 11 UC1: UR2: UP2: UL1: Read Buffer -- Byte Function 1 Maximum Buffer Length 2 Current Buffer Length (returned value) 30 e pages.  X   Display registers.  Z bbbb eeee dd  Zero or set memory from bbbb to eeee-1 with byte dd. :CP/M SYSGEN Command Th SYSGE transien comman allow generatio o a initialize dis containing the CP/M Operating System. It is invoked by typing  SYSGEN Onc invoked th use i prompte throug th session Refe t th CP/M Manual for further details. :CP/M SUBMIT and XSUB Commands Th SUBMIԠ 0 Th command recognize b ZD ar inpu i single-characte inpu mode N inpu lin editin i done an eac comman expect a exac input Al byt value ar exactl tw characters an al addresse ar exactly four charNone Log-In Disk 14 Value in Reg E None  A=0, B=1,0,comman allow CP/ command t b batche togethe fo automatic processing. The form of this command is SUBMIT ufn parm1 parm2 ... parmn Th uf give i th SUBMI comman mus b th filenam (no type o fil whic exist o th currentl logged-i dis wit a assume fil type of '.SUB'. Refer to the CP/M Manual for further details. Th XSU  comman extend th powe o th SUBMIԠ facility Whe specifie a th firs lin o SUBMI File i sel1W1NTUM HEXOUT: JMP HEX3 HEX1: PUSH PSW RRC!RRC!RRC!RRC CALL HEX2 POP PSW HEX2: ANI 0FH ADI 90H DAA ACI 40H DAA MOV C,A JMP CONOUT HEX3: CALL HEX1 RET ENDIF ;**' ; ; END OF BASIC I.O. ROUTINES ; ;** ;  ELSE JTOLAY: SREAD: JMP READ ; floppy or hardisk SWRITE: JMP WRITE ; same ENDIF ; IF PRIAM or SHUGART or QUA1o connecto o pin 3,2, an respectively. Thes term onl hol tru i yo ar modem DB-2 connecto piassignment shoul alway b referre t a i th mode wa th subject Therefor i pi 3 i "Transmit" i yo ar terminal yo shoul receiv o pi 3 Ther ar othe signal o DB-2 RS-23 seria connecto tha ar standard Thes signal wer originall intende fo mode us an thei name reflec thes intentions The are CT (Clea t send)1 $ ҹ2NfV *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$  _ 2Gf 2Hfm\ڡ\!`]nG~2Mfʳ ß& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $  $ ҹ2NfV *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$  _ 2Gf 2Hfm\ڡ\!`]nG~2Mfʳ ß& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ 1WIOS.HEX RE-BOOTING TO CP/M FATAL FILE READ ERROR... REBOOTING CODE BYTE ERROR SYSTEM TOO LARGE TO FIT ON SYSTEM TRACKS...REBOOTING CODE BYTE NOT IMPLIMENTED YET... REBOOTINGVbbbbbccBcTccSOURCE DRIVE NAME (OR RETURN TO SKIP)SOURCE ON , THEN TYPE RETURNDESTINATION DRIVE? (or to re-boot and save image of system) To save system type, "SAVE xxxCPM.SYS" ( where xxx = reference identifiers )DESTINATION ON , THEN TYPE RETURNPERMANENT ERROR, TYPE RETURN TO IGNORE FUNCTION 1L RT (Reques t send) DS (Dat se ready) DTR (Data terminal ready). Thes "secondar signals a the ar calle ar use tinfor th termina use whe th compute an transmissio equipmen ca sen data. Whe attachin printer w us th principa signal t conve dat i bot direction an th secondar signal t "handshake" T handshak mean t infor eac othe whe yo ar prepare t communicate It' rathe lik pickin u th phon afte hearin i rin1 $ ҹ2NfV *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$  _ 2Gf 2Hfm\ڡ\!`]nG~2Mfʳ ß& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ `3P3P3P3P3P3P3P3P4PvP7P=PBPQ1R3P3P`i"Py2P`i"P>>*P ~:MfG ®P>2PxʔPʔP>2P'P!P!HP"PhP2Px »P!SP%P!TP&!EVP>Z'P!XP"PhP2P 1#COMPLETE ( to continue or <^C> to re-boot and SAVE )INVALID DRIVE NAME (USE A to P)NO SOURCE FILE ON DISKSOURCE FILE INCOMPLETEe xxx = referencsS" ( where xxx = reference identifiers )DESTINATION ON , THEN TYPE RETURNPERMANENT ERROR, TYPE RETURN TO IGNORE FUNCTION 1 an sayin "Hello" The th othe perso identifie himselfan s on Human "handshake i man way tha ar no readil apparent Facin someon an noddin you hea t star conversation is "handshaking". O ou Paddl card a th bac o th compute ar place fo tw resistors The ar calle "pul up resistor an mus b installe i th seria por handshakin line DS an CTӠ ar no t b used These resistor ca b anythin fro 1 t 10K I buffe f1  D C B A  Baud D C B A -------|---  --|--- 5 00  91200 ( 07 ) 75 | O O O X ( 01H ) 91800 | X O O O ( 08H ) 110 | O O X O ( 02H ) 92000 | X O O X ( 09H ) 134.5 | O O X X ( 03H ) 92400 | X O X O ( 0AH ) 150 | O X O O ( 04H ) 93600 | X O X X ( 0BH ) 300 | O X O X ( 05H ) 4800 | X X O O ( 0CH ) 1  $ ҹ2NfV *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$  _ 2Gf 2Hfm\ڡ\!`]nG~2Mfʳ ß& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $  $ ҹ2NfV *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$  _ 2Gf 2Hfm\ڡ\!`]nG~2Mfʳ ß& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ 1 ul handshakin i t b used th correc lin mus b locate whic indicate tha statu o th printe yo ar using Th resisto "pullin up th statu lin yo wis t us mus b remove (eithe ca b used) an jumpe soldere betwee th RS-23 lin an plac wher th resisto was Th othe availabl handshakin lin ca b use fo OΠ LINE OF LINŠ statu o ?? Bu fo an transmissio t tak plac bot seria unit mus b a th sam bau rat an1 f 60 06  %720 ( 0DH ) | %9600 | X X X O ( 0EH ) |  19200 | X X X X ( 0FH )  N O T E : Mak sur whe usin th abov char tha th position w sho correspon t th typ o switc yo hav o th board Som models of switches have the "ON" to the opposite side. .pa  SOME TIPS ON HOOKING UP PRIN1  $ ҹ2NfV *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$  _ 2Gf 2Hfm\ڡ\!`]nG~2Mfʳ ß& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $  $ ҹ2NfV *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$  _ 2Gf 2Hfm\ڡ\!`]nG~2Mfʳ ß& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ 1^v bot handshak lines must be acive (high). NOTE: Pin 20, DTR -----> | Will not work on 8251, use CTS, pin 5  14 ___V__ 25 DB-25 / .\ - As a MODEM appears -   / .\ ( and your computer )   -- 13   1 2 3 4 5 6 7   F T R R C D G ! 8 DATA BITS, 1 STOP, NO PARITY   R X X T T S N   M S S R D  1TERS Almosal seria printer us fou basi lines Ou computer "look lik modem i term o RS-23 specifications Tha i becaus originall terminal attache themselve t modem tha i tur talke ove phon line t mainframes Whe chea Micro computer cam o th scen i wa logica t mak the plu directl int th terminals Th minimu line neede t maintai communicatio arTransmit Receive Logi Ground an Fram Ground Thes ar o DB-2 1 $ ҹ2NfV *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$  _ 2Gf 2Hfm\ڡ\!`]nG~2Mfʳ ß& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $  $ ҹ2NfV *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$  _ 2Gf 2Hfm\ڡ\!`]nG~2Mfʳ ß& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ 22({ addres give b Re  (0...76) SETSEà 21Ƞ * Se secto addres give b Re  (1...26) SETDMA  24H .Set subsequent DMA address (RP B&C) READ  27H %Read track/sector (block) WRITE 2AH 'Write track/sector (block) LISTST  2DH List Device Status  Reg A = 00 if no char2&{f disk Function and Number Input Parameters Output Parameters Write Random 34 DE=FCB addr  A=return code  1=reading unwritten data  2=(not used)  3=can't close curr ext  4=seek to unwritten ext  5=dir overflow  2  | | |     - XOR data sciences, inc. -! | | | | | | CPU Component Side |   2 PARALLEL CABLE WIRING This cable is used for Centronics interface printers. It uses a 8255, PA0-7 are used for data transfer, PB0-7 are tied together for data strobe PC6 for ACK from printer. NOTE Thi cabl i availabl fro9 you ՠ Ӡ MICRϠ SALE distributor. 26 Pin 36 Pin --  -- CPU CABLE |  | CENT. CONN. (1) A2 B6=seek past end of disk Compute File Siz 35 DE=FCB addr  Random Rec Field set  8 to file size Set Random Rec 36 DE=FCB addr Random Rec Field set *All function numbers are passed in Reg C :CP/M File Types AIN ALGOL 60 Intermediate ALG ALGOL 60 Source File ASM Assembler Source File BAK Backup File BAS BASIC Source File C C Source File2+yXOUT: JMP HEX3 HEX1: PUSH PSW RRC!RRC!RRC!RRC CALL HEX2 POP PSW HEX2: ANI 0FH ADI 90H DAA ACI 40H DAA MOV C,A JMP CONOUT HEX3: CALL HEX1 RET ENDIF ;**' ; ; END OF BASIC I.O. ROUTINES ; ;** ; TOLAY: SREAD: JMP READ ; floppy or hardisk SWRITE: JMP WRITE ; same ENDIF ; IF PRIAM or SHUGART or QUANTUM HE2D0 |--- -> ---|D0 (2) (2) AD1 |--- -> -- -|D1 (3) P (3) AD2 |--- -> -- -|D2 (4) R 8 (4) AD3 |--- -> -- -|D3 (5) I 2 (5) AD4 |--- -> -- -|D4 (6) N 5 (6) AD5 |--- -> -- -|D5 (7) T 5 (7) AD6 |--- -> -- -|D6 (8) E (8) AD7 |--- -> -------2 COB COBOL Source File COM "Command" File FOR FORTRAN IV Source File HEX Intel "hex" code file HLP HELP File 7 INT BASIC Intermediate File LST Listing File MAC MACRO-80 Source File PAS PASCAL Source File PRN Assembler Listing File REL Relocatable Module SRC PASCAL/MT Source File SUB SUBMIT File a SYM Symbol File TC Tiny-C Source File TFS TFS Source File TXT Text Fil22K--|D7 (9) R   |  |______ (9-16)BD0-7 |=== -> ---|STROBE (1)   |  | (21) CD4 |--- <- ---|ON LINE (13)   |  | (22) CD5 |--- <- ---|BUSY (11)   |  |___ (23) CD6 |--- <- ---|ACK (10) 2<e $$$ Temporary File :CP/M BIOS Jump Vector Th followin i tabl representin th entr point int th CP/ BIOS of the major routines accessable to the user -- Routine Relative Offset Comment BOOT  00H Cold Start WBOOT 03H Warm Start CONST 06H Console Status  Reg A = 00 if no char ready  Reg A = FF if char r2 /arameters GeAllo Vec 2 Non Allocatio Vec Add i  ' HL Write Prot Disk 28 None (None Get R/O Vect 29 None tHL=R/O Vect Val Set File Attrib 30 Ptr to FCB in DE Dir code in A Get Disk Parms 31 None [HL=DPB Address Set/Get Usr Code 32 E=0FFH (get)/Code A=Current code (get)/no   (set) 2 /  |  | (26) GND |--- <-> ---|GND (17)   |  | --  --U- CPՠ 825 connecto pinou lookin fro fron wit edg connecto a bottom.  2 4 6 8  26 Serial Conn.    ___ __  | . | |. | |2 eady CONIN 09H $Console char in (Reg A) CONOUT  0CH #Console char out (Reg C) LIST  0FH List out (Reg C) PUNCH 12H Punch out (Reg C) READER  15H MReader in (Reg A) Routine Relative Offset Comment HOME  18H Move to track 00 SELDSK  1BH 6Select disk given by Reg C (A=0,B=1,...) SETTRˠ 1EȠ Se trac2  6value (set) Read Random 33 DE=FCB addr  A=return code  1=reading unwritten data  2=(not used)  3=can't close curr ext  4=seek to unwritten ext  5=(not used)  6=seek past end o2 !--| . |\-----|. |\----| |   -- - | -- | | |  \ __ \| \__ \| | | 1 3 5 7 9  25 | | | | | | CPU Component Side |   3E3 `% 4:%P @&P h P P P *}P :3P 4P @P P y2f INPUT ERROR$X  Î INCORRECT SECTOR NUMBER$t  õ INCORRECT TRACK NUMBER$   INCORRECT GROUP NUMBER (GREATER THAN 242)$  :1& NO FILE BY THAT NAME ON DRIVE A$ V NO FILE BY THAT NAME ON DRIVE B$4 v DISK DEAD ERROR$d Ù ERROR IN FILE NAME$ ø ADDRESS ERROR$  ERROR - HEX INPUT ONLY $ ~ :_*3 s function,$ / <^C> exits, Menu $ h Sectors are CP/M 128, i.e. on 512 byte disk$: Ó sect 2 will be begin at sect 5$s ã *$ >212,!" !s#  >!\!s# :M"m:: 2A2>:23x~# !@:Aҁ2ax?GL #BA\#; 7!@q6yVALIDATEڏ !@6ÑGROUP !@6æG !@6üMAPT !@6TRACK!@6FILL!@6T 3 3Y0 $ $Y THAT NAMRIVE A$V NO FILE BY THAT NAME ON DRIVE B$4 v DISK DEAD ERROR$d Ù ERROR IN FILE NAME$ ø ADDRESS       Drive to fill ?... $ AO*." !s# * Track ?... $  >(!}MD*."P!s# Y{ Starting sector ? ... $b  >(!}"ò Ending sector ? ... $ !s#  >(!}"!s#  Character to fill 30~!# 30 ?))) O }U "!@M6SSECTORk!@f6hS }U 2'2(" @6Ï-Ҵ}U 2(!'G~2(p(* @6EDITҮ( EDIT - $ ! s#  >! 6WRITE!#6'STOPS! 0D O)))) 0-}f.ä|p}"  Ø͊Ɛ'@'_:́: ́ * ~́ !s#  >-}.:}* w 33# ready  1Reg A = FF if char ready SECTRAΠ 30 +Translat secto numbe i Re à usin  *tabl pointe t b DE physica secto  number returned in Reg L 0sector (block) LISTST  2DH List Device Status  Reg A = 00 if no char3>y: <2 ~!" t*.*"#Ͱ :'7G?GO*.!"Eq :O:G*."[ڙ :_*.'"rÏ  DRIVE $w :A_ï - TRACK $ *  |Ľ{0__ͽ SECTOR $ !:'oͽ !':(4+>2'Ͱ :2((6# > w# ; ND .cw# N7yn# i w# p!\z3ځe!AÝCOM¦!" :_\ \ü:Û!" * : ́: ́ $ 333E~́ #y &     * ~F H >._#y e   9   * " * " >2+2):_:)O:*G*." ڙ :+7 ? O*.!" q *.'" o :+2+:O <2+· :)< 2)á :,2 SUCCESSFUL VALIDATION$  :X M DRIVE A$D  d DRIVE B$[  à ERROR - TRACK $r  :)!oͽâ SECTOR $  !:+oͽ >2,    }U 2- 333qs 2.Ͱ  +:.<2. &:-oT))):._:/_><7 :_H 2~2'2(:_`o" !"-Ý  _ GROUP ALLOCATION MAP DRIVE -$p  : õ A $   B $  *   x$  ~  0$  :-<2-%  1$  x@ y@ z@ \  #   m  $_  *-ͽå GROUPS REMAINING ON DISK OUT OF 243 $~  :_2)<2+:+7 ? O*.!" :)O:*G*." *.'" : 3 /12:":og,wU X O R DATA CP/M DUMP UTILITY VERS 1.6 $% |Quick Command Reference: $` úFill Track = FILL { Pgm will ask for details } $ Dump Track = T x { Where x is track } $ 4Dump Sector = T x S y { Where x is trk & y is Sect } $ s also = T x S y-z { Where y-z is Beg-End sects } $? íEdit Sector = T x S y EDIT { DDT cmds to edit,$~  WRITE or STOP to exit } $   <^S>, stops display, end3 44# RET ; IF PRIAM ; skew factor of 52 HDTRANS: MOV A,C ; get logical sector RAR ; divide by 2 JNC GOUT ADI 52 ; odd sector - add 52 GOUT: MVI H,0 MOV L,A INX H ; make relative to 1 RET ; ELSE HDTRANS: RET ENDI F ; ; ;**) ; ; DISK DRIVER SWAPPING ROUTINE ; ;** IF NOT PRIAM  7IF NOT SHUGART IF NOT QUANTUM ; the default warm boo4 rack 0 +1 DB 26 ; number of sectors on track 1 +1 DW 26 ; cpm sectors per track DB 128/128 ; cpm block size/cpm sector size DB 128/128-1 ; disk sector size/cpm sector size DB 0 ; logical to phisical sector map (1 = 2 phys sec.) DW 128 ; bytes per sector DB 00,00,00 TBLEND: EQU $ ; IF MLDR or XMLDR DIRBF: DS 128 IF DBLOCK HSTBUF: DS MAXHST ENDIF ; ENDSYS: EQU $ ; to make dsysgen happy ENDSYS1: DW ENDSYS ; ENDIF ; if mpmldr ; ;***4 B RET DENEXIT: POP H ; JR DEXIT ; ; INITDIR: IF MDISK MVI A,0FDH ; JMP MDENTRY ; ENDIF ; ; find a match for the density flag , leave pointer pointing at flag. ; default at single sided single density. therefore single sided single density ; must be the last block in the list of tables. ; GETBLOCK: LXI D,TBLEND-TBLSTART ; length of one block + flag and GETBLOCK1: ; internal code MOV A,M ; get test match CPI SD128 ; end of table ? RZ CMP C ; match RZ4 t number BOOTDISK: DB 00 ; this is the drive that we will warm ; boot from ; this is the logical drive exchange ; table that exchanges logical drives ; A, B, ... F for phyical LUN numbers ; 0ffh is an invalid number ; indicating the drive does not exist ; duplicate entry at lun0 DRIVMAP: ; LUN # DRIVE # DB 00 ; A DB 01 ; B DB 02 ; C DB 03 ; D DB 0FFH ; E DB 0FFH ; F DB 0FFH ; G DB 0FFH ; H DB 0FFH ; I DB 0FFH4 T/**/* ; ; END OF COMMON DATA AND TABLE AREA ; ; ** ; 6 ; bytes per sector DB 00,00,00 TBLEND: EQU $ ; IF MLDR or XMLDR DIRBF: DS 128 IF DBLOCK HSTBUF: DS MAXHST ENDIF ; ENDSYS: EQU $ ; to make dsysgen happy ENDSYS1: DW ENDSYS ; ENDIF ; if mpmldr ; ;***4  DAD D ; point to next table JMP GETBLOCK1 ; look again ; IF MDISK MWRITE: MVI A,0FFH ; STA MDFLG ; CALL MOVDATA ; CALL MOVDATA1 ; JR MDEXIT ; MREAD: CALL MOVDATA1 ; CALL MOVDATA ; MDEXIT: XRA A ; OUT 8 ; restore system STA MDFLG ; RET ; ; MOVDATA: XRA A ; OUT 8 ; main in LHLD DMAADD ; write op LXI D,HSTBUF ; LDA MDFLG ; INR A ; JZ XFERDATA ; XCHG ; JR XFERDATA ; MOVDATA1: CALL CALCLOOP ; L4 ; J DB 0FFH ; K DB 0FFH ; L DB 0FFH ; M DB 0FFH ; N DB 0FFH ; O DB 0FFH ; P ENDIF ENDIF ENDIF IF PRIAM OR SHUGART OR QUANTUM ; the default warm boot number BOOTDISK: DB 00 ; this is the drive that we will warm ; boot from ; this is the logical drive exchange ; table that exchanges logical drives ; A, B, ... F for phyical LUN numbers ; 0ffh is an invalid number ; indicating the drive does not exist ; duplicate ent4NA A ; set zero flag so subtract will work DSBC DE ; SHLD DMAADD ; for this subtraction to work POP D ; INR D ; compensate for boot (nsects) LXI B,1 ; hard disk system begins at trk 0 JMP RB1 ; sect 1, not 2 ; ENDIF ; if Spriam or shugart ENDIF ; if mmpm ENDIF ; if mldr ENDIF ; if xmldr ;**$ ; HOME HOME: LXI B,0 ; ;** ; SET TRA4CXI D,HSTBUF ; LDA MDFLG ; INR A ; JNZ XFERDATA ; XCHG ; XFERDATA: LXI B,128 ; LDIR ; RET ; CALCLOOP: LXI H,0 ; LXI D,2000H ; 8 k LDA HSTTRK ; MVI C,1 ; CLC0: SUI 6 ; JC CLC1 ; INR C ; JR CLC0 CLC1: ADI 6 ; PUSH PSW ; MOV A,C ; OUT 8 ; POP PSW ; CALL CLC2 ; LXI D,128 ; LDA HSTSEC ; DCR A ; rel 0 CLC2: ORA A ; RZ ; DAD D ; DCR A ; JR CLC2 ; ; MDFLG: DB 0 END4 LHLD HSTSEC ; dblocking decides what SEC ELSE LHLD SECT ; ENDIF SHLD TEMPSEC LXI H,1 IF DBLOCK SHLD HSTSEC ; ELSE SHLD SECT ; ENDIF IF DBLOCK LHLD HSTDMA ELSE LHLD DMAADD ENDIF SHLD TEMPDMA LXI H,DIRBF IF DBLOCK SHLD HSTDMA ELSE SHLD DMAADD ;POINT TO SCRATCHPAD AREA ENDIF CALL READ ;READ TK 0 SECTOR 1 TO GET DENSITY ORA A ; JNZ DENEXIT ; LHLD TEMPDMA IF DBLOCK SHLD HSTDMA ELSE SHLD DMAADD ENDIF LHLD TEMPSE4mWCK ; PARAMETERS; ; TRACK IN 'C' SETTRK: SBCD TRK ;SAVE TRACK NUMBER RET ;**o* ; SET SECTOR ; PARAMETERS; ; SECTOR IN 'C' SETSEC: SBCD SECT RET ;RETURN FROM SETSEC. ;** ; SET DMA ADDRESS PARAMETERS ; DMA IN BC ; ; SET DISK DMA ADDRESS. ; SETDMA: SBCD DMAADD ;PUT AT DMA ADR ADDRESS. RET ; ;**49IF ; ; software delay routine HDELAY: LXI D,8000 ;5555=25 MS DELAY AT 4MZ SDELAY: DCX D MOV A,D ORA E JNZ SDELAY RET ; CBIOS MESSAGES ; NRMSG: DB 'ready ',0 RNMSG: DB 'id not found ',0 CRCMSG: DB 'crc ',0 LDMSG: DB 'lost data ',0 BSYMSG: DB 'busy ',0 WPMSG: DB 'protect ',0 WFMSG: DB 'flt ',0 DFMSG: DB 0DH,0AH,'Track Error',0 BTMSG: DB 0DH,0AH,'boot ' ERRMSG: DB 'error' CRLFMS: DB 0DH,0AH,0 RDMSG: DB 0DH,0AH,'Read ',0 WTMSG: DB 0DH,0AH,'Write ',0 SKMSG: DB 0DH,0AH,'Seek 4C IF DBLOCK SHLD HSTSEC ELSE SHLD SECT ENDIF LHLD TEMPTRK IF DBLOCK LHLD HSTTRK ; dblocking decides what trk ELSE LHLD TRK ; includes head info ENDIF LDA DIRBF+07FH ; get density flag MDENTRY: MOV C,A ; pass to getblock in c LXI H,PARAMTBL ; point at start of tables CALL GETBLOCK ; find a match & return pointer INX H ; point to internal code MOV A,M ; get code LXI B,0 ; assume no sector trans. ANI 2 ; is code single density? JZ NOTRANS ; if4h** ; ; this is a pointer to the cp/m drive referance number to lun address ; map table. DW DRIVMAP ; SECTRAN: ;TRANSLATE THE SECTOR GIVEN BY BC USING THE ;TRANSLATE TABLE GIVEN BY DE XCHG ; HL = trans table MOV A,H ; see if null table ORA L DAD B JZ TRANSEC ; no table CPI 1 ; this is our flag to tell us JZ HDTRANS ; to use our algorithm MOV L,M ; get translated sector MVI H,0 ; less than 256 sectors RET TRANSEC: INX H ; make relative to 1 4',0 HEMSG: DB 0DH,0AH,'Home ',0 NNMSG: DB 0DH,0AH DRIVE: DB 0 DB ': Not Ready...' READYMSG: DB 0DH,0AH,'Hit space bar to retry, to reboot, ' DB 'any other key to continue ',0 ;!**#* ; ; END OF FLOPPY DRIVERS ; ;!*** ; ' ERRMSG: DB 'error' CRLFMS: DB 0DH,0AH,0 RDMSG: DB 0DH,0AH,'Read ',0 WTMSG: DB 0DH,0AH,'Write ',0 SKMSG: DB 0DH,0AH,'Seek 4| yes then get trans table LXI B,TRANS NOTRANS: MOV A,M ; get code again INX H ; point at header block XCHG ;SAVE DE POP H ;DENSITY FLAG POINTER MOV M,A ;UPDATE DFLAGS WITH DENSITY POP H ;GET DISK HEADER VECTOR PUSH H ;SAVE IT FOR RETURN MOV M,C ; INX H ; MOV M,B ;SET UP TRANSLATE TABLE ADDRESS LXI B,9 ;POINT TO PARM BLOCK DAD B ; MOV M,E ;SET UP ADDRESS INX H ; MOV M,D ; XRA A ; DEXIT: POP H ;RETURN SEL. DISK. HDR. VECTOR POP 5s5 save o dis  under the selected name with a default extension of .COM. P and D See Addenda to Section 2 of documentation. Thre number ar specifie afte th / an / switche ar executed They are given in the form --  [aaaa bbbb nn] aaaa - start address of program bbbb - address of next available byte nn - number of 256-byte pages used :Creating a FORTRAN-80 .COM File Ther ar tw basi way t creat .CO͠ fil o FORTRAN-8 pro5 AINT INT IDINT AMOD MOD AMAX0 AMAX1 MAX0 MAX1 DMAX1 AMIN0 AMIN1 MIN0 MIN1 DMIN1 FLOAT IFIX SIGN ISIGN DSIGN DIM IDIM SNGL DBLE EXP DEXP ALOG DLOG ALOG10 DLOG10 SIN DSIN COS DCOS TANH SQRT DSQRT ATAN DATAN ATAN2 DATAN2 DMOD PEEK POKE INP OUT :FORTRAN-80: FORTRAN-80 Logical Device Ass5?sourc progra file Th defaul extensions are --   FOR FORTRAN-80 Source File   MAC MACRO-80 Source File   PRN Print (Listing) File   REL Relocatable Object File  COM Absolute Object File ORGed to 100H Th specification fo eithe th objec file th listin file o bot ma b omitted I neithe listin fil no a objec fil i desired plac onl comm t th lef o th equa sign I5gram Fo example t generat PROG.CO fro PROG.FOR procee i on of the following ways -- I. Using SAVE F80 =PROG L80 PROG/E [aaaa bbbb nn] -- response from LINK-80 (necessary data) SAVE nn PROG.COM II. Using /:N LINK-80 Switch F80 =PROG L80 PROG/E,PROG/N # pages used :Creating a FORTRAN-80 .COM File Ther ar tw basi way t creat .CO͠ fil o FORTRAN-8 pro5 dignments LUN* Device ---- ------ 1,3,4,5 Preassigned to CON: 2 Preassigned to LST: 6-10 Preassigned to Disk Files (Reassignable) 11-255 User-Assignable * LUN = Logical Unit Number :LINK-80: Invoking LINK-80 Eac comman t LINK-8 consist o numbe o filename an switche separated by commas --  yobj-dev1:filename.ext/sw1,obj-dev2:filename.ext, ... I th inpu devic fo fil i omitted th defaul5  th name o th objec fil an th listin fil ar omitted th defaul i th nam of the source file. Logical CP/M devices may be specified as follows --  ( A:, B: Disk Drives (Only A: or B:)   HSR: High Speed Reader   LST: Line Printer  E TTY: Teletype or CRT Examples -- A>F80 *=TEST  QCompile the program TEST.FOR and place the object in TEST.REL *,TTY:=TEST  Compil th progra5 5  i th currentl logge disk I th extensio o fil i omitted th defaul i .REL Afte eac lin i typed LINK-8 wil loa o searc th specifie files and whe finished i wil lis al symbol tha remai undefine followe b a asterisk LINK-8 i invoke b th progra nam 'L80'. LINK-8 ca b use t generat .CO fil o FORTRAN-8 program This can be done by typing -- L80 program/E LINK-80 will respond with a string of the form5 k TEST.FOҠ an lis th progra o th terminal. No object is generated. *TESTOBJ=TEST.FOR  RCompile the program TEST.FOR and put object in TESTOBJ.REL *TEST,TEST=TEST  `Compil TEST.FOR an pu objec i TEST.RE an listin i TEST.PRN *,=TEST.FOR  Compil TEST.FO bu produc n objec o listin file Usefu for checking for errors. I al cases th i th promp fro FORTRAN-80 Th indicate operation ma als b55 --  E[aaaa bbbb nn] The user may then create the .COM file by typing --  SAVE nn program.COM :LINK-80: LINK-80 Switches Th followin ar th switche fo LINK-80 A fo FORTRAN-80 thes switches are preceeded by a slash (/). Switch Function ------ --v R Reset. Initialize loader. E,E:nam Exi LINK-80 FORLIB.RE wil b searche t satisf existin  Dundefine references I 'name i specified th valu o thi  symb5 performe b typin 'F80 followe b th option like 'F80 =TEST'. Refer to the 'FORTRAN-80 User's Manual', Copyright 1977, by Microsoft. :FORTRAN-80: FORTRAN-80 Compilation Switches numbe o differen switche ma b give i th comman strin tha wil affec th forma o th listin file Eac switc shoul b precede by a slash (/): Switch Function ------ -------- O Print all listing addresses in octal H Print all listing addresses in hexadecimal 5Invoking FORTRAN-80 and MACRO-80 FORTRAN-80 Compilation Switches FORTRAN-80 Library Subroutines FORTRAN-80 Logical Device Assignments Invoking LINK-80 LINK-80 Switches Creating a FORTRAN-80 .COM File :Invoking FORTRAN-80 and MACRO-80 Th FORTRAN-8 compile an th MACRO-8 assembler name F8 an M8 respectively ar invoke i simila fashion I bot cases th nam o th progra i give followe b a argumen list Thi argumen lis i of the general form -- ob5ol is used as the start address of the program. G,G:nam Go Star executio o program FORLIB.RE wil b searche t  satisfy any existing undefined references. U List all undefined references. Map Lis al define reference an thei values al undefine  wreferences are followed by an asterisk. Search Searc th fil specifie befor thi switc t satisf  Hreferences. I filename/ i specified th progra wil b5(default) N Do not list generated code R Force generation of an object file L Force generation of a listing file P Each /P allocates an extra 100 bytes of runtime stack space ͠ Specifie t th compile tha th generate cod shoul b i a form which can be loaded into ROM. :FORTRAN-80: FORTRAN-80 Library Subroutines Th standar librar (FORLIB.REL include th followin subroutine and functions -- ABS IABS DABS 5+j-dev:filename.ext,list-dev:filename.ext=  H source-dev:filename.ext These symbols are defined as follows --  Dobj-dev: The device on which the object program is to be written.  @list-dev: The device on which the program listing is written.  ksource-dev Th devic fro whic th sourc progra inpu t FORTRAN-80 or MACRO-80 is obtained.  pfilename.ext Th filenam an filenam extensio o th objec progra file th listin file an th 66  $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ 6?set -- put loader back in initial state /E or /E:Name  Exi LINK-8 an retur t CP/M Searc th syste librar fo an undefine references /E:Nam use Nam fo th star addres o the program. /G or /G:Name  Star executio o th program Again i /G:Nam i specified, Name defines the start address of execution. /N  W Save the binary on disk under the name 'filename.COM'. /P:adr and /D:adr 6Jsting src:fn3.ext is the device/filename for the source :MACRO-80 Switches The following switches may be specified in the command line --  +O Print all listing addresses in octal  3H Print all listing addresses in hexadecimal  )R Force generation of an object file  )L Force generation of a listing file  3C Force generation of a cross reference file  %Z Assemble Zilog (Z80) mnemonics  I Assemble Intel6  $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ 6x ] Se th Progra an Dat are origin fo th nex progra to be loaded. /U  f Lis th origi an en o th progra an dat are a wel as all undefined globals. /M  Lis th origi an en o th progra an dat area al define global an thei values an al undefine global followe b a asterisk. /S  8 Search 'filename.REL' to satisfy references. / I filename/ wa specifi6 (8080) mnemonics  Р Eac / allocate a extr 25 byte o stac spac fo us during assembly. Use /P if stack overflow errors occur during assembly. :MACRO-80 Pseudo-Ops The following are the pseudo-ops recognized by MACRO-80 --  ASEG COMMON CSEG DB DC  DS DSEG DW END ENTRY  .PUBLIC EQU EXT EXTRN NAME  /ORG PAGE SET SUBTTL TITLE  .COMMENT .PRI6  $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ 6   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ 6  NTX .RADIX .REQUEST .Z80  .8080 IF IFT IFE IFF  -IF1 IF2 IFDEF IFNDEF IFB  /IFNB ENDIF .LIST .XLIST .CREF  -.XCREF REPT ENDM MACRO IRP  .IRPC EXITM LOCAL COND ENDC  .*EJECT DEFB DEFS DEFW DEFM  0DEFL GLOBAL EXTERNAL INCLUDE MACLIB  NELSE .LALL .SALL .XALL :MACRO-80 In-Line Error Messages 6   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ 6   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ 6 A Argument Error O Bad opcode or objectionable syntax C Conditional nesting err P Phase error D Double Defined Symbol Q Questionable E External error b R Relocation M Multiply Defined Symbol U Undefined symbol N Number error h V Value error :MACRO-80 Console Error Messages No end statement encountered in input file  6-- no END statement Unterminated conditional  -- at least 6  $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ 6  $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ 6Jone conditional is unterminated Unterminated REPT/IRP/IRPC/MACRO  W-- at least one block is unterminated [xx] [No] Fatal error(s) [,xx warnings]  i-- the number of fatal errors and warnings :Invoking LINK-80 LINK-80 is invoked by typing --  L80 obj1:filename.ext/sw1,obj2:filename.ext/sw2,... wher objn:filename.ex denote .RE fil t b linke an sw denote switches which control the linking process. :LINK-80 Switches /R Re6ăs? ...$  >(!-}}!sw# (K*.!"<s*.$"J*.*"U*#B2!s# j@O*." !s# * Track ?... $  >(!}MD*."P!s# Y{ Starting sector ? ... $b  >(!}"ò Ending sector ? ... $ !s#  >(!}"!s#  Character to fill 7a7he, delete chars End edit and save changes :Program Statements (except I/O) Statement Syntax Function CALL CALL variable [(arg list)] Call assembly or FORTRAN routine CHAIN CHAIN [MERGE] filename [,[line exp][,ALL][,DELETE range]]  @ Cal progra an pas variable t it MERG wit ASCI  @ file allow overlays star a lin ex i given AL mean  = al variable wil b passe (otherwis COMMO only) DELET7bloating point # Double Precision 17.8 digit floating point :Commands Command Syntax %Function AUTO AUTO [line][,inc] 8 Generate line numbers CLEA CLEA [,[exp1][,exp2] &Clea progra variables Exp set  &en o memor an Exp set amoun  of stack space CONT CONT AContinue program execution DELETE DELETE [[start][-[end]]] 7Introduction to the Microsoft BASIC Interpreter Special Characters Variable Type Declaration Chars Commands Edit Mode Subcommands Program Statements (except I/O) PRINT USING Format Field Specifiers Input/Output Statements Operators Arithmetic Functions String Functions I/O and Special Functions Interpreter Error Codes Introduction to the Microsoft BASIC Compiler Compiler Commands and Switches Compiler Error Messages :Introduction to the Microsoft BASIC Interpreter Thi HEL Fil i 7  V allows deletion of an overlay before CHAIN is executed COMMON COMMON list of vars ` Pass vars to a CHAINed prog DEF DEF FNx[(arg list)]=exp Arith or String Function  DEF USRn=address %Define adr for nth assembly routine  ?DEFINT range(s) of letters Define default var type INTeger  DEFSNG " " "  "  " " " Single  DEFDBL " " "  "  " " " Double   7, Delete program lines EDIT EDIT line 2 Edit a program line FILES FILES [filename] )Directory LIST LIST [line[-[line]]] 5List program line(s) LLIST LLIST [line[-[line]]] = List program line(s) on printer LOAD LOAD filename[,R] 5 Load program; ,R means RUN MERGE MERGE filename @Merge prog on disk with that in mem NAME NAME old AS new 4 Change the name of a disk file NEW NEW 7derive fro th "Microsof BASI Referenc Book" an i i divide int tw part -- on coverin th Interprete an th othe coverin th Compiler Thes program proces program writte i almos exactl th sam languag -- Microsof BASIC ther ar mino difference betwee th two however an thes ar discusse i th fil under the Compiler Introduction. The MBASIC (Microsoft BASIC) Interpreter is invoked as follows -- MBASIC [][/F:<# 7 DEFSTR " " "  " _ " " " String DIM DIM list of subscripted vars Allocate arrays END END ; Stop prog and close files ERASE ERASE var [,var ... ] 2 Release space and var names ERROR ERROR code dGenerate error code/message FOR FOR var=exp TO exp [STEP exp] FOR loop Statement Syntax %Function GOSUB GOSUB line number ) Call BASIC subroutine GOTO GOTO li7 1 Delete current prog and vars NULL NULL exp sSet num of s after each line RENUM RENUM [[new][,[old][,inc]]] Renumber program lines RESET RESET 6 Init CP/M; use after disk change Command Syntax %Function RUN RUN [line number] & Run a prog (from a particular line)  RUN filename[,R] MRun a prog on disk SAV SAV filename[, o ,P Sav pro ont di7files>][/M:] I 0 then GOTO IF/THEN IF exp THEN stmt[:stmt] [ELSE stmt ... ]  6IF exp <> 0 then ... else ... LET [LET] var=exp ] Assignment MID MID$(string,n[,m])=string Replac portio o strin wit  default is 80 (term) and 132 (prin) :Edit Mode Subcommands A A Abort -- restore original line and restart Edit nCc Chang7 . :Special Characters ^A ;Enters Edit Mode on line being typed or last line typed ^C 6Interrupts program execution and returns to MBASIC ^G Rings at terminal ^H Deletes last char typed ^I Tab (every 8) ^O Halts/resumes program output ^R *Retypes the line currently being typed ^S Suspends program execution ^Q }Resumes execution after ^S ^U,^X Deletes line being typed Ends every line being typed in Breaks a 7 ~ ... ] & End FOR ON ERROR ON ERROR GOTO line Error trap subroutine GOTO ON/GOSUB ON exp GOSUB line[,line] Computed GOSUB ON/GOTO ON exp GOTO line[,line] Computed GOTO Statement Syntax !Function OPTION OPTION BASE n @ Min val for subscripts (n=0,1) BASE OUT OUT port,byte 1 Output byte to port POKE POKE address,byte & Memory put RANDOMIZE RANDOMIZE [exp]  Reseed random nu7 'e n characters nD Delete n characters E End edit and save changes; don't type rest of line Hstr Delete rest of line and insert string Istr Insert string at current pos nKc Kill all chars up to the nth occurrance of c L > Print the rest of the line and go to the start of the line Q Quit edit and restore original line nSc Search for nth occurrance of c Xstr Goto the end of the line and insert string Backspace over chars; in insert mod7 ological line into physical lines Deletes last char typed Escapes Edit Mode Subcommands . d Current line for EDIT, RENUM, DELETE, LIST, LLIST commands &O,& Prefix for Octal Constant &H Prefix for Hex Constant : /Separates statements typed on the same line ? SEquivalent to PRINT statement :Variable Type Declaration Characters $ String 0 to 255 chars % Integer 8 -32768 to 32767 ! Single Precision 7.1 digit f7&mber generator REM REM any text -Remark -- comment RESTORE RESTORE [line] 0Reset DATA pointer RESUME RESUME or RESUME 0 Return from ON ERROR GOTO  RESUME NEXT " Return to stmt after error line  RESUME line + Return to specified line RETURN RETURN &Return from subroutine STOP STOP AStop prog and print BREAK msg WAI WAI prot,mask[,select 88 ute value of expression ATN(exp) Arctangent of expression (in radians) CDBL(exp) Convert the expression to a double precision number CINT(exp) Convert the expression to an integer COS(exp) Cosine of the expression (in radians) CSNG(exp) Convert the expression to a single precision number EXP(exp) Raises the constant E to the power of the expression FIX(exp) Returns truncated integer of expression FRE(exp) Gives memory free space not used by MBASIC INT(8 %et string;] string var INPU Rea a entir lin fro terminal leadin semicolo suppresse   echo of /  LINE INPUT #f,string var  L Read an entire line from a disk file LSET LSET field var=string exp  D Stor dat i rando fil buffe left-justifie o left-justif  I a non-disk string in a given field OPEN OPEN mode,[#] f,filename  + Open a disk file; mode must be one of --   I = sequential input file 8n input port LOC(f @ Return nex recor numbe t rea o writ (rando file o  = number of sectors read or written (sequential file) LPOS(n) Returns carriage position of line printer (n is dummy) MKI$(value) Converts an integer to a 2-char string MKS$(value) Converts a single precision values to a 4-char string MKD$(value) Converts a double precision value to an 8-char string R Function Action PEEK(exp) Reads a byte from memory location speci8exp) Evaluates the expression for the largest integer LOG(exp) Gives the natural log of the expression RND[(exp)] Generates a random number   exp <0 seeds new sequence  ! exp =0 returns previous number  f exp >0 or omitted returns new random number Function Action SGN(exp) 1 if exp >0   0 if exp =0  b -1 if exp <0 SIN(exp) Sine of the expression (in radians) SQR(exp) Square root of e8 O = sequential output file  t R = random input/output file Statement Syntax/Function PRINT PRINT [USING format string;] exp [,exp ...]  8 Print data at the terminal using the format specified  1PRINT #f, [USING format string;] exp [,exp ...]   Write data to a disk file  .LPRINT [USING format string;] var [,var ...]  E Write data to a line printer PUT PUT [#] f [,record number]  " Write data from a random buffer t8, Paus unti inpu por [XO select  AND mask <> 0 WHILE/ WHILE exp stmts ... WEND Execute stmts as long as exp is T WEND :PRINT USING Format Field Specifiers Numeric Specifiers Specifier Digits Chars Definition #  1  1 Numeric field .  0  1 Decimal point +  0 , 1 Print leading or trailing sign -  0 5 1 Trailing sign (- if neg, otherwise) 8xpression TAN(exp) Tangent of the expression (in radians) :String Functions Function Action ASC(str) Returns ASCII value of first char in string CHR$(exp) Returns a 1-char string whose char has ASCII code of exp FRE(str) z Returns remaining memory free space HEX$(exp) Converts a number to a hexadecimal string INPUT$(length [,[#]f])  @ Return strin o lengt char rea fro consol o fro  + disk file; characters are not echoed IN8%.o a data file READ READ var [,var ...]  a Read data from a DATA statement into the specified vars RSET RSET field var = string exp  D Stor dat i rando fil buffe righ justifie o righ  M justify a non-disk string in a given field WRITE WRITE [list of exps]   Output data to the terminal  WRITE #f, list of exps  ` Output data to a sequential file or a random field buffer :Operators Symbol Function = Assign8** 2 + 2 Leading asterisk $  8 Floatin dolla sign place i fron o  leading digit **$ 2 4 3 Asterisk fill and floating dollar sign ,  1 4 1 Use comma every three digits ^^^^ 0 4 Exponential format _  0 E 1 Next character is literal String Specifiers Specifier  Definition ! Single c8<STR([exp,]str1,str2)  @ Return th firs positio o th firs occurrenc o str  in str1 starting at position exp LEFT$(str,len) Returns leftmost length chars of the string expression LEN(str) Returns the length of a string MID$(string,start[,length])  @ Return char fro th middl o th strin startin a th  @ positio specifie t th en o th strin o fo lengt  . characters Function Action OCT$(8 ment or equality test - Negation or subtraction + $Addition or string concatenation * Multiplication / $Division (floating point result) ^ Exponentiation \ Integer division (integer result) MOD Integer modulus (integer result) NOT One's complement (integer) AND Bitwise AND (integer) OR Bitwise OR (integer) XOR Bitwise exclusive OR (integer) EQV Bitwise equivalence (integer) IMP Bitwise implication (integer)8haracter // 0Character field; width=2+number of & s Variable length field :Input/Output Statements Statement Syntax/Function CLOSE CLOSE [[#]f[,[#]f ... ]]  I Close disk files; if no arg, close all DATA DATA constant list  \ List data for READ statement FIELD FIELD [#]f,n AS string var [,n AS string var ...]  J Define fields in random file buffer GET GET [#]f[,record number]   Rea8DFexp) Converts an expression to an Octal string RIGHT$(str,len)  Returns rightmost length chars of the string expression SPACE$(exp) Returns a string of exp spaces STR$(exp) Converts a numeric expression to a string STRING$(length,str)  @ Return strin lengt lon containin th firs cha o   the str STRING$(length,exp)  @ Return strin lengt lon containin char wit numeri   value exp VAL(str Co8 Y =,>,<, Relational tests (TRUE=-1, FALSE=0) <=,=<, >=,=>, <> The precedence of operators is -- 1. Expressions in parentheses 8. Relational Operators 2. Exponentiation ! 9. NOT 3. Negation (Unary -) 10. AND 4. *,/  11. OR 5. \  12. XOR 6. MOD  13. IMP 7. +,- O 14. EQV :Arithmetic Functions Function Action ABS(exp) Absol8 WYd a record from a random disk file INPUT INPUT [;] [prompt string;] var [,var ...]  +INPUT [;] [prompt string,] var [,var ...]  D Rea dat fro th terminal leadin semicolo suppresse ech  D o / is used / Us thi switc i O ERRO GOT wit RESUME RESUM 0 o RESUM9efied by exp POS(n) Returns carriage position of terminal (n is dummy) SPC(exp) Used in PRINT statements to print spaces TAB(exp) Used in PRINT statements to tab to specified position USR[n](arg) Calls the user's machine language subroutine with the arSg VARPTR(var Return addres o va i memor o zer i va ha no bee  a assigned a value VARPTR(#f Return th addres o th dis I/ buffe assigne t fil   number :Interpreter 99 NEX is used /N Do not list generated object code /D Generate debug/checking code at runtime /S Write quoted strings of more than 4 chars as they are encountered /4 Recognize Microsoft 4.51 BASIC Interpreter conventions /à Rela lin numberin constraints line nee no b numbere sequentially; /4 and /C may not be used together /Z Use Z80 opcodes :BASIC Compiler Error Messages Compile-Time Fatal Errors SN Syntax error  OM Ou9ͥError Codes Code Error " Code Error 1 NEXT without FOR + 14 Out of string space 2 Syntax error / 15 String too long 3 RETURN without GOSUB 1 16 String formula too complex 4 Out of data .17 Can't continue 5 Illegal function call *18 Undefined user function 6 Overflow " 19 No RESUME 7 Out of memory -20 RESUME without error 8 Undefined line  99%t of memory SQ Sequence error * TM Type mismatch TC Too complex +BS Bad subscript LL Line too long 4UC Unrecognizable command OV Math overflow /0 Division by zero DD Array already dim'ed FN FOR/NEXT error FD Function already def UF Function not defined WE WHILE/WEND error  /E Missing /E switch  6 /X Missing /X switch Compile-Time Warning Errors9ط6 21 Unprintable error 9 Subscript out of range . 22 Missing operand 10 Redimensioned array /23 Line buffer overflow 11 Division by zero * 26 FOR without NEXT 12 Illegal direct + 29 WHILE without WEND 13 Type mismatch 730 WEND without WHILE Disk Errors -- Code Error " Code Error 50 Field overflow - 58 File already exists 51 Internal error  61 Disk full 52 B9::q list device (like, WRITE(PRINTER,'Hello')). The following extensions are implemented to handle files --  -OPEN(fcbname,title,result{,extent_number});  (extent_number defaults to 0)  CLOSE(fcbname,result);  CREATE(fcbname,title,result);  DELETE(fcbname);  3BLOCKREAD(fcbname,buffer,result{,relativeblock});  |BLOCKWRITE(fcbname,buffer,result{,relativeblock}); where fcbname : a variable of type TEXT (array 0..32 of CHAR) : mus hav th extensio '.SRC o '.PAS indicatin tha i i sourc progra file Ther mus b carriag return/lin fee sequenc a th en o eac inpu lin an a inpu lin ma no b longe tha 8 characters. :Invoking Pascal Th Pascal/MԠ compile i invoke o ARIES- b usin th followin comman -- PASCAL filename.DL wher 'filename i th nam o th fil wit th extensio '.SRC o '.PAS containin th Pascal/M sourc statement : Set/Clear Slow Execution Mode Syntax: {-}S Ӡ allow th use t selec Fast Medium o Slo executio speed; -S causes the program to run at full speed. Debugger Command: P - Set/Clear Permanent Breakpoint Syntax: -P (* Clears breakpoint *)  P  P P sets the permanent breakpoint; -P clears it. Debugger Command: B - Display Permanent Breakpoint Syntax: B Displays line the permanent : v) title : ARRAY [0..11] of CHAR with  5title[0]=dis렠 selec byt (0=logge i disk  1=A,...)  0title[1..8]=filename and title[9..11]=filetype  . result : integer to contain returned value  # buffer : ARRAY [0..127] of CHAR  relativeblock : optional integer 0..255 :Special Functions and Procedures Pascal/MT supports the following special routines --  +PROC MOVE(source,dest,length-in-bytes); : t b compiled i o Π t indicat whethe t includ th debugge i th resultan .CO͠ file an ̠ i o t indicat whethe t produc .PRΠ fil (listing) PASCA default t n debugge an n listing Th fou invocatio option are --  /PASCAL filename - no debugger, no listing  ,PASCAL filename.Y - debugger, no listing  ,PASCAL filename.NY - no debugger, listing  @PASCAL filename.YY - debugger, listing Fo usag wit: ebreakpoint is set for. Debugger Command: D - Variable Display Syntax: D  ! D :   D  D ^ The D command is used as indicated. Debugger Commands: +,-,* - Variable Display Syntax: * -- display last value requested (using D or some other)  2+n -- display variable n bytes forward from last  6-n -- display variable n bytes backward from last :Pa:  PROC EXIT;  'FUNC TSTBIT(16-bit-var,bit#):BOOLEAN;  #PROC SETBIT(VAR 16-bit-var,bit#);  #PROC CLRBIT(VAR 16-bit-var,bit#);  9FUNC SHR(16-bit-var,#bits):16-bit-result; {Shift Right}  8FUNC SHL(16-bit-var,#bits):16-bit-result; {Shift Left}  $FUNC LO(16-bit-var):16-bit-result;  $FUNC HI(16-bit-var):16-bit-result;  &FUNC SWAP(16-bit-var):16-bit-result;  .FUNC ADDR(variable reference):16-bit result;  PROC WAIT(port:  th BC versio o th compiler th command ar similar except that 'PASCAL' is replaced by 'BCDCOMP'. :Compilation Switches Compile-tim option ma b specifie t th compile fro withi th sourc file Suc option tak th for8 o specia comments Th for o thes comment is  (*$o info*) or {$o info} wher 'o i th lette o th optio an 'info i informatio particular to that option. These options are --  $I Include .SRC into source stream  >$L+ or $L- Turn listing on (default) or Turn listing off  $P " Insert form feed into .PRN file  D$D+ or $D- Turn debug code on (default) or Turn debug code off  $C+ +Use CALL instructions for real operations  $Cn +Use RST n for real operations (n=0 ... 7)  ?$O $aaaa ORG program (run-time) at $aaaa (default 100H)  &$R $bbbb ORG RAM data at $bbbb  $Z $cc00 :Compiler Operation Invoking Pascal Compilation Switches File Input/Output Special Functions and Procedures Pascal/MT Symbolic Debugger Pascal/MT Reserved Words Notes :Compiler Operation Th Pascal/M compile exist i tw versions eac consistin o tw 808 objec cod files FLTCOMP.CO (rename PASCAL.CO o ARIES-1 an P2/FLT.OV̠ fo th versio i whic REA̠ number ar implemente a floatin poin value internall an BCDCOMP.CO an P2/BCD.OV̠ fo th ver: command provide i th symboli debugge allo th use t debu th Pascal/M progra a th Pasca sourc statemen level Include ar go/continu (wit optiona breakpoint) trace set/clear/displa permanen breakpoin an mod whic wil displa th nam o eac procedure/functio o th consol a th procedur o function is entered. These commands are discussed briefly on the following displays -- Debugger Command: G - Go with optional breakpoint Syntax: :/ Set run-time size to $cc 256-byte pages  A$X $dddd Set run-time stack space to $dddd (default $200)  B$S+ or $S- Turn recursion or or Turn recursion off (default)  $Q+ or $Q- Enable verbose output (default) or Disable verbose :File Input/Output Th standar Pasca READ READLN WRITE an WRITEL statement ar implemente fo th CP/ consol device WRIT o WRITEL t built-i fil calle 1PRINTE i allowe t directl acces th CP/ :sio i whic REA number ar implemente a BCĠ value internally Thes file ar Pas an Pas o th Pascal/M compiler respectively Als require b th compile ar th followin file --  (P1ERRORS.TXT - Pass 1 Error Messages  (P2ERRORS.TXT - Pass 2 Error Messages  @PASCAL/F.RT - Run-tim Packag (includin debugger fo FLT  qPASCAL/B.RTP - Run-time Package (including debugger) for BCD Th inpu file t th Pascal/M compile:&G{,}  G{,} G resume executio wher th progra las stopped Breakpoin may be optionally set at a specific line or function/procedure. Debugger Command: T - Trace Syntax: T{} Execute one or more lines of the program. Debugger Command: E - Procedure/Function Display Toggle Syntax: {-}E Š engage displa o th name o procedures/function entered - disengage it. Debugger Command: S -; ;;;G SWAP DELETE  INTEGER PROGRAM THEN DISABLE *INTERRUPT RANDOMREAD TO DIV LABEL RANDOMWRITE TRUE :Notes 1. Hexadecimal values may be specified as $hhhh, like $1A = 1AH. 2 Al standar Pasca typ definition excep ARRA ar supported Th堠 standar䠠 for ARRAY...OƠ ARRAY.. mus b堠 specifie䠠 a g ARRAY[...,...,...], and a maximum of three dimensions may be used. 3. Type TEXT is ARRAY [0..35;;;U] OF CHAR. 4 Interrup Procedures declare a "PROCEDUR INTERRUPT[i proc;" are supported, where i is the restart vector number (0..7). 5 CP/͠ V rando fil acces i supporte b RANDOMREAĠ an RANDOMWRITE. 6 Machin code constan data an assembl languag cod ma b inserted using INLINE (see pp 37-39 of "Pascal/MT 3.0 User Guide"). 7. Chaining is supported by CHAIN, whose usage is "CHAIN(filename)". 8. Redirected I/O is supported (see pp 42-;; iThis is the first message This is the second message This is the third message :DATA 1 Line one Line two :DATA 2 Line one, page one. (There is a form feed [0CH] after this line) Line one, page two :DATA 3 DSYSGEN COMLGHIJKLMDTCSYS60HEXDNOPPRISYS60HEXNQRSSTDSYS60HEX1TUBLKSYS61SUBV0; 43). =vector number (0..7). 5 CP/͠ V rando fil acces i supporte b RANDOMREAĠ an RANDOMWRITE. 6 Machin code constan data an assembl languag cod ma b inserted using INLINE (see pp 37-39 of "Pascal/MT 3.0 User Guide"). 7. Chaining is supported by CHAIN, whose usage is "CHAIN(filename)". 8. Redirected I/O is supported (see pp 42-; ; ; ;;;;; BOOLEAN FALSE OF SETBIT WRITELN CASE  FILE  OPEN  SHL CHAIN FOR OR  SHR CHAR  FUNCTION ORD SIM85 CHR GOTO  OUTPUT  SIZEOF CLOSE HI  PACKED  SQR CLRBIT  IF  PRED  SQRT CONST INLINE  PRINTER SUCC CREATE  INPUT PROCEDURE <<S DW LISTER0 ; data out routine for printer X DW LISTER1 ; DW LISTER2 ; DW LISTER3 ; DW LISTER4 ; DW LISTER5 ; ; IF UPPER DW LISTER6 ; DW LISTER7 ; DW LISTER8 ; DW LISTER9 ; ENDIF ;end cxlst number after STATX and LISTERX ; STATTBL: DW STAT0 ; status routine for printer X DW STAT1 ; DW STAT2 ; DW STAT3 ; DW STAT4 ; DW STAT5 ; IF UPPER DW STAT6 ; DW STAT7 ; DW STAT8 ; DW STAT9 ENDIF ; TABLE:<NZ LISTER4 ; ; IF UPPER JR LSTOUT ; ; LISTER6: CALL STAT6 ; INR A ; JRNZ LISTER6 ; JR LSTOUT ; ; LISTER7: CALL STAT7 ; INR A ; JRNZ LISTER7 ; JR LSTOUT ; ; LISTER8: CALL STAT8 ; INR A ; JRNZ LISTER8 ; JR LSTOUT ; ; LISTER9: CALL STAT9 ; INR A ; JRNZ LISTER9 ; ENDIF ; LSTOUT: DCR C ; point at data port OUTP B ; RET ; ; ; this port is for a Centronics parallel interface from the CPU board. ; L<  $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ <0Ch ; conout Pversion: db 0 ; prom version ; ENDIF ; ; CHECK CONSOLE INPUT STATUS. ; ; CONST: IF DPROM PUSH H LHLD Constatadr CALL ENTERPROM POP H RET ; ELSE ENDIF IF NOT DPROM IN CSTAT ANI 2 RZ ;ACC=0 = NO DATA CMA RET ENDIF ; ; READ A CHARACTER FROM CONSOLE. ; READER: CONIN: IF DBLOCK LDA HSTACT ; ORA A ; JZ CONIN1 ; XRA A ; STA HSTACT ; LDA HSTWRT ; ORA A ; MVI A,0 ; STA HSTWRT ; STA UNACNT ; JZ CON<CISTER5: IN LSTSTS5 ; status check ANI 0B0H ; CPI 90H ; JNZ LISTER5 ; ; TXLSTRDY5: ; MOV A,B ; OUT LSTDAT5 ; XRA A ; strobe all 8 data lines OUT 05H ; NOP!NOP!NOP!NOP ; lengthen pulse CMA ; OUT 05H ; RET ; ; ; list status routine ; LISTST: LDA PRINTER ; find current list number ANI 07H ; RAL ; double it LXI H,STATTBL ; point at status routine table MVI D,0 ; MOV E,A ; mov list number into e DAD D ; MOV E,M <  $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ <IN1 ; LDA NEWDISK ; STA UNADSK ; LDA BUFDSK ; CALL SELOK ; CALL AWRITE ; LDA UNADSK ; STA NEWDISK ; ENDIF ; ; CONIN1: IF SLIMLINE XRA A ; off motor OUT 0F8H+4 ; select port ENDIF ; IF DPROM PUSH H ; LHLD CONINADR ; LDA SHIFTLOCK ; MOV C,A ; CALL ENTERPROM ; POP H ; CPI 0FFH ; shift lock ? RNZ ; LDA SHIFTLOCK ; CMA ; STA SHIFTLOCK ; JMP CONIN ; ; SHIFTLOCK: DB 00H ; ELSE ENDIF IF NOT< ; INX H ; MOV D,M ; we now have the addrss for the status XCHG ; routine of the current list device. MVI E,2CH ; MOV D,E ; PCHL ; doit toit. ; STAT0: LDA ANIBYTE ; set by cboot rtn after MOV E,A ; call to prom to get version number. LDA CPIBYTE ; if 8251, ani and cpi bytes are 85h MOV D,A ; CPI 2CH ; IN LSTSTS0 ; JRNZ STATCHK1 ; MVI C,LSTSTS0 ; STATCHK: MVI A,10H ; OUTP A ; INP A ; c points to port STATCHK1: MOV L,A ; "<  $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ <   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ < bprinter" utility needs status in l ANA E ; CMP D ; MVI A,0FFH ; RZ ; XRA A ; RET ; ; STAT1: MVI C,LSTSTS1 ; JR STATCHK ; STAT2: MVI C,LSTSTS2 ; JR STATCHK ; STAT3: MVI C,LSTSTS3 ; JR STATCHK ; STAT4: MVI C,LSTSTS4 ; JR STATCHK ; STAT5: IN LSTSTS5 ; MOV L,A ; for "printer" utility ANI 0B0H ; CPI 90H ; MVI A,0FFH ; RZ ; CMA ; RET ; ; IF UPPER ; STAT6: MVI C,LSTSTS6 ; JR STATCHK ; <   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ <   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ < STAT7: MVI C,LSTSTS7 ; JR STATCHK ; STAT8: MVI C,LSTSTS8 ; JR STATCHK ; STAT9: MVI C,LSTSTS9 ; JR STATCHK ; ENDIF ; ; positon look-up tables. ; ; these table must match correct STATX to the the correct LISTERX ; ; X = number after STATX and LISTERX ; STATTBL: DW STAT0 ; status routine for printer X DW STAT1 ; DW STAT2 ; DW STAT3 ; DW STAT4 ; DW STAT5 ; IF UPPER DW STAT6 ; DW STAT7 ; DW STAT8 ; DW STAT9 ENDIF ; TABLE:<   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ `3P3P3P3P3P3P3P3P4PvP7P=PBPQ1R3P3P`i"Py2P`i"P>>*P ~:eG ®P>2PxʔPʔP>2P'P!P!HP"PhP2Px »P!SP%P!UP&!KVP>['P!XP"PhP2P <  $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $   $ ҿ2e\ *** CODE DOES NOT EXIST, HIT (SPACE) TO TRY AGAIN...$#  e 2e 2ë́\ڸ\!w]nG~2eʹ å& 10 MEG = 1 20MEG = 2 40MEG = 4 SIZE ? $ =;= ͈%һ2&!&u A SOURCE AND DESTINATION DRIVE ARE THE SAME $  j IS THIS WHAT YOU WANT? (Y/N) $L  R$:&ʼ Ñ COMPARING DISK $  :&%î WITH DISK $  :& COPYING DISK $  :&% TO DISK $  :&%ͯ#:& :&Lʓ !&:&- " , TRACKS $  B : , TRACK $0  *&n  Q  |H {0__H :&!&ʓ Å THRU $~  *&H :&#":&#":&R :&#2( NO FORMAT CODE ON SOURCE DISK $  R  DISK FORMAT IS=48TPI mini Skew DOUBLE sided mode 5E - 2D/512 CPM 5" 96TPI mini Skew single sided mode DE - 2D/512 CPM 5" 96TPI mini Skew DOUBLE sided mode 2E - 512 CPM 2.2 5" Hard disk mode DD - 2D/128 CPM 8" 1.4 & 2.2 compatible directory 90 - 2D/128 CPM 8" Std DOUBLE sided mode 1A - 2D/512 CPM 8" Skew single sided mode 9A - 2D/512 CPM 8" Skew DOUBLE sided mode 20 - 128 CPM 2.2 Priam Hard disk mode 25 - 256 CPM 2.2 DTC Hard disk mode 26 - 512 CPM 2.2 SMS Hard disk mode ENTER CODE BYTES F=VUmU::V<>)>O+>-22VK8V!4Vp#q>-->,>(*8U>(,>-,!2V,ÎU UU>U*IV,ßU UU> U*IV,*ʂUßU*ʎU*ÎU*DŸU*´U,ßU!;V:;V>22VU!=V,*@U͟U!=V~?~\#U!V]7*EV))))[EV:GV=_"8V Controller Status8U>(kWÝW:9Y<>)>O+>O->((!+}lV>29Y23Y>2FY:P:e=V=V!ʡV=ØV*DY>24Y>o|g_>W}26Y.W!V=V*DY>24Y>o|g怵_>W}26Y.W!= $  :( K ; 128 BYTE SECTORS, DOUBLE DENSITY$  >2& 2&͝*(H l BYTE SECTORS, $\  :&p$:& :( :&¼ :&G:&¼ ï DOUBLE SIDED, $  >2& DOUBLE DENSITY$  >2& SINGLE DENSITY$  :(G:&#R OR  :&R y@ FORMAT CODES DO NOT MATCH...$  :&2&*(($> 2&! :&u !>2&:&ʩ >Dp%:&2&):&ʩ !ʩ !ʩ ! :2&"(($ڷ í y2&:& :&2&!'>Wͮ!i'>Wͮ PRESS RETURN TO BEGIN...$  =!9"&1&!&w#2&2&2&!&_w:D:og,hw<gCP/M FAST FORMAT-COPY UTILITY $G Ý1795 CONTROLLER VERSION 2.22D - 12/20/82 $r ë $ Quick command reference;$  $ DD Disk test ... DVALID {Drive:} SIZE$ 3 {Bytes/sec} {Switches}$ A $> sDD Format ...... DFORMAT {Drive:} SIZE$L Ö {Bytes/Sec} {Switches}$~ ä $ DD Copy ........ DCOPY {Drive:} TO {Drive:}$  SIZE {Bytes/Sec} {Switche= W=W*DY>24Y>o|g_>?W}26Y[BY|25Y>28Y>-->,>(*MW>(,>-,!3Y,WQV2GYhX>xV2HY*IV,{Y*ʉWWQV>2GYhX> xV>2HY*IV,{Y*ʼW{Y*W*W2FY,{Y*DW!:YY*B X::Y>23YxV!:FY<¿X:IYO:P2IY¿X:GY<ʿX:HY<ʿX*DY[EVR¿X*BY[GVR¿X!JY^SBY{¹X*DY#"DYWuW:FYSp%!'x͂ͣ!: (ʒ >Dp%:&ʟ "ڴ :&!'ʾ  ʾ :&"*(i x2&:&!&<:& LOAD COMPARISON$    LOAD DESTINATION$  ) DISK, PRESS RETURN $ :&"#:&G:&O(x2&!&!i'`>Sp%!'x͂!: (ʀ>Dp%:&ʀ"ڕ:&!i'ʦ ʟ:&"*(Jx2& :& DISK COMPARISON COMPLETE$ N COPY COMPLETE$ N>2&!͈=s}$  $ HDefault "SIZE" = 128 *** Single density $ V $S ÜFORMAT defaults to IBM 3740 CP/M Standard single density $a ê $ Typical "Switches" = DBL, MINI48, MINI96, TRACK, NOVAL etc.$  $ -Example: DFORMAT B: SIZE 512 DBL $  `(See Gen-op manual for additional info)$8 o $k ê******* SPACE BAR WILL ABORT COMMANDS ******* $z  "R" will repeat commands$  $  *$ >=uWkW29Y2FY2GY2HYQV>NX> Controller StatusW! Z:e= Z"IVY:e[2|! l]\]]Z ›Z! "el]\]]Z"eøZ>[)"e*e+~+~Z#"eï[s[{IV=Q%2&:&#* THE DISK IN DRIVE $ :&%ʓ:(\~s IS SINGLE DENSITY IBM 3740 STANDARD$N Õ IS DOUBLE DENSITY $ :(öDOUBLE SIDED, $ WITH $ :(!=)H  BYTE SECTORS$  THE ACTUAL FORMAT CODE IS $ :(@2Ɛ'@'_)JH $F :&NÈ IS DOUBLE DENSITY WITH 128 BYTE SECTORS$_ ì HAS NO FORMAT CODE $ BYTE 7FH OF TRACK ZERO SECTOR ONE IS $ :()& WOULD YOU LIKE=~2&<2w#1&!s#  >A~?a8{8 w# %7!%?!C&<:R^~# y^> 2&2&2&2&2&2&2&2(2&2&2&2&2&2(">2&<2&> 2&>32&!"&!"&!"&:Sp%!'ͮ!'is# x?G ## 7!@NOVAL!>2&!@16RETRYDx#A<2&!@TZMINI48z>2&>2&>2(2&2&>H2(í!@ÐMINI96ҭ>2&>2&>2(2&2&>L2(!@SIZEe$!@DBL>2&2&!@DD>2&2&!=KR[se{[Z!c_^#V]! "e"e!"e"e\Seb]<>[[el]\]]*e"eM[[eg]2eË[! R>[‹[>2e!"e*e:~#\ʯ["e[eRʯ[ү[Ë[*e+"e"e#s# y[ R"e R2e[}[>2e[$|O:e2e~2e#~2ë́\ʯ[G#~2e#~2ë́\W#~2e#~2ë́\_Se:e<"eq\*e[e*e###~2e#~2ë́\#K\"eSe:e<ʋ[s[:e2e:e͗\O:e͗\:Ҥ\0ڶ\0Aڶ\GҶ\ 7?7!%b] e ö\\\Ɛ'@'O ]\!Ae]a{= Q1RG:P_>%Q:PO"QxG"Q>_y{/Q> 2POyxsQCQx>sQ:P=5Q!3S]W!xQͨQ,Q> 2P>!QxRQ:P=2P„Q!"S]!Qz!R]z!R]z!R]z!R]z!R]!S]!XS]3P Q WRz>GRR%RͲR(Rx:EV,Qz> 2P>!oRxRQ:P=2P6R!*S]z@!S]z !S]!1RèQ2P:EV,Q>ڂR*IV:GV :PʤRRɯQ> !;S]!RèQ@zRready id not found crc lost data b= @SGL>2&!@*1COMPARE!@DGMAP!@Z_DCOPY!@rvCOPY!@ÎDFORMڲ!@åFORMں!@þDVALIDE!@VALIDM!@CODE>2&>2&2&2&2&<2&:&/!@%,COMPARE~!@?ENOFILLM>2&!@]bNOVERj>2&!@z~COPYË~!# Á́u %ʲ yØ:&y2&!@WITHu ͈%һ2&!&u  y2&!@TOu = &_ _> ]> ]]~ ]# ]O!P!P!P!P!!P$!P']PMMZM MMMM MTMMMM^M MM M.MLL3LL3LL3L3M3M3M)Y)Y ffgg*77%4h& 33 50 - 2D/128 CPM 5" 48TPI mini single sided mode D0 - 2D/128 CPM 5" 48TPI mini DOUBLE sided mode 54 - 2D/128 CPM 5" 96TPI mini single sided mode D4 - 2D/128 CPM 5" 96TPI mini DOUBLE sided mode 5A - 2D/512 CPM 5" 48TPI mini Skew single sided mode DA - 2D/512 CPM 5" = lusy protect flt boot error Read Write Seek Home No disk in drive... Hit space bar to retry, to reboot, any other key to continue ÝTTHard disk command reject Hard disk status >)(>O+>O->/*EVELCT:GV=2U>2U>`.*@ZT*NT:PG:T2TG:U/T:U<2U!T.A~(#8T>.{(>`.*NT*>`.*H@^T*tT!S]>b.*ʉT!S]*\>.>(>`.*•TSS>a.*IV*,­T,ZT¶T­TZTRS,T>.*IV(,T,ZTTTZT>> A) char **strptr; 4. File I/O creat(filename) ) unlink(filename) char *filename; * char *filename; open(filename,mode) ~ close(fd) char *filename; {mode=0 - input, mode=1 - output, mode=2 - input and output} read(fd,buf,nbl) $write(fd,buf,nbl) char *buf; %char *buf; seek(fd,offset,code) $tell(fd) fopen(filename,iobuf) ' fcreat(filename,iobuf) char *f> > > ilename; + char *filename; struct buf *iobuf; $struct buf *iobuf; getc(iobuf) ) putc(c,iobuf) struct buf *iobuf; ,char c; struct buf *iobuf; getw(iobuf) ) putw(w,iobuf) struct buf *iobuf; struct buf *iobuf; fflush(iobuf) struct buf *iobuf; 5. Plotting Functions (for Memory-Mapped Video Boards) setplot(base,xsize,ysize) clrplot() plot(x,y,chr) char chr;>>> txtplot(string,x,y,ropt) char *string; line(c,x1,y1,x2,y2) 6. Plotting Functions for Hazeltine 1500 clear() cplot(x,y,chr) char chr; ctxtplot(x,y,string) char *string; 7. Special I/O -- CIO cio(fn) or cio(fn,arg) CI indexe directl int th BIO Jum Table 'fn i th inde offset an 'arg i a argumen passe (u t 1 bits) Th offsets and functions permitted are -- Offset Function > load instruction. Oh well. :ARIES-1 C Library Th followin ar th name o th routine availabl i th Librar DEFF.CRL The ar liste her a memor convenience an refer to the manual for further details. 1. General Purpose Functions csw() exit() bdos(c,de) #peek(n) poke(n,b) inp(n) outp(n,b) / pause() sleep(n) call(adr,h,a,b,d) "abs(n) srand(n) rand() setmem(adr,>>C CONS -- Consol status Returne valu i n cha  ready, 255 if char ready 1 CONIN -- Console input; Returned value = char typed 2 CONOUT -- Console output; Input value = char to output 3 LIST -- List output; Input value = char to output 4 PUNCH -- Punch output; Input value = char to output 5 READER -- Reader input; Returned value = char input :Special I/O using CIO CIO is called by -- >~icount,byte) movmem(source,dest,count) qsort(base,nel,width,compar) char *source, *dest; char *base; int(*compar)(); exec(name) char *name; 2. Character Input/Output getchar() ungetch(c) kbhit() putchar(c) puts(str) char *gets(str) char *str; char *str; printf(format,arg1,arg2,...) scanf(format,arg1,arg2,...) char *format; < char *format; 3. String and Character Processing >>* cio(fn) or cio(fn,arg) CI indexe directl int th BIO Jum Table 'fn i th inde offset an 'arg i a argumen passe (u t 1 bits) Th offset an function permitte ar -- Offset Function CONS -3- Consol status Returne valu i n cha  ready, 255 if char ready 1 CONIN -- Console input; Returned value = char typed 2 CONOUT -- Console output; Input value = char to output 3 L>J isalpha(c) isupper(c) islower(c) isdigit(c) char c; char c; char c; Xchar c; touppper(c) tolower(c) isspace(c) strcat(s1,s2) char c; char c; char c; char *s1, *s2; strcmp(s1,s2) strcpy(s1,s2) strlen(str) atoi(str) char *s1,*s2; char *s1,*s2; char *str; char *str; initw(array,string) d initb(array,string) int *array; char *string; char *array, *string; getval(strptr>> CIST -- List output; Input value = char to output 4 PUNCH -- Punch output; Input value = char to output 5 READER -- Reader input; Returned value = char input #DDUMP COM"chDFOCO COMPuvwPRISYS60HEXNQRSSTDSYS60HEX1TUBLKSYS61SUBV0?)?)CTION COMPLETE ( to continue or <^C> to re-boot and SAVE )INVALID DRIVE NAME (USE A to P)NO SOURCE FILE ON DISKSOURCE FILE INCOMPLETEe xxx = referencpZE>.SYS" ( where xxx = reference identifiers )DESTINATION ON , THEN TYPE RETURNPERMANENT ERROR, TYPE RETURN TO IGNORE FUN?#:&( ͧͧ6#ͧ6# ͧͧ6#ͧ6# ͧͧ6#*&ͧ6#:&_ͧNͧ ͧͧ6#*&ͧ6#:&_Nͧp#{§':&2&*&!(:&w## w#:&w:&=2&':&2&*&!(:&!(=!<):&w## w#:&w:&=2&:&#Np#z#!K4=.:&#:&͂f& :&2&#:&*&È FORMATTING ERROR DRIVE $n :&ʩÞB $ NðA $ N MISSING OPERAND, PLEASE START OVER $ N+ ERROR IN ?  TO WRITE A CODE ON THE DISK ? (Y/N) $ YNm IS THE DISK SINGLE OR DOUBLE DENSITY ? (S/D) $= S‰>2(DD·>2( WHAT IS THE SECTOR SIZE ? (128,256,512 OR 1024) $ !s#  >!e$!(:&w( IS THE DISK SINGLE OR DOUBLE SIDED ? (S/D) $ DD:(2(^ THE FORMAT CODE IS $G :(!)w)ÍH PRESS RETURN TO WRITE $s N/NìH $ N INPUT ERROR, PLEASE TRY AGAIN$ N">2&2&!(͏N? mVECTOR PUSH H ;SAVE IT FOR RETURN MOV M,C ; INX H ; MOV M,B ;SET UP TRANSLATE TABLE ADDRESS LXI B,9 ;POINT TO PARM BLOCK DAD B ; MOV M,E ;SET UP ADDRESS INX H ; MOV M,D ; XRA A ; DEXIT: POP H ;RETURN SEL. DISK. HDR. VECTOR POP B RET DENEXIT: POP H ; JR DEXIT ; ; IF MDISK INITDIR: LDA DIRINITFLG ; INR A ; MVI A,0FFH ; STA DIRINITFLG ; JRZ INITEX ; PUSH H ; PUSH D ; PUSH B ; MVI A,1 ; OUT 8 ;? ENTERING DECIMAL NUMBER, PLEASE START OVER$ NMc TRACK NUMBER MUST BE BETWEEN 0-76 $< Nv $t _G{ڔ> ʱ"Ñ SEEK ERROR TRACK $ H  DRIVE $ :&% DENS = $ :&>D>S_N>,&)>>,W!&:&_w>,s ERROR IN HOMING DRIVE $Z :&%N:&2&×:&2&:&"&xw#ä2 (:&<2&:&=2&*&×:&*&>w# : (* DRIV? <:)G2(**%xp*@*>+x">2&!( >2&2&ͯ#!͈%\2&#:&¶ʶw~„>2&ö2(ʑ>2&:(:&¤>2&:(2&͝:&p$:&>Dp%:&#":&2 (!'ͮ2&2&:&2&!'>Sp%:&(ͣ!:&:&!': (>Dp%"!':&6: (3>Dp%:&:&Oʄ<2&͂:&T>`^>`>G:&xu=G:&xu=!'"!'0$:&9í SUCCESSFUL VALIDATION DRIVE $ :&%:&N={ THERE WERE $ *&H  RETRYS$ :&N?  LXI H,0 ; LXI B,1023 ; MVI E,0E5H ; INITDIRLP: MOV M,E ; INX H ; DCX B ; MOV A,C ; ORA B ; JRNZ INITDIRLP ; OUT 8 ; sel bnk 0 POP B ; POP D ; POP H ; INITEX: MVI A,0DDH ; JMP MDENTRY ; ENDIF ; DIRINITFLG: DB 0 ; ; ; find a match for the density flag , leave pointer pointing at flag. ; default at single sided single density. therefore single sided single density ; must be the last block in the list of tables. ; GETBL?E $ :&% NOT READY$ N: PERMANENT $- : (ʚ^RECORD NOT FOUND$M s (DENS = $i :&ʇ>DÉ>S_>)_: (ʺïLOST DATA$ CRC$  ERROR TRACK $ *&H  SECTOR $ *&H DRIVE $  :&%:&> 0 SIDE $%  *&H !&4>0$R :&2&2 (:&"&x #i :&<2&:&=2&*&\ !:&ʩ !=ʩ !=ʩ !: ( VERIFY ERROR TRACK $  2 (2 (v :&2& :&2&:&?7  AND $ *&H :&=a. HARD ERRORS$! NV VALIDATION ERROR DRIVE $< õp HARD ERROR$d NÒ THERE WAS 1 RETRY$~ !=)ã"(>2&:&>Dp%ͯ#!͈%2&:&:&ʷ FORMAT WITH $ *&H  BYTES PER SECTOR $ :&D<DOUBLE SIDED, $- :&o^DOUBLE DENSITY $N *&H ÓÂSINGLE DENSITY $r :&o&H ì SECTORS PER TRACK $ þ $ STANDARD IBM 3740 FORMAT $ >2(!'ͮ!@?OCK: LXI D,TBLEND-TBLSTART ; length of one block + flag and GETBLOCK1: ; internal code MOV A,M ; get test match CPI SD128 ; end of table ? RZ CMP C ; match RZ DAD D ; point to next table JMP GETBLOCK1 ; look again ; IF MDISK MWRITE: MVI A,0FFH ; STA MDFLG ; CALL MOVDATA ; CALL MOVDATA1 ; JR MDEXIT ; MREAD: CALL MOVDATA1 ; CALL MOVDATA ; MDEXIT: XRA A ; OUT 8 ; restore system STA MDFLG ; RET ; ; MOVDATA: XRA A ?OR SOURCE DISK --> ENTER CODE BYTES FOR DESTINATION DISK --> The new system type and the distination disk format do not match. Do you want to continue (Y or N) ? Bad disk format, The dsk must be formatted double density 128 bytes/sector No code byte match, Default single density used CODE BYTE UNACCEPTABLE, (CR) = REBOOT SPACE = RETRY UNDOCUMENTED PROGRAM ERROR... REBOOTING FAILED TO FIND CPMxx.COM FAILED TO FIND xxBIOS.HEX COLD BOOT HEADER IN BIOS EXCEEDS LENGTH OF 80H FILE READ ERROR ?OFFSETx#2&@INSERT DISK TO BE FORMATTED IN DRIVE $ :&%j PRESS CARRIAGE RETURN $Q N:&#:&Nã VALIDATING DISK $ O:&G:&:&G3!@SIZE 512:(<z( q# (yW G(w# :&":&6:&6> 2&:&2&G:&M:&x͂!(ͷ:&2&s:&=2&]*&"&!((!>k:&ʠ"Q:&<2&O:&>Y0$:&v!'"Q:&2&:&2 (:&2 (:&2 (:(<>2&>2&*&?; OUT 8 ; main in LHLD DMAADD ; write op LXI D,HSTBUF ; LDA MDFLG ; INR A ; JZ XFERDATA ; XCHG ; JR XFERDATA ; MOVDATA1: CALL CALCLOOP ; LXI D,HSTBUF ; LDA MDFLG ; INR A ; JNZ XFERDATA ; XCHG ; XFERDATA: LXI B,128 ; LDIR ; RET ; CALCLOOP: LXI H,0 ; LXI D,2000H ; 8 k LDA HSTTRK ; MVI C,1 ; CLC0: SUI 6 ; JC CLC1 ; INR C ; JR CLC0 CLC1: ADI 6 ; PUSH PSW ; MOV A,C ; OUT 8 ; ?ON xxBIOS.HEX RE-BOOTING TO CP/M FATAL FILE READ ERROR... REBOOTING CODE BYTE ERROR SYSTEM TOO LARGE TO FIT ON SYSTEM TRACKS...REBOOTING CODE BYTE NOT IMPLIMENTED YET... REBOOTING\bbbbbc#cHcZccSOURCE DRIVE NAME (OR RETURN TO SKIP)SOURCE ON , THEN TYPE RETURNDESTINATION DRIVE? (or to re-boot and save image of system) To save system type, "SAVE xxxCPM.SYS" ( where xxx = reference identifiers )DESTINATION ON , THEN TYPE RETURNPERMANENT ERROR, TYPE RETURN TO IGNORE FUN?"(!"&:&2(:(<>>2&*&"(:(<3!6!"&2&>Sp%!'ͮ: (>S> G:(G: (2(G:&n>2(:({>2(: (2&: (2&*("&:(2&*("&: (ʨ>Dp%!'ͮ:&»>Y2&:&>2&ɯ2&"2&":&:&>2&:&2&G:&x͂!(͛:&2&G:&=2&*&"&!(Ͱ:&J:(EEG2)!(>_~#Rk:&u":&<2&O:&>Y0$:&(!'"(ͧͧ6#ͧ:&NͧNPͧ ͧͧ6#N2ͧͧ6#ͧ6? POP PSW ; CALL CLC2 ; LXI D,128 ; LDA HSTSEC ; DCR A ; rel 0 CLC2: ORA A ; RZ ; DAD D ; DCR A ; JR CLC2 ; ; MDFLG: DB 0 ENDIF ; ; software delay routine HDELAY: LXI D,8000 ;5555=25 MS DELAY AT 4MZ SDELAY: DCX D MOV A,D ORA E JNZ SDELAY RET ; CBIOS MESSAGES ; NRMSG: DB 'ready ',0 RNMSG: DB 'id not found ',0 CRCMSG: DB 'crc ',0 LDMSG: DB 'lost data ',0 BSYMSG: DB 'busy ',0 WPMSG: DB 'protect ',0 WFMSG: DB 'flt ',0 DFMSG@@:&:&/2&":&2&7&#O!&\#~_!&wy>B#2&y_!&~Z#ym#"y2&ym#>2,/2&&@́ʻá#0 ?))) O Ê#͆#}"(2&>L2&:(<#!@##MINI96#>'2&!@##TRACK!$x#62&2&!@$$-!$x#62&:&ɯ}o|g M$N NYN>2&x#*(|¨$>2&>2&>2&!"&> 2&>.2&!<"&!g"&*(|%>2&!"&:(<$> 2&>2&>2&> 2&!"&!Y"&>2&>2&>22&>@2&!N"@1ECTRAN: ;TRANSLATE THE SECTOR GIVEN BY BC USING THE ;TRANSLATE TABLE GIVEN BY DE XCHG ; HL = trans table MOV A,H ; see if null table ORA L DAD B JZ TRANSEC ; no table CPI 1 ; this is our flag to tell us JZ HDTRANS ; to use our algorithm MOV L,M ; get translated sector MVI H,0 ; less than 256 sectors RET TRANSEC: INX H ; make relative to 1 RET ; IF PRIAM ; skew factor of 52 HDTRANS: MOV A,C ; get logical sector RAR ; divide by 2 JNC GOUT ADI @DUMMY HDQUANTUMBK: DW 64 ;SECTORS PER TRACK DB 5 ;BLOCK SHIFT FACTOR (4 k blocks) DB 31 ;BLOCK MASK DB 1 ;NULL MASK DW 2042 ;DISK SIZE-1 DW 511 ;DIRECTORY MAX DB 240 ;ALLOC 0 DB 0 ;ALLOC 1 DW 0 ;CHECK SIZE (fixed media no check) DW 3 ;TRACK OFFSET DB NSECTS ; ccp + bdos length in sectors DB 64 ; number of sectors on cyl 0 DB 64 ; number of sectors on cyl 1 (physical) DW 16 ; cpm sectors on trk 1 DB 4096/128 ; cpm block size/cpm sector size @&!y"&*(|@%>2&!"&>2&>2&>22&>@2&!N"&!y"&e% ERROR IN FORMAT SECTOR SIZE $C% ND~%>2&>>2&%@ڰ%yʬ% Ð%:&OyA:B:C:D:E:F:G:H:%A_>:_ & ERROR - DRIVE NUMBER GREATER THAN 7 $% %:w#+}:& &2 (>2w# ERROR IN FORMAT SECTOR SIZE $C% ND~%>2&> $ $0&OyA:B:C:D:E:F:G:H:%A_>:_@a52 ; odd sector - add 52 GOUT: MVI H,0 MOV L,A INX H ; make relative to 1 RET ; ELSE HDTRANS: RET ENDIF ; ; ;**) ; ; DISK DRIVER SWAPPING ROUTINE ; ;** IF NOT PRIAM  IF NOT SHUGART IF NOT QUANTUM ; the default warm boot number BOOTDISK: DB 00 ; this is the drive that we will warm ; boot from ; this is the logical drive exch@ 5 ; convert to A = 0, B = 1, C = 2 D = 3 JC HWBOOT ; ENDIF ; RB1: ; MOV A,B ; select needs track STA TRK ; MOV A,C ; STA SECT ; PUSH H ; dma PUSH D ; sects PUSH B ; trk CALL SREAD ; do it RBLK1: ; POP B ; POP D ; POP H ; DCR D ; decrement sector count. JZ GOCPM ; all done when zero. PUSH D ; LXI D,128 ; bytes per sector DAD D ; SHLD DMAADD ; POP D ; INR C ; increment sector countR. DCR E ; e h@ "WR THAN 7 $% %:w#+}:& &2 (>2w# ERROR IN FORMAT SECTOR SIZE $C% ND~%>2&> $ $0&OyA:B:C:D:E:F:G:H:%A_>:_R THA# ,$ -% .& /'0( 1)!2*"3 +#$%&'( )!*" + , - . /0123     4@ ange ; table that exchanges logical drives ; A, B, ... F for phyical LUN numbers ; 0ffh is an invalid number ; indicating the drive does not exist ; duplicate entry at lun0 DRIVMAP: ; LUN # DRIVE # DB 00 ; A DB 01 ; B DB 02 ; C DB 03 ; D DB 0FFH ; E DB 0FFH ; F DB 0FFH ; G DB 0FFH ; H DB 0FFH ; I DB 0FFH ; J DB 0FFH ; K DB 0FFH ; L DB 0FFH ; M DB 0FFH ; N DB 0FFH ; O DB 0FFH ; P ENDIF ENDIF END@ as sectors to read this trk JNZ RB1 ; read next sector STDWBT: ; LDA SECTK1 ; get sectors per track on tk 1 MOV E,A ; MVI C,1 ; otherwise reset sector =1 INR B ; increment track number JMP RB1 ; ; IF PRIAM OR SHUGART OR QUANTUM ; HWBOOT: PUSH D ; LHLD DMAADD ; lower dma address so that boot pgm LXI D,80H ; loads below ccp by 128 XRA A ; set zero flag so subtract will work DSBC DE ; SHLD DMAADD ; for this subtraction to work POP D ; INR @ ] ;CODE BYTE DB 0FFH ;DUMMY HDPRIAMBK: DW 104 ;SECTORS PER TRACK DB 5 ;BLOCK SHIFT FACTOR (4 k blocks) DB 31 ;BLOCK MASK DB 1 ;NULL MASK DW 1821 ;DISK SIZE-1 DW 511 ;DIRECTORY MAX DB 0F0H ;ALLOC 0 DB 0 ;ALLOC 1 DW 0 ;CHECK SIZE (fixed media no check) DW 1 ;TRACK OFFSET DB NSECTS ; ccp + bdos length in sectors DB 103 ; number of sectors on track 0 +1 DB 103 ; number of sectors on track 1 +1 DW 104 DB 128/128 ; cpm block size/cpm sector size D@@IF IF PRIAM OR SHUGART OR QUANTUM ; the default warm boot number BOOTDISK: DB 00 ; this is the drive that we will warm ; boot from ; this is the logical drive exchange ; table that exchanges logical drives ; A, B, ... F for phyical LUN numbers ; 0ffh is an invalid number ; indicating the drive does not exist ; duplicate entry at lun0 DRIVMAP: ; LUN # DRIVE # DB 04 ; A hard disk DB 05 ; B hard disk DB 06 ; C hard disk DB 07 @uD ; compensate for boot (nsects) LXI B,1 ; hard disk system begins at trk 0 JMP RB1 ; sect 1, not 2 ; ENDIF ; if priam or shugart ENDIF ; if mmpm ENDIF ; if mldr ENDIF ; if xmldr ;**$ ; HOME HOME: LXI B,0 ; ;**g ; SET TRACK ; PARAMETERS; ; TRACK IN 'C' SETTRK: SBCD TRK ;SAVE TRACK NUMBER RET ;***@B 128/128-1 ; disk sector size/cpm sector size DB 0 ; logical to phisical sector map (1 = 2 phys sec.) DW 128 ; bytes per sector DB 00,00,00 ENDIF IF SHUGART ; cp/m hard disk 256 byte/sector 26 sectors/track DB 25H ;CODE BYTE DB 0FFH ;DUMMY HDSHUGARTBK: DW 52 ;SECTORS PER TRACK DB 5 ;BLOCK SHIFT FACTOR (4 k blocks) DB 31 ;BLOCK MASK DB 1 ;NULL MASK DW 2047 ;DISK SIZE-1 DW 511 ;DIRECTORY MAX DB 240 ;ALLOC 0 DB 0 ;ALLOC 1 DW 0 ;CHECK SIZE (fixed@x! !2 (:&<2&:&=2& : (@ʁ!Q! DISK IN DRIVE $@! :&%v! IS WRITE PROTECTED$b! N: ( *Ø!WRITE FAULT$! !&x¾!:("w#ò"G!&:&"!&Ni&xGw"y"+#":&2&:@ **n ; SET SECTOR ; PARAMETERS; ; SECTOR IN 'C' SETSEC: SBCD SECT RET ;RETURN FROM SETSEC. ;** ; SET DMA ADDRESS PARAMETERS ; DMA IN BC ; ; SET DISK DMA ADDRESS. ; SETDMA: SBCD DMAADD ;PUT AT DMA ADR ADDRESS. RET ; ;**p ; ; this is a pointer to the cp/m drive referance number to lun address ; map table. DW DRIVMAP ; S@> media no check) DW 2 ;TRACK OFFSET DB NSECTS ; ccp + bdos length in sectors DB 52 ; number of sectors on track 0 DB 52 ; number of sectors on track 1 DW 26 DB 4096/128 ; cpm block size/cpm sector size DB 256/128-1 ; disk sector size/cpm sector size DB 1 ; logical to physical sector map (1 = 2 phys sec.) DW 256 ; bytes per sector DB HDBIT ; DB 00,00 ; ENDIF ; IF QUANTUM ; cp/m hard disk 512 byte/sector 128 sectors/track DB 26H ;CODE BYTE DB 0FFH ;AlA ; D hard disk DB 0FFH ; E DB 00 ; F floppy DB 01 ; G floppy DB 0FFH ; H DB 03 ; I DB 0FFH ; J DB 0FFH ; K DB 0FFH ; L DB 0FFH ; M DB 0FFH ; N DB 0FFH ; O DB 0FFH ; P ENDIF ; map cpm drive numbers A to P into lun address ; Enter reg C = cpm drive reference, Exit Acc = lun address MAPLUN: MVI A,15 ; new drive outside table ? CMP C MVI A,0FFH RC LXI H,DRIVMAP MVI B,0 DAD B MOV A,M ; get lun address RET ;**AA DAD D ; LXI D,CPMSPT ;CPM SECTORS/TRACK LXI B,0BH ;BYTES TO MOVE LDIR ; POP H ; POP B ; RET ; ; CLEARCOM: LXI H,COMDATA ; LXI D,0 ; LXI B,COMLENGTH ; FILLIT: MOV M,E ; enter w/ hl > dest, e = fill char INX H ; bc block length DCX B ; MOV A,C ; ORA B ; RZ ; JMP FILLIT ; ; PMSG: MOV A,M ; get a character ORA A ; is it 0 RZ ; return MOV C,A ; PUSH H ; CALL COUTE ; print POP H ; INX H ; Aݟ*** ; SELECT DISK ;PARAMETERS ; NEW DISK IN 'C' ; IF LOGGED IN BEFORE, ROUTINE WILL ; ONLY UPDATE 'NEWDISK'. DBLOCKING ; WILL MAKE THE CALL TO SELD1. ; SELD1 RESETS DENSITY IF NOT DONE ; ALREADY. ;** ; SELDSK: IF MLDR OR XMLDR PUSH B ; CALL CLEARCOM ; common data area doesnt get init POP B ; by boot or warm boot so.... ENDIF ; DI CALL MAPLUN LXI H,0 ; erroAA JMP PMSG ; ; IF DBLOCK SREAD: JMP BLREAD ; de-blocking read routine SWRITE: ; de-blocking write routine JMP BLWRT ; JTOLAY: AREAD: JMP READ ; this location modified by code above AWRITE: JMP WRITE ; same ELSE JTOLAY: SREAD: JMP READ ; floppy or hardisk SWRITE: JMP WRITE ; same ENDIF ; IF PRIAM or SHUGART or QUANTUM HEXOUT: JMP HEX3 HEX1: PUSH PSW RRC!RRC!RRC!RRC CALL HEX2 POP PSW HEX2: ANI 0FH ADI 90H DAA ACI 40H DAA MOV C,A Ar flag CPI 0FFH ; error from maplun? JNZ SELOK ; disk exists LDA BOOTDISK ; STA CDISK ; bad address EI RET SELOK: MOV C,A ; replace with lun STA NEWDISK ; remember new disk IF PRIAM or SHUGART or QUANTUM LDA OLDISK ; is old disk a flop CPI 04H ; floppy lun's are 0,1,2,3 JNC OLD$NOT$FLOP ENDIF ; save old disk (floppy) track in track table IF DUAL ;IF DUAL DRIVE, ANI 0FEH ;CLEAR OUT BIT 0. ENDIF IF PRIAM or SHUGART or QUANTUM ; thAA yu1 JMP CONOUT HEX3: CALL HEX1 RET ENDIF ;**' ; ; END OF BASIC I.O. ROUTINES ; ;** ;  SREAD: JMP READ ; floppy or hardisk SWRITE: JMP WRITE ; same ENDIF ; IF PRIAM or SHUGART or QUANTUM HEXOUT: JMP HEX3 HEX1: PUSH PSW RRC!RRC!RRC!RRC CALL HEX2 POP PSW HEX2: ANI 0FH ADI 90H DAA ACI 40H DAA MOV C,A A ,is routine req because you could LDA LASTFLOP ; be on flop, go priam, come back to MOV E,A ; another flop which screws up track MVI D,0 ; register on 91 LXI H,TRTAB ; DAD D ; IN TRACK ; MOV M,A ; ; OLD$NOT$FLOP: ; is new disk a floppy ? LDA NEWDISK ; CPI 04H ; JNC NEW$NOT$FLOP ; ; move in floppy jump table overlay into cp/m jump table ; LXI D,JTOLAY ; distination (cpm jump table) LXI H,FDJT ; source (floppy jump overlay) LXI B,06H ; jump tablA A A e overlay length LDIR ; z80 block move LDA NEWDISK ; ENDIF MOV C,A JMP FSELECT ; floppy version of select IF PRIAM or SHUGART or QUANTUM NEW$NOT$FLOP: ; move hard disk jump table overlay into cp/m jump table LXI D,JTOLAY ; distination (cpm jump table) LXI H,HDJT ; source (hard disk overlay) LXI B,06H ; jump table overlay length LDIR ; z80 block move ; LDA NEWDISK MOV C,A ; pass new disk in c to bldptr CALL MOVPARMS EI RET ENDIF ; BLDPTR: MOAAAfV L,C ;COMPUTE SEL. DRIVE HEADER VECTOR MVI H,0 ;AS 16 BIT QTY. DAD H ;*2 (BUILD 16-BYTE OFFSET) DAD H ;*4 DAD H ;*8 DAD H ;*16 LXI D,DPBASE ;TABLE BASE DAD D ;EFFECTIVE ADDRESS OF VECTOR RET ; MOVPARMS: CALL BLDPTR SETBPM: PUSH B PUSH H ;BUILD POINTER TO BLOCKING VALUES LXI D,10 ;IN BACK OF DISK PARAMETER BLOCKS DAD D ; MOV E,M ;POINT TO DISK PARAMETER BLOCK INX H ; MOV D,M ; XCHG ;BUILD POINTER TO LXI D,17 ;BLOCKING PARAMETERS BBBBANDARD DW 26 ;SECTORS PER TRACK DB 3 ;BLOCK SHIFT FACTOR DB 7 ;BLOCK MASK DB 0 ;NULL MASK DW 242 ;DISK SIZE-1 DW 63 ;DIRECTORY MAX DB 192 ;ALLOC 0 DB 0 ;ALLOC 1 DW 16 ;CHECK SIZE DW 2 ;TRACK OFFSET NSECTPOS EQU $-DPSD1XBK DB NSECTS ; ccp + bdos length in sectors DB 25 ; number of sectors on track 0 +1 DB 26 ; number of sectors on track 1 +1 DW 26 ; cpm sectors per track DB 128/128 ; cpm block size/cpm sector size DB 128/128-1 ; disk sector sizBBBe/cpm sector size DB 0 ; logical to phisical sector map (1 = 2 phys sec.) DW 128 ; bytes per sector DB 00,00,00 TBLEND: EQU $ ; IF MLDR or XMLDR DIRBF: DS 128 IF DBLOCK HSTBUF: DS MAXHST ENDIF ; ENDSYS: EQU $ ; to make dsysgen h9appy ENDSYS1: DW ENDSYS ; ENDIF ; if mpmldr ; ; **. ; ; END OF COMMON DATA AND TABLE AREA ; ; ** ;  BB B B B B BBBB DB 512/128-1 ; disk sector size/cpm sector size DB 2 ; logical to physical sector map (1 = 2 phys sec.) DW 512 ; bytes per sector DB QSKEWBIT+HDBIT ; special Quantum code DW TRANSQ ; trans ENDIF ; ; cp/m single density 128 byte/sector single sided IBM STANDARD ; this is the default prameter block and end of table marker. ; NOTE: THIS TABLE MUST NOT BE REMOVED: ; TBLSTART: EQU $ DB 0E5H ; flag DB 0000$0010B ; internal code DPSD1XBK: ;1D/128 DISK PARAMETER BLOCK - IBM STC~CCCCCCCCC C C C C CCCDDDDDDDDD D D D D DDDDDDD D D D D DDEHEEEEEEEEE E E E E EEEFFFFFFFFFF F F F F FFFGZGGGGGGGGG G G G G GGGHHHHHHHHHH H H H H HHHI$IIIIIIIII I I I I IIIJJJJJJJJJJ J J J J JJJK6KKKKKKKKK K K K K KKKLLLLLLLLLL L L L L LLLMLLLLLLLLL L L L L LLLNLLLLLLLLL L L L L LLLOLLLLLLLLL L L L L LLLO