annotate level1/cmds/binex.asm @ 193:c30930f8f3f8

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