-
Notifications
You must be signed in to change notification settings - Fork 0
/
LINESEL.MAC
executable file
·56 lines (52 loc) · 911 Bytes
/
LINESEL.MAC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
;
; RC nonstandard facility -- masket ud
;
; LINESELECTOR
; A=PORT; B=FUNCTION(RELEASE,A,B); RETURN:A=255=OK A=0=ERROR
;
LINESEL: ;
iff LS$ena ; Hvis ikke defineret, så returner true
ld a, true
ret
else ; ellers udfør oprindelig kode
ADD A, T$Ctrl ;
LD C,A ;
LINESELREADY: ;
DI ;
LD A,1 ;
OUT (C),A ;
IN A,(C) ;
EI ;
AND 1 ;** ALL SENT??
JR Z,LINESELREADY ;
LD D,5 ;
LD A,0 ;
CALL OUTA2D ;** LOWER DTR & RTS
DEC B ;
RET M ;
SLA B ;
OR B ;
CALL OUTA2D ;
OR 80H ;
CALL OUTA2D ;
LD HL,2 ;
CALL WAITHL ;
LD A,C ;
CP T$Ctrl ;
LD A,(T$RR0) ;
jr Z,LINEEXIT ;
LD A,(L$RR0) ;
LINEEXIT: ;
AND ' ' ;
jr Z,OUTA2D ;
LD A,True ;
RET ;
;
;SHIPS THE VALUE OF A TO REGISTER D OF DEVICE C
OUTA2D: ;
DI ;
OUT (C),D ;
OUT (C),A ;
EI ;
RET ;
endif ; --- slut på oprindelig kode til LINESEL: