Mercurial > hg > Members > kono > nitros9-code
annotate level1/cmds/exbin.asm @ 3295:6b7a7b233925 default tip
makefile: Allow PORTS with level1/2 mix
https://sourceforge.net/p/nitros9/feature-requests/10/
author | Tormod Volden <debian.tormod@gmail.com> |
---|---|
date | Tue, 19 Apr 2022 18:12:17 +0200 |
parents | 84ea83668304 |
children |
rev | line source |
---|---|
0 | 1 ******************************************************************** |
2 * Exbin - 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:
924
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:
924
diff
changeset
|
7 * Comment |
0 | 8 * ------------------------------------------------------------------ |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
924
diff
changeset
|
9 * 67 ????/??/?? |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
924
diff
changeset
|
10 * From Tandy OS-9 Level One VR 02.00.00. |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
924
diff
changeset
|
11 * |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
924
diff
changeset
|
12 * 1 2003/01/14 Boisy G. Pitre |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
924
diff
changeset
|
13 * Restarted edition, removed Motorola copyright. |
0 | 14 |
15 nam Exbin | |
16 ttl Motorola S-Record utility | |
17 | |
18 * Disassembled 98/09/15 00:16:49 by Disasm v1.6 (C) 1988 by RML | |
19 | |
20 ifp1 | |
21 use defsfile | |
22 endc | |
23 | |
24 tylg set Prgrm+Objct | |
25 atrv set ReEnt+rev | |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
924
diff
changeset
|
26 rev set $00 |
846 | 27 edition set 1 |
0 | 28 |
29 mod eom,name,tylg,atrv,start,size | |
30 | |
924 | 31 org 0 |
0 | 32 u0000 rmb 1 |
33 u0001 rmb 1 | |
34 u0002 rmb 2 | |
35 u0004 rmb 1 | |
36 u0005 rmb 1 | |
37 u0006 rmb 2 | |
38 u0008 rmb 1 | |
39 u0009 rmb 2 | |
40 u000B rmb 1 | |
41 u000C rmb 1 | |
42 u000D rmb 1 | |
43 u000E rmb 1 | |
44 u000F rmb 1 | |
45 u0010 rmb 2 | |
46 u0012 rmb 2 | |
47 u0014 rmb 2 | |
48 u0016 rmb 656 | |
49 size equ . | |
50 | |
51 name fcs /Exbin/ | |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
0
diff
changeset
|
52 fcb edition |
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
0
diff
changeset
|
53 |
846 | 54 * fcc "Copyright 1982 Motorola, Inc." |
55 * fcb $01 | |
0 | 56 |
57 start stx <u0002 | |
846 | 58 lda #READ. |
0 | 59 os9 I$Open |
60 bcc L003C | |
61 L0039 os9 F$Exit | |
62 L003C sta <u0000 | |
63 stx <u0002 | |
846 | 64 lda #WRITE. |
65 ldb #SHARE.+PEXEC.+PWRIT.+PREAD.+EXEC.+UPDAT. | |
0 | 66 os9 I$Create |
67 bcs L0039 | |
68 sta <u0001 | |
69 stx <u0002 | |
70 ldd #$0000 | |
71 std <u0009 | |
72 std <u000B | |
73 sta <u000F | |
74 ldx #$4E61 | |
75 stx <u0010 | |
76 ldx #$6D65 | |
77 stx <u0012 | |
78 ldx #$3D20 | |
79 stx <u0014 | |
80 L0065 lda <u0000 | |
81 leax <u0016,u | |
82 ldy #$0100 | |
83 os9 I$ReadLn | |
84 lbcs L0114 | |
85 leax <u0016,u | |
86 tfr x,y | |
87 tfr x,d | |
88 addd #$0100 | |
89 std <u0006 | |
90 L0081 lda ,x+ | |
91 cmpa #$53 | |
92 beq L008D | |
93 cmpx <u0006 | |
94 bne L0081 | |
95 bra L0065 | |
96 L008D lda ,x+ | |
97 suba #$30 | |
98 sta <u000E | |
99 beq L009E | |
100 cmpa #$09 | |
101 bne L009B | |
102 bra L0065 | |
103 L009B deca | |
104 bne L0065 | |
105 L009E bsr L011F | |
106 sta <u0008 | |
107 suba #$03 | |
108 sta <u000C | |
109 sta <u000D | |
110 bsr L011B | |
111 tst <u000E | |
112 beq L00CD | |
113 pshs x | |
114 ldx <u0009 | |
115 lda <u000F | |
116 beq L00C0 | |
117 cmpx <u0004 | |
118 beq L00C6 | |
846 | 119 leax >NonCtg,pcr |
0 | 120 bra L00DE |
121 L00C0 ldx <u0004 | |
122 lda #$01 | |
123 sta <u000F | |
124 L00C6 ldb <u000C | |
125 abx | |
126 stx <u0009 | |
127 puls x | |
128 L00CD bsr L011F | |
129 sta ,y+ | |
130 dec <u000D | |
131 bpl L00CD | |
132 lda <u0008 | |
133 inca | |
134 beq L00EB | |
846 | 135 leax >CSumErr,pcr |
0 | 136 L00DE lda #$02 |
137 ldy #$00FF | |
138 os9 I$WritLn | |
139 L00E7 clrb | |
140 lbra L0039 | |
141 L00EB lda <u000E | |
142 bne L0102 | |
143 lda #$0D | |
144 sta ,-y | |
145 lda #$01 | |
146 ldy #$00FF | |
147 leax <u0010,u | |
148 os9 I$WritLn | |
149 lbra L0065 | |
150 L0102 lda <u0001 | |
151 ldy <u000B | |
152 leax <u0016,u | |
153 os9 I$Write | |
154 lbcc L0065 | |
155 lbra L0039 | |
156 L0114 cmpb #$D3 | |
157 beq L00E7 | |
158 lbra L0039 | |
159 L011B bsr L011F | |
160 sta <u0004 | |
161 L011F lda ,x+ | |
162 bsr L013A | |
163 lsla | |
164 lsla | |
165 lsla | |
166 lsla | |
167 anda #$F0 | |
168 pshs a | |
169 lda ,x+ | |
170 bsr L013A | |
171 adda ,s+ | |
172 sta <u0005 | |
173 adda <u0008 | |
174 sta <u0008 | |
175 lda <u0005 | |
176 rts | |
177 L013A suba #$30 | |
178 bmi L0149 | |
179 cmpa #$09 | |
180 ble L0148 | |
181 suba #$07 | |
182 cmpa #$0F | |
183 bhi L0149 | |
184 L0148 rts | |
846 | 185 L0149 leax >NonHex,pcr |
0 | 186 bra L00DE |
846 | 187 NonHex fcc "** Non-hex character encountered" |
188 fcb C$BELL,C$CR | |
189 CSumErr fcc "** Checksum error detected" | |
190 fcb C$BELL,C$CR | |
191 NonCtg fcc "** Non-contiguous address space detected" | |
192 fcb C$BELL,C$CR | |
0 | 193 |
194 emod | |
195 eom equ * | |
196 end |