-
Notifications
You must be signed in to change notification settings - Fork 85
/
clall
61 lines (61 loc) · 1.63 KB
/
clall
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
.PAG 'CLALL 05/31/83'
;******************************************
;* NCLALL -- CLOSE ALL LOGICAL FILES *
;* DELETES ALL TABLE ENTRIES AND *
;* RESTORES DEFAULT I/O CHANNELS *
;* AND CLEARS IEEE PORT DEVICES *
;******************************************
;
;------------------------------------------
; NEW NCALL
; CLOSES ALL FILES UNTILL DONE OR AN
; ERROR OCCURS.
; ENTRY:
; C-CLR => CLOSE ALL FILES
; C-SET => .A = FA (DEVICE TO BE CLOSED)
;------------------------------------------
NCLALL ROR XSAV ;SAVE CARRY
STA SAVX ;SAVE .A
NCL010 LDX LDTND ;SCAN INDEX
NCL020 DEX
BMI NCLRCH ;ALL DONE...CLEAR CHANNELS (DCLOSE PATCH 5/31/83)
BIT XSAV ;CHECK FOR FIXED FA
BPL NCL030 ;NONE...
LDA SAVX
CMP FAT,X
BNE NCL020 ;NO MATCH...
NCL030 LDA LAT,X ;CLOSE THIS LA
SEC ;C-SET REQUIRED TO CLOSE
JSR CLOSE
BCC NCL010 ;
;
NCL040 LDA #0 ;ORIGINAL ENTRY FOR NCLALL
STA LDTND ;FORGET ALL FILES
.SKI 3
;********************************************
;* NCLRCH -- CLEAR CHANNELS *
;* UNLISTEN OR UNTALK IEEE DEVICES, BUT *
;* LEAVE OTHERS ALONE. DEFAULT CHANNELS *
;* ARE RESTORED. *
;********************************************
;
NCLRCH LDX #3
CPX DFLTO ;IS OUTPUT CHANNEL IEEE?
BCS JX750 ;NO...
;
JSR UNLSN ;YES...UNLISTEN IT
;
JX750 CPX DFLTN ;IS INPUT CHANNEL IEEE?
BCS CLALL2 ;NO...
;
JSR UNTLK ;YES...UNTALK IT
;
;RESTORE DEFAULT VALUES
;
;
CLALL2 LDX #3
STX DFLTO ;OUTPUT CHAN=3=SCREEN
LDA #0
STA DFLTN ;INPUT CHAN=0=KEYBOARD
RTS
.END