home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ENTERPRS
/
CPM
/
UTILS
/
S
/
ZEN2.LBR
/
CPM85SYS.LIB
< prev
next >
Wrap
Text File
|
2000-06-30
|
5KB
|
172 lines
;** CP/M-85 SYSTEM EQUATES
;
; OS VALUES
CCPL EQU 0800H ;LENGTH OF CCP
BDOSL EQU 0E00H ;LENGTH OF BDOS
; RESERVED LOCATIONS IN PAGE ZERO
ORG BIAS
BOOT RB 3 ;JUMP TO WARM START ENTRY
IOBYTE RB 1 ;IOBYTE
DFTDRV RB 1 ;CURRENT EFAULT DRIVE
BDOS RB 3 ;JUMP TO BDOS
INT1 RB 8 ;INTERRUPT LOCATION 1
INT2 RB 8 ;INTERRUPT LOCATION 2
INT3 RB 8 ;INTERRUPT LOCATION 3
INT4 RB 8 ;INTERRUPT LOCATION 4
INT5 RB 8 ;INTERRUPT LOCATION 5
INT6 RB 8 ;INTERRUPT LOCATION 6 (RESERVED)
INT7 RB 8 ;INTERRUPT LOCATION 7 (USED BY DDT)
BSCR RB 16 ;16 BYTE SCRATCH AREA FOR BIOS
RB 12 ;12 BYTES NOT USED BUT RESERVED
TFCB RB 36 ;TRANSIENT DEFAULT FCB
TFCB2 EQU TFCB+16 ;TRANSIENT 2ND FILENAME
TBUFF RB 128 ;DEFAULT DISK BUFFER
TPA RB 0 ;START OF TRANSIENT PROGRAM AREA
; HEATH PAGE ZERO LOCATIONS
IF ASM86
ORG OFFSET INT1+3
ENDIF
IF NOT ASM86
ORG INT1+3
ENDIF
TICCNT RW 2 ;32 BIT TIMER TIC COUNTER
TIMEFLG RB 1 ;TIMER 2 FLAG (0=RUNNING , 1=TIME OUT)
IF ASM86
ORG OFFSET INT2
ENDIF
IF NOT ASM86
ORG INT2
ENDIF
COMREG RB 0 ;BIOS88 COMMUNICATION REGION
COMFUNC RB 1 ; BIOS FUNCTION VALUE = (#-CBOOT)/3
COMRA RB 1 ; (A)
COMRBC RW 0 ; (BC)
COMRC RB 1 ; (C)
COMRB RB 1 ; (B)
COMRDE RW 0 ; (DE)
COMRE RB 1 ; (E)
COMRD RB 1 ; (D)
COMRHL RW 0 ; (HL)
COMRL RB 1 ; (L)
COMRH RB 1 ; (H)
COMWHO RB 1 ;WHICH PROCESSOR IS RUNNING
; ZPSPPS5 = 8085
; ZPSPPS8 = 8088
BDMAP EQU BSCR+00H ;DRIVE MAP (MAX OF 8 ENTRIES 0-7)
IF ASM86
BBIOS EQU WORD PTR BSCR+0EH ;TRUE ADDRESS FOR START OF BIOS
ENDIF
IF NOT ASM86
BBIOS EQU BSCR+0EH ;TRUE ADDRESS FOR START OF BIOS
ENDIF
; CP/M FUNCTIONS
RESET EQU 0 ;SYSTEM RESET
RDCON EQU 1 ;READ CONSOLE
WRCON EQU 2 ;WRITE CONSOLE
RDRDR EQU 3 ;READ READER
WRPUN EQU 4 ;WRITE PUNCH
WRLST EQU 5 ;WRITE LIST
DCONIO EQU 6 ;DIRECT CONSOLE I/O (2)
IOSTAT EQU 7 ;INTERROGATE I/O STATUS
ASTAT EQU 8 ;ALTER I/O STATUS
PRCONB EQU 9 ;PRINT CONSOLE BUFFER
RDCONB EQU 10 ;READ CONSOLE BUFFER
CCSTAT EQU 11 ;CHECK CONSOLE STATUS
LDH EQU 12 ;LIFT DISK HEAD
CPMVER EQU LDH ;GET CP/M VERSION (2)
RDS EQU 13 ;RESET DISK SYSTEM
SELDSK EQU 14 ;SELECT DISK
OPEN EQU 15 ;OPEN FILE
CLOSE EQU 16 ;CLOSE FILE
S1ST EQU 17 ;SEARCH FIRST
SNXT EQU 18 ;SEARCH NEXT
DELETE EQU 19 ;DELETE FILE
READ EQU 20 ;READ RECORD
WRITE EQU 21 ;WRITE RECORD
CREATE EQU 22 ;CREATE FILE
RENAME EQU 23 ;RENAME FILE
ILOG EQU 24 ;INTERROGATE LOGIN
IDSK EQU 25 ;INTERROGATE DISK
SETDMA EQU 26 ;SET DMA ADDRESS
IALLOC EQU 27 ;INTERROGATE ALLOCATION
WPD EQU 28 ;WRITE PROTECT DISK
GROV EQU 29 ;GET READ/ONLY VECTOR
SFA EQU 30 ;SET FILE ATTRIBUTES
GADPB EQU 31 ;GET ADDR OF DPB
SGUSR EQU 32 ;SET/GET USER CODE
READRR EQU 33 ;READ RANDOM RECORD
WRITERR EQU 34 ;WRITE RANDOM RECORD
CFSIZE EQU 35 ;COMPUTE FILE SIZE
SRR EQU 36 ;SET RANDOM RECORD
RESDRV EQU 37 ;RESET DRIVE
WRITERZ EQU 40 ;WRITE RANDOM WITH ZERO FILL
; BIOS ENTRY POINTS.
; GIVEN AS DISPLACEMENTS FROM WARM BOOT ENTRY POINT WHOSE
; ADDRESS IS USUALLY AT LOCATION BOOT+1.
; TO COMPUTE DISPLACEMENTS FROM VALUE STORED AT 'BBIOS'
; SUBTRACT 'CBOOT'. EG. DISPLACEMENT FOR WARM BOOT = WBOOT-CBOOT
CBOOT EQU -0003H ;COLD BOOT
WBOOT EQU 0000H ;WARM BOOT
CONST EQU 0003H ;CONSOLE STATUS
CONIN EQU 0006H ;CONSOLE INPUT
CONOUT EQU 0009H ;CONSOLE OUTPUT
LSTOUT EQU 000CH ;LIST OUTPUT
PUNOUT EQU 000FH ;PUNCH OUTPUT
RDRIN EQU 0012H ;READER INPUT
HOME EQU 0015H ;HOME DISK
SETDSK EQU 0018H ;SET (SELECT) DISK DRIVE
SETTRK EQU 001BH ;SET TRACK NUMBER
SETSEC EQU 001EH ;SET SECTOR NUMBER
SDMA EQU 0021H ;SET DMA ADDRESS
BREAD EQU 0024H ;READ SELECTED SECTOR
BWRITE EQU 0027H ;WRITE SELECTED SECTOR
BLSTST EQU 002AH ;CHECK LIST DEVICE STATUS
BSECTRN EQU 002DH ;SECTOR TRANSLATE ROUTINE
BFMT EQU 0030H ;FORMAT
BRDTRK EQU 0033H ;READ TRACK
BWRTRK EQU 0036H ;WRITE TRACK
BWPC EQU 0039H ;WRITE PROTECT CHECK
BCBD EQU 003CH ;CLEAR BUFFERS FOR DRIVE
; BIOS WRITE TYPES
BWRNOR EQU 0 ;NORMAL WRITE
BWRDIR EQU 1 ;WRITE TO A DIRECTORY SECTOR
BRWUA1 EQU 2 ;WRITE TO 1ST SECTOR OF UNALLOC BLOCK
; FILE CONTROL BLOCK
ORG 0
FCBDN RB 1 ;DISK NAME
FCBFN RB 8 ;FILE NAME
FCBFNL EQU 8 ;FILE NAME LENGTH
FCBFT RB 3 ;FILE TYPE
FCBFTL EQU 3 ;FILE TYPE LENGTH
FCBRO EQU FCBFT+0 ;R/O FLAG
FCBROF EQU 10000000B ; R/O FLAG VALUE
FCBSYS EQU FCBFT+1 ;SYS FLAG
FCBSYSF EQU 10000000B ; SYS FLAG VALUE
FCBEX RB 1 ;EXTENT
RB 1
FCBRWF RB 1 ;R/W FLAG
FCBRWFF EQU 10000000B ; R/W FLAG VALUE
FCBRC RB 1 ;RECORD COUNT
FCBDM RB 16 ;DISK ALLOCATION MAP
FCBNR RB 1 ;NEXT RECORD TO BE READ OR WRITTEN
FCBLS EQU 33 ;FCB LENGTH FOR SEQUENTIAL I/O
FCBRR RB 3 ;RANDOM RECORD POINTER
FCBLR EQU 36 ;FCB LENGTH FOR RANDOM I/O