Files
Digital-Research-Source-Code/MPM OPERATING SYSTEMS/MPM II/MPM II SOURCE 2/Control_2/simpio.lib
Sepp J Morris 31738079c4 Upload
Digital Research
2020-11-06 18:50:37 +01:00

26 lines
640 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

; MACRO LIBRARY FOR SIMPLE I/O
BDOS EQU 0005H ;BDOS ENTRY
CONIN EQU 1 ;CONSOLE INPUT FUNCTION
MSGOUT EQU 9 ;PRINT MESSAGE TIL $
CR EQU 0DH ;CARRIAGE RETURN
LF EQU 0AH ;LINE FEED
;
READ MACRO VAR
;; READ A SINGLE CHARACTER INTO VAR
MVI C,CONIN ;CONSOLE INPUT FUNCTION
CALL BDOS ;CHARACTER IS IN A
STA VAR
ENDM
;
WRITE MACRO MSG
;; WRITE MESSAGE TO CONSOLE
LOCAL MSGL,PMSG
JMP PMSG
MSGL: DB CR,LF ;;LEADING CRLF
DB '&MSG' ;;INLINE MESSAGE
DB '$' ;;MESSAGE TERMINATOR
PMSG: MVI C,MSGOUT ;;PRINT MESSAGE TIL $
LXI D,MSGL
CALL BDOS
ENDM