-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathsyscal
74 lines (74 loc) · 895 Bytes
/
syscal
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
.PAGE 'INTERFACE SYSTEM CALLS.'
;
READST
SEC
STORST
JMP KRDST ;RETURN I/O STATUS BYTE
;
OPEN
CLC
OPN10 JSR KOPEN ;OPEN LOGICAL FILE
BCS IOERR
RTS
;
GETIN
JSR KGETIN ;GET A BYTE
BCS IOERR
RTS
;
BASIN
JSR KBASIN ;GET A BYTE
BCS IOERR
RTS
;
BSOUT
JSR KBSOUT ;SEND A BYTE
BCS IOERR
RTS
;
CHKIN
JSR KCHKIN ;OPEN CHANNEL IN
BCS IOERR
RTS
;
CHKOUT
JSR KCHOUT ;OPEN - OUT
BCS IOERR
RTS
;
LOAD
JSR KLOAD ;LOAD FROM FILE
BCS IOERR
RTS
;
SAVE
JSR KSAVE ;SAVE TO -
BCS IOERR
RTS
;
CLOSE
SEC
TCLOSE
JMP KCLOSE
;
CLALL
CLC ;C-CLR => CLOSE 'EM ALL
JMP KCLALL ;CLOSE ALL FILES
.SKIP 4
;
; IOERR - .A = ERROR NUMBER
; CY = 1
; PRINT ERROR MESSAGE AND GO TO READY.
;
IOERR CLC
ROL A
PHA
LDA #DOSLFN ;CLOSE CMD CHANNEL IN CASE
CLC
JSR TCLOSE
PLA
TAX
JMP ERROR
.SKI 4
ENDPRG
.END