Mercurial > hg > Members > kono > nitros9-code
annotate level1/cmds/binex.asm @ 1818:06d326167f80
Misc stuff
author | boisy |
---|---|
date | Thu, 21 Apr 2005 17:39:19 +0000 |
parents | 84ea83668304 |
children |
rev | line source |
---|---|
0 | 1 ******************************************************************** |
2 * Binex - Motorola S-Record utility | |
3 * | |
4 * $Id$ | |
5 * | |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
846
diff
changeset
|
6 * Edt/Rev YYYY/MM/DD Modified by |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
846
diff
changeset
|
7 * Comment |
0 | 8 * ------------------------------------------------------------------ |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
846
diff
changeset
|
9 * 67 ????/??/?? |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
846
diff
changeset
|
10 * From Tandy OS-9 Level Two VR 02.00.01. |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
846
diff
changeset
|
11 * |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
846
diff
changeset
|
12 * 68 2003/01/14 Boisy G. Pitre |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
846
diff
changeset
|
13 * Restarted edition; removed Motorola copyright. |
846 | 14 |
0 | 15 |
16 nam Binex | |
17 ttl Motorola S-Record utility | |
18 | |
19 * Disassembled 98/09/15 00:08:52 by Disasm v1.6 (C) 1988 by RML | |
20 | |
21 ifp1 | |
22 use defsfile | |
23 endc | |
24 | |
25 tylg set Prgrm+Objct | |
26 atrv set ReEnt+rev | |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
846
diff
changeset
|
27 rev set $00 |
846 | 28 edition set 1 |
0 | 29 |
30 mod eom,name,tylg,atrv,start,size | |
31 | |
32 u0000 rmb 1 | |
33 u0001 rmb 1 | |
34 u0002 rmb 2 | |
35 u0004 rmb 1 | |
36 u0005 rmb 1 | |
37 u0006 rmb 1 | |
38 u0007 rmb 2 | |
39 u0009 rmb 1 | |
40 u000A rmb 2 | |
41 u000C rmb 1 | |
42 u000D rmb 31 | |
43 u002C rmb 1 | |
44 u002D rmb 1 | |
45 u002E rmb 1 | |
46 u002F rmb 2 | |
47 u0031 rmb 2 | |
48 u0033 rmb 2 | |
49 u0035 rmb 656 | |
50 size equ . | |
51 | |
52 name fcs /Binex/ | |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
0
diff
changeset
|
53 fcb edition |
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
0
diff
changeset
|
54 |
846 | 55 * fcc "Copyright 1982 Motorola, Inc." |
56 * fcb $01 | |
0 | 57 |
58 start stx <u0002 | |
846 | 59 lda #READ. |
0 | 60 os9 I$Open |
61 bcc L003C | |
62 L0039 os9 F$Exit | |
63 L003C sta <u0000 | |
64 stx <u0002 | |
846 | 65 lda #WRITE. |
66 ldb #SHARE.+PEXEC.+PWRIT.+PREAD.+EXEC.+UPDAT. | |
0 | 67 os9 I$Create |
68 bcs L0039 | |
69 sta <u0001 | |
70 stx <u0002 | |
71 ldd #$0000 | |
72 sta <u0006 | |
73 std <u000A | |
74 std <u002F | |
75 ldx #$5330 | |
76 stx <u002D | |
77 ldx #$3030 | |
78 stx <u0031 | |
79 stx <u0033 | |
846 | 80 L0062 leax >AskStart,pcr |
0 | 81 lda #$01 |
846 | 82 ldy #AskStrtL |
0 | 83 os9 I$Write |
84 leax <u0031,u | |
85 lda #$00 | |
86 ldy #$0005 | |
87 os9 I$ReadLn | |
88 leay -$01,y | |
89 cmpy #$0000 | |
90 beq L0062 | |
91 cmpy #$0004 | |
92 bhi L0062 | |
93 beq L00A7 | |
94 tfr y,d | |
95 pshs b | |
96 decb | |
97 leax <u0031,u | |
98 leay $04,x | |
99 L0095 lda b,x | |
100 sta ,-y | |
101 decb | |
102 bpl L0095 | |
103 ldb #$04 | |
104 subb ,s+ | |
105 lda #$30 | |
106 L00A2 sta ,-y | |
107 decb | |
108 bgt L00A2 | |
109 L00A7 lbsr L0178 | |
846 | 110 leax >AskName,pcr |
0 | 111 lda #$01 |
846 | 112 ldy #AskNameL |
0 | 113 os9 I$Write |
114 leax u000C,u | |
115 lda #$00 | |
116 ldy #$0015 | |
117 os9 I$ReadLn | |
118 leay -$01,y | |
119 cmpy #$0000 | |
120 bne L0120 | |
121 L00CA lda <u0000 | |
122 leax u000C,u | |
123 ldy #$0020 | |
124 os9 I$Read | |
125 lbcs L0160 | |
126 cmpy #$0000 | |
127 lbeq L0160 | |
128 lda <u0006 | |
129 bne L0120 | |
130 inc <u0006 | |
131 lda #$31 | |
132 sta <u002E | |
133 ldx <u0004 | |
134 stx <u000A | |
135 ldx u000C,u | |
136 cmpx #$87CD | |
137 beq L0120 | |
846 | 138 leax >Alert,pcr |
0 | 139 pshs y |
846 | 140 ldy #AlertL |
0 | 141 lda #$01 |
142 os9 I$Write | |
143 leax <u0035,u | |
144 ldy #$0002 | |
145 lda #$00 | |
146 os9 I$ReadLn | |
147 puls y | |
148 lda <u0035,u | |
149 anda #$DF | |
150 cmpa #$59 | |
151 beq L0120 | |
152 L011C clrb | |
153 os9 F$Exit | |
154 L0120 sty <u0007 | |
155 tfr y,d | |
156 addb #$03 | |
157 stb <u0009 | |
158 leax u0009,u | |
159 clra | |
160 ldb ,x | |
161 L012E adda ,x+ | |
162 decb | |
163 bne L012E | |
164 coma | |
165 sta ,x | |
166 leax u0009,u | |
167 leay <u002F,u | |
168 ldb ,x | |
169 incb | |
170 L013E bsr L01B6 | |
171 decb | |
172 bne L013E | |
173 ldb #$0D | |
174 stb ,y | |
175 leax <u002D,u | |
176 ldy #$0073 | |
177 lda <u0001 | |
178 os9 I$WritLn | |
179 lbcs L0039 | |
180 ldd <u000A | |
181 addd <u0007 | |
182 std <u000A | |
183 lbra L00CA | |
184 L0160 cmpb #$D3 | |
185 lbne L0039 | |
186 lda #$39 | |
187 cmpa <u002E | |
188 beq L011C | |
189 sta <u002E | |
190 ldx <u0004 | |
191 stx <u000A | |
192 ldy #$0000 | |
193 bra L0120 | |
194 L0178 bsr L017C | |
195 sta <u0004 | |
196 L017C lda ,x+ | |
197 bsr L0197 | |
198 lsla | |
199 lsla | |
200 lsla | |
201 lsla | |
202 anda #$F0 | |
203 pshs a | |
204 lda ,x+ | |
205 bsr L0197 | |
206 adda ,s+ | |
207 sta <u0005 | |
208 adda <u002C | |
209 sta <u002C | |
210 lda <u0005 | |
211 rts | |
212 L0197 suba #$30 | |
213 bmi L01A6 | |
214 cmpa #$09 | |
215 ble L01A5 | |
216 suba #$07 | |
217 cmpa #$0F | |
218 bhi L01A6 | |
219 L01A5 rts | |
220 L01A6 leax >L01D7,pcr | |
221 lda #$02 | |
222 ldy #$00FF | |
223 os9 I$WritLn | |
224 lbra L011C | |
225 L01B6 pshs b,a | |
226 lda ,x+ | |
227 tfr a,b | |
228 lsra | |
229 lsra | |
230 lsra | |
231 lsra | |
232 bsr L01CC | |
233 sta ,y+ | |
234 tfr b,a | |
235 bsr L01CC | |
236 sta ,y+ | |
237 puls pc,b,a | |
238 L01CC anda #$0F | |
239 adda #$30 | |
240 cmpa #$39 | |
241 bls L01D6 | |
242 adda #$07 | |
243 L01D6 rts | |
244 L01D7 fcc "** NON-HEX CHARACTER ENCOUNTERED" | |
846 | 245 fcb C$BELL,C$CR |
246 AskName fcc "Enter name for header record: " | |
247 AskNameL equ *-AskName | |
248 AskStart fcc "Enter starting address for file: $" | |
249 AskStrtL equ *-AskStart | |
250 Alert fcb C$BELL,C$CR,C$LF | |
0 | 251 fcc "** Not a binary load module file. Proceed anyway (Y/N)? " |
846 | 252 AlertL equ *-Alert |
0 | 253 |
254 emod | |
255 eom equ * | |
256 end |