Repository navigation
Expand file tree
/
Copy pathcmdproc.asm
More file actions
158 lines (140 loc) · 2.52 KB
/
Copy pathcmdproc.asm
File metadata and controls
158 lines (140 loc) · 2.52 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
case on
mcopy cmdproc.macros
SESSION_NUM_START gequ $F8
RamGoComp gequ $E1100C
RamForbid gequ $E11018
RamPermit gequ $E1101C
* Location of command rec ptr on entry to an AppleTalk command procedure
* (in the system zero page, which is the current direct page)
cmdRecPtr gequ $80
* Location to put completion routine ptr before calling RamGoComp
compPtr gequ $84
* AppleTalk command procedure (which acts as a dispatcher for all commands)
cmdProc start
lda cmdRecPtr+2
pha
lda cmdRecPtr
pha
jsl DispatchASPCommand
cmp #0
bne doOrig
cpx #0
bne doOrig
rtl
doOrig short i ;push original procedure ptr
phx
long i
dec a
pha
rtl ;jump to it
end
nbpCmdProc start
lda cmdRecPtr+2
pha
lda cmdRecPtr
pha
jsl DoLookupName
cmp #0
bne doOrig
cpx #0
bne doOrig
rtl
doOrig short i ;push original procedure ptr
phx
long i
dec a
pha
rtl ;jump to it
end
pfiLoginCmdProc start
lda cmdRecPtr+2
pha
lda cmdRecPtr
pha
jslOldPFILogin entry
jsl jslOldPFILogin ; to be changed
rep #$30 ; ensure full native mode
jsl SaveNames
rtl
end
pfiLogin2CmdProc start
lda cmdRecPtr+2
pha
lda cmdRecPtr
pha
jslOldPFILogin2 entry
jsl jslOldPFILogin2 ; to be changed
rep #$30 ; ensure full native mode
jsl SaveNames
rtl
end
pfiListSessions2CmdProc start
lda cmdRecPtr+2
pha
lda cmdRecPtr
pha
jslOldPFIListSessions2 entry
jsl jslOldPFIListSessions2 ; to be changed
rep #$30 ; ensure full native mode
jsl InsertCorrectNames
rtl
end
pfiLoginContCmdProc start
lda cmdRecPtr+2
pha
lda cmdRecPtr
pha
jslOldPFILoginCont entry
jsl jslOldPFILoginCont ; to be changed
rep #$30 ; ensure full native mode
jsl PostLoginCont
rtl
end
CallCompletionRoutine start
phb
jsl ForceLCBank2 ;use LC bank 2
pha
phd
lda #0 ;set direct page = system zero page
tcd
jsl RamForbid
lda 9,s
sta compPtr
lda 9+2,s
sta compPtr+2
ora 9,s
beq skip ;skip call if compPtr = 0
jsl >RamGoComp
skip jsl RamPermit
pld
jsl RestoreStateReg
pla
sta 3,s
pla
sta 3,s
plb
rtl
end
* Replacement attention vector to be called from PFI.
* This calls the previous attention vector (from the ATalk driver) for ASP
* sessions (numbered 1-8), but not for the higher-numbered DSI sessions.
* This is needed because ATalk's attention vector is hard-coded for session
* numbers 1-8 only and trashes memory when called with higher numbers.
attentionVec start
phd
phy
phx
tsc
tcd
lda [1]
plx
ply
pld
and #$00FF
cmp #SESSION_NUM_START
bge skip
jmlOldAttentionVec entry
jml attentionVec ;to be changed to old attention vec
skip clc
rtl
end