home *** CD-ROM | disk | FTP | other *** search
- ; * * * * * BIOSCALL.LIB -- CODE FOR CALLING BIOS ENTRIES
- ;
- B$WBOOT EQU 0*3 ; warm start
- B$CONST EQU 1*3 ; console status
- B$CONIN EQU 2*3 ; console input
- B$CONOUT EQU 3*3 ; console output
- B$LIST EQU 4*3 ; list output
- B$PUNCH EQU 5*3 ; punch output
- B$READER EQU 6*3 ; reader input
- B$HOME EQU 7*3 ; seek to track 00
- B$SELDSK EQU 8*3 ; select drive
- B$SETTRK EQU 9*3 ; set track
- B$SETSEC EQU 10*3 ; select record
- B$SETDMA EQU 11*3 ; set buffer address
- B$READ EQU 12*3 ; read one record
- B$WRITE EQU 13*3 ; write one record
- B$LISTST EQU 14*3 ; list device status
- B$SECTRAN EQU 15*3 ; skew translation
- ;
- ; Subroutine to call BIOS at the entry table
- ; vector whose offset is in the [A] register
- ; alters [AF], and [HL]. Preserves [BC], [DE]
- ; ** NOTE: assumes BIOS is on page boundary **
- ;
- BIOSM MACRO
- BIOS EQU $
- PUSH B ! PUSH D
- LHLD BOOT+1 ; HL --> WBOOT entry
- ADD L ; add [A] to make address
- MOV L,A ; HL --> desired BIOS entry
- PUSH H ; save that, get
- LXI H,BIOSRET ; ..return address
- XTHL ; stack return address,
- PCHL ; ..go to BIOS, which
- BIOSRET EQU $ ; returns here
- POP D ! POP B
- RET
- ENDM
- ; * * * * * END OF BIOSCALL.LIB