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
/
ZSYS
/
SIMTEL20
/
SYSLIB
/
SLIB2.LBR
/
SLOUT.Z80
< prev
next >
Wrap
Text File
|
2000-06-30
|
896b
|
44 lines
;
; SYSLIB Module Name: SLOUT
; Author: Richard Conn
; SYSLIB Version Number: 3.6
; Module Version Number: 1.1
public lout
;
; LOUT --
; LIST OUTPUT ROUTINE
; OUTPUT CHAR IN REG A TO LST:
; AFFECT NO REGISTERS OR FLAGS
;
PUTRG MACRO
PUSH BC ; SAVE BC, DE, HL
PUSH DE
PUSH HL
ENDM
GETRG MACRO
POP HL ; RESTORE HL, DE, BC
POP DE
POP BC
ENDM
LOUT:
PUSH AF ; SAVE REG A AND FLAGS
PUTRG ; SAVE REGISTERS
LD C,A ; CHAR IN C
LD HL,(JTABL) ; GET ADDRESS OF JUMP TABLE
LD L,L$OFF ; PRINTER OUTPUT ADR
LD DE,LRET ; SET UP RET ADR
PUSH DE ; ... ON STACK
JP (HL)
LRET: GETRG ; RESTORE REGISTERS
POP AF ; RESTORE REG A AND FLAGS
RET
BOOT EQU 0 ; CP/M BOOT ADDRESS
JTABL EQU BOOT+1 ; CP/M JUMP TABLE ADDRESS
L$OFF EQU 0FH ; LIST OUTPUT OFFSET
END