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

21 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 STREET TREADLES
;
TRINP EQU 01H ;TREADLE INPUT PORT
TROUT EQU 01H ;TREADLE OUTPUT PORT
;
TREAD? MACRO TR,IFTRUE
;; "TREAD?" IS INVOKED TO CHECK IF
;; TREADLE GIVEN BY TR HAS BEEN SENSED.
;; IF SO, THE LATCH IS CLEARED AND CONTROL
;; TRANSFERS TO THE LABEL "IFTRUE"
LOCAL IFFALSE ;;IN CASE NOT SET
;;
IN TRINP ;;READ TREADLE SWITCHES
ANI 1 SHL TR ;;MASK PROPER BIT
JZ IFFALSE ;;SKIP RESET IF 0
MVI A,1 SHL TR ;;TO RESET THE BIT
OUT TROUT ;;CLEAR IT
JMP IFTRUE ;;GO TO TRUE LABEL
IFFALSE:
ENDM