;{EQUATES} ;--------------------------------------------------------------- ; EQUATES.LIB standard equates ; Must be tied onto library routines before assembly ;--------------------------------------------------------------- ; ;--------------------------------------------------------------- ; ASCII Codes ; ctrlc equ 03h ;Control-C bel equ 07h ;Ring bell bs equ 08h ;Backspace tab equ 09h ;Tab character lf equ 0ah ;Linefeed fmfeed equ 0ch ;Formfeed cr equ 0dh ;Carriage return cpmeof equ 1ah ;CP/M eof character (^Z) esc equ 1bh ;Escape del equ 7fh ;Backspace & delete ; ;--------------------------------------------------------------- ; Machine Dependant Key Codes ; delfwd equ 'G'-64 ;Delete character under cursor uparr equ '_'-64 ;Cursor up key dwnarr equ '^'-64 ;Cursor down key bakarr equ 'A'-64 ;Cursor left key fwdarr equ 'F'-64 ;Cursor right key ; ;--------------------------------------------------------------- ; CP/M Addresses ; bios equ 0000h ;BIOS warm boot vector address bdos equ 0005h ;BDOS entry point cpmfcb equ 005ch ;Default File Control Block cpmbuf equ 0080h ;Default disk buffer and location of ;command line tail ; ;--------------------------------------------------------------- ; BDOS Functions ; wboot equ 00h ;Warm boot CP/M conin equ 01h ;Get console input conout equ 02h ;Print character at console auxin equ 03h ;Get character from auxiliary input auxout equ 04h ;Send byte to auxiliary output device lstout equ 05h ;Send byte to printer dircon equ 06h ;Direct console I/O (v2.0 onwards) axinst equ 07h ;Auxiliary input status (v3.1 only) axotst equ 08h ;Auxiliary output status (v3.1 only) strout equ 09h ;Print string to console conbuf equ 0ah ;Read console character buffer const equ 0bh ;Get console in status getver equ 0ch ;Get CP/M version number reset equ 0dh ;Reset disk system seldsk equ 0eh ;Select disk open equ 0fh ;Open file close equ 10h ;Close file scan1 equ 11h ;Search for first scan2 equ 12h ;Search for next delete equ 13h ;Delete file rdsect equ 14h ;Sequential sector read wrsect equ 15h ;Sequential sector write make equ 16h ;Create & open file rename equ 17h ;Rename file getlog equ 18h ;Get login vector curdsk equ 19h ;Return current disk setdma equ 1ah ;Set Direct Memory Access address alloc equ 1bh ;Get Allocation Vector address ;NB v3.1 may return address in different bank wrprot equ 1ch ;Write protect drive rovect equ 1dh ;Get Read Only Vector attrib equ 1eh ;Get/set file attributes getdpb equ 1fh ;Get DPB address ;NB DPB is 15 bytes in v2.2, but 17 in v3.1 user equ 20h ;Get/set user no (0-31 in v2.2, 0-15 in v3.1) rnread equ 21h ;Random sector read rnwrit equ 22h ;Random sector write size equ 23h ;Compute file size setrec equ 24h ;Set random record number rstdrv equ 25h ;Reset drive wrzfil equ 28h ;Write random with zero fill ; ; The following are present in v3.1 ONLY: ; nosecs equ 2ch ;Set multi sector record count errmod equ 2dh ;Set BDOS error mode dskspc equ 2eh ;Get free disk space chprog equ 2fh ;Chain to program flush equ 30h ;Flush disk buffers scblk equ 31h ;Get/set System Control Block biosfn equ 32h ;Call BIOS function ovrlay equ 3bh ;Load overlay calrsx equ 3ch ;Call Resident System Extension tmpfre equ 62h ;Free temporary datablocks trunct equ 63h ;Truncate file setlbl equ 64h ;Set directory label getlbl equ 65h ;Return directory label data byte stamp equ 66h ;Read directory password mode & date stamp wrxfcb equ 67h ;Write file password XFCB settod equ 68h ;Set date & time gettod equ 69h ;Get date & time passwd equ 6ah ;Set default password serno equ 6bh ;Return CP/M serial number rtcode equ 6ch ;Get/set program return code conmod equ 6dh ;Get/set console mode delim equ 6eh ;Get/set output delimiter conblk equ 6fh ;Send block to console lstblk equ 70h ;Send block to printer parse equ 98h ;Parse filename & initialize FCB ;