; Copyright (C) Reston Publishing Co. 1983 ; --- important addresses CpmBase equ 0000h ; standard system CpmBasePage equ high CpmBase WarmStart equ 0000h+CpmBase ; vector to BIOS re-boot Bdos equ 0005h+CpmBase ; vector to CP/M BDOS BdosAddress equ 0006h+CpmBase ; address in the Bdos jump CpmFcb equ 005Ch+CpmBase ; dflt FCB, file operand 1 CpmFcb2 equ CpmFcb+10h+CpmBase ; file operand 2 CpmBuffer equ 0080h ; offset to file buffer 80..FFh CpmTail equ CpmBuffer+CpmBase ; command tail TransientArea equ 0100h+CpmBase ; start of the .COM file ; --- Bdos service request numbers BdosKeyin equ 01h ; one console input byte BdosType equ 02h ; type byte at console BdosPrint equ 05h ; print one byte BdosString equ 09h ; type "string$" at console BdosLine equ 0Ah ; read a buffered console line BdosTestCon equ 0Bh ; test console, A>0 if key hit BdosSetDrive equ 0Eh ; select default drivecode BdosOpen equ 0Fh ; open a disk file BdosClose equ 10h ; close (output) file BdosSrch1 equ 11h ; initial directory search BdosSrchn equ 12h ; successive directory searches BdosErase equ 13h ; erase a file BdosRead equ 14h ; read disk sequential BdosWrite equ 15h ; write disk sequential BdosMake equ 16h ; create a file directory entry BdosRename equ 17h ; rename file BdosDrive equ 19h ; get default drive number BdosSetBuffer equ 1Ah ; set file buffer address BdosGetAlloc equ 1Bh ; get address of alloc. vector BdosGetDPB equ 1Fh ; get address of DPB ; --- important ASCII values AsciiBEL equ 07h ; Bell AsciiBS equ 08h ; Backspace AsciiTAB equ 09h ; Tab AsciiLF equ 0Ah ; LineFeed AsciiFF equ 0Ch ; Formfeed AsciiCR equ 0Dh ; CarrierReturn AsciiSO equ 0Eh ; Shift-out AsciiSI equ 0Fh ; Shift-in AsciiDC1 equ 11h ; turn device on (was XON) AsciiDC2 equ 12h ; another on AsciiDC3 equ 13h ; turn device off (was XOFF) AsciiDC4 equ 14h ; another off CpmEof equ 1Ah ; ^Z, end of ascii file AsciiESC equ 1Bh ; escape character AsciiBlank equ 20h ; blank AsciiDEL equ 7Fh ; DEL, highest valid byte ; --- offsets in the Disk Parameter Block (DPB) DPB@RPT equ 0 ; records per track DPB@BSH equ 2 ; block-shift DPB@BLM equ 3 ; block-mask DPB@EXM equ 4 ; extent mask DPB@DSM equ 5 ; max allocation block number DPB@DRM equ 7 ; max directory entry number DPB@ALN equ 9 ; directory reservation bits DPB@OFF equ 13 ; directory track offset ; --- decimal sign characters, use SET to change them DecimalPlus set AsciiBlank DecimalMinus set '-' ectory track offset ; --- decimal sign characters