-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPMWC 2.5 LOADER SLOT ZERO.S
225 lines (177 loc) · 2.19 KB
/
PMWC 2.5 LOADER SLOT ZERO.S
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
ORG $8000
OBJ $8000
LST OFF
NMIL = $FFFA
NMIH = $FFFB
VTAB = $FC22
HOME = $FC58
INIT = $FB2F
ROMB = $C600
* ZPAG EQUATES
ORGNL = $00
ORGNH = $01
DESTL = $02
DESTH = $03
LMOD = $1A
* LMOD IS THE LENGTH OF
* THE MODIFICATION TO THE
* F8 ROM (CASSETTE WRITE
* ROUTINE AT $FECD REPLACED)
*
* IMPORTS
INTER = $FECD
CLOC = $D800
DISPVAL = CLOC+7
START = CLOC+8
ROMP = $8200
* EXPORTS:(IF THESE CHANGE
* THEN THE OTHER PROGS WILL HAVE
* TO BE RE-ASSEMBLED)
*
* BOOT1
* RESUME
* RWTS PARMS
PARM = $DFB8
VOLUME = PARM+$03
TRACK = PARM+$04
SECTOR = PARM+$05
DCTP = PARM+$06
BUFF = PARM+$08
BYTECNT = PARM+$0B
COMND = PARM+$0C
ERRCODE = PARM+$0D
JSR INIT
JSR HOME
JSR LPRINT
ASC "POOR MAN'S WILDCARD "
INV "V2.5"
HEX 8D
HEX 8D
ASC "COPYRIGHT 1984-85"
HEX 8D
ASC "BY SHOE STRING ENTERPRISES"
HEX 8D
HEX 8D
HEX 00
BIT $C083
BIT $C083
LDA #$00
STA $D000
LDA $D000
BNE ERROR
LDA #$FF
STA $D000
LDA $D000
CMP #$FF
BEQ PRESNT
ERROR JSR LPRINT
ASC "16 RAM CARD NOT IN SLOT ZERO!"
HEX 8D
ASC "TURN OFF COMPUTER BEFORE MOVING!"
HEX 8D8D
HEX 00
BIT $C080
RTS
PRESNT BIT $C081
BIT $C081
LDA #$00
STA ORGNL
STA DESTL
LDA #$D0
STA ORGNH
STA DESTH
LDX #$30
JSR MOVLAN
BIT $C08B
BIT $C08B
LDA #ROMP
STA ORGNL
LDA #/ROMP
STA ORGNH
LDA #CLOC
STA DESTL
LDA #/CLOC
STA DESTH
LDX #$08
JSR MOVLAN
LDX #LMOD
STINT LDA MONMOD,X
STA INTER,X
DEX
BPL STINT
LDX #$17
TPARM LDA $B7E8,X
STA PARM,X
DEX
BPL TPARM
LDA #$00
STA VOLUME
STA BYTECNT
LDA #$CB
STA DCTP
LDA #$DF
STA DCTP+1
LDA #<INTER+1
STA NMIL
LDA #>INTER+1
STA NMIH
LDA #$01
STA DISPVAL
BIT $C080
JSR LPRINT
ASC "POOR MAN'S WILDCARD "
ASC "IS INSTALLED"
HEX 8D
ASC "AND READY TO USE !"
HEX 8D8D
HEX 00
BIT $C080
RTS
LDX #$10
MOVLAN LDY #$00
MVL LDA (ORGNL),Y
STA (DESTL),Y
INY
BNE MVL
INC ORGNH
INC DESTH
DEX
BNE MVL
RTS
CHOUT EQU $FDF0
ZL = $FE
ZH = $FF
LPRINT LDA #$00
STA ZL
PLA
TAY
PLA
STA ZH
JMP PRINT2
LOOP LDA (ZL),Y
BEQ DONE
JSR CHOUT
PRINT2 INY
BNE LOOP
INC ZH
BNE LOOP
DONE LDA ZH
PHA
TYA
PHA
RTS
MONMOD RTI
BIT $C08B
BIT $C08B
DEC NMIL
JMP START
BOOT1 LDA #/ROMB
PHA
LDA #ROMB
PHA
PHA
RESUME INC NMIL
BIT $C080
EMOD RTI
QR = EMOD-MONMOD
LST ON