home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
norge.freeshell.org (192.94.73.8)
/
192.94.73.8.tar
/
192.94.73.8
/
pub
/
computers
/
cpm
/
alphatronic
/
PASCALZ4.ZIP
/
D3
/
CONSOL.SRC
< prev
next >
Wrap
Text File
|
1999-04-05
|
768b
|
28 lines
;CONSOLE ROUTINES
;
NAME CONSOL
ENTRY .CSTS,.CI,.CO
EXT .POPHDB,.PUSHBD
INCLUDE DEFLT.SRC
;
.CSTS CALL .PUSHBD ;SAVE ALL REGISTERS EXCEPT A
MVI C,11 ; CP/M CODE FOR CONSOLE STATUS.
CPM
ORA A ;TEST A FOR RETURN CODE.
JZ .POPHDB
MVI A,0FFH
JMP .POPHDB
;CONSOLE IN READS AND ECHOS A CHARACTER FROM THE CONSOLE.
.CI CALL .PUSHBD ;SAVE ALL REGISTERS EXCEPT A
MVI C,1 ;CP/M CODE FOR CONSOLE READ.
CPM
JMP .POPHDB ;RESTORE REGISTERS AND RETURN.
;CONSOLE OUT PROCEDURE PRINTS A CHARACTER PASSED IN REGISTER C ON THE CONSOLE.
.CO CALL .PUSHBD ;SAVE ALL REGISTERS EXCEPT A
MOV E,C ;CP/M WANTS THE CHARACTER IN E.
MVI C,2
CPM
JMP .POPHDB ;RESTORE REGISTERS AND RETURN.