annotate level1/cmds/tuneport.asm @ 937:9f5945771770

Rewritten in assembler for size -- thanks Bob
author boisy
date Tue, 21 Jan 2003 04:31:22 +0000
parents 207aaa792076
children 84ea83668304
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
97
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
1 ********************************************************************
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
2 * TunePort - Tune Printer Port
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
3 *
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
4 * $Id$
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
5 *
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
6 * Ed. Comments Who YY/MM/DD
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
7 * ------------------------------------------------------------------
200
e9ce43cc215e Made major changes to headers for consistency and identification
boisy
parents: 163
diff changeset
8 * 3 From Tandy OS-9 Level One VR 02.00.00
97
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
9
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
10 nam TunePort
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
11 ttl Tune Printer Port
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
12
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
13 ifp1
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
14 use os9defs
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
15 use scfdefs
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
16 endc
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
17
927
207aaa792076 Added DOHELP conditional
boisy
parents: 924
diff changeset
18 DOHELP set 0
207aaa792076 Added DOHELP conditional
boisy
parents: 924
diff changeset
19
97
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
20 tylg set Prgrm+Objct
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
21 atrv set ReEnt+rev
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
22 rev set $01
200
e9ce43cc215e Made major changes to headers for consistency and identification
boisy
parents: 163
diff changeset
23 edition set 3
97
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
24
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
25 mod eom,name,tylg,atrv,start,size
924
c155aac72190 Made cosmetic changes
boisy
parents: 200
diff changeset
26
c155aac72190 Made cosmetic changes
boisy
parents: 200
diff changeset
27 org 0
97
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
28 u0000 rmb 1
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
29 u0001 rmb 1
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
30 u0002 rmb 1
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
31 u0003 rmb 2
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
32 u0005 rmb 2
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
33 u0007 rmb 2
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
34 u0009 rmb 1
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
35 u000A rmb 1
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
36 u000B rmb 2
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
37 u000D rmb 2
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
38 u000F rmb 2
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
39 u0011 rmb 1
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
40 u0012 rmb 1
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
41 u0013 rmb 3
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
42 size equ .
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
43
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
44 name fcs /TunePort/
200
e9ce43cc215e Made major changes to headers for consistency and identification
boisy
parents: 163
diff changeset
45 fcb edition
97
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
46
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
47 AdjPmpt fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
48 fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
49 fcc " TO ADJUST YOUR PORT ENTER A"
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
50 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
51 fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
52 fcc "NEW VALUE FOR THE LOOP DELAY"
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
53 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
54 fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
55 fcc "AFTER THE PROMPT AND CURRENT"
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
56 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
57 fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
58 fcc "VALUE ARE GIVEN. HIT [ENTER]"
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
59 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
60 fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
61 fcc "TO END."
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
62 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
63 fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
64 PmptLen equ *-AdjPmpt
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
65
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
66 DoneMsg fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
67 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
68 fcb $20
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
69 fcc "YOUR PORT IS NOW ADJUSTED FOR"
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
70 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
71 fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
72 fcc "THE CURRENT BAUD RATE AND THE"
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
73 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
74 fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
75 fcc "CRC OF THE MODULE HAS BEEN UP-"
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
76 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
77 fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
78 fcc "DATED. TO MAKE THE CHANGE"
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
79 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
80 fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
81 fcc "PERMANENT IN THE BOOT USE THE"
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
82 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
83 fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
84 fcc "COBBLER OR OS9GEN UTILITIES"
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
85 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
86 fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
87 fcc "OR THE -S OPTION OF TUNEPORT"
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
88 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
89 fcc "AT SYSTEM STARTUP"
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
90 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
91 DoneLen equ *-DoneMsg
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
92
927
207aaa792076 Added DOHELP conditional
boisy
parents: 924
diff changeset
93 IFNE DOHELP
97
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
94 HelpMsg fcc "USE:TUNEPORT </P OR /T1> [-OPT]"
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
95 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
96 fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
97 fcc " ADJUST BAUD RATE DELAY ON"
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
98 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
99 fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
100 fcc " SERIAL PORTS."
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
101 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
102 fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
103 fcc "Opt: -S=VALUE TO SET LOOP DELAY"
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
104 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
105 fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
106 fcc " FOR CURRENT BAUD VALUE"
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
107 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
108 HelpLen equ *-HelpMsg
927
207aaa792076 Added DOHELP conditional
boisy
parents: 924
diff changeset
109 ENDC
97
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
110
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
111 ErrMsg fcc "TUNEPORT: CURRENT BAUD RATE"
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
112 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
113 fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
114 fcc "IS OUT OF RANGE"
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
115 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
116 ErrLen equ *-ErrMsg
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
117 L0241 fcb C$BELL
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
118
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
119 TestNow fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
120 fcc "NOW TESTING ....."
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
121 TestLen equ *-TestNow
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
122
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
123 NewVMsg fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
124 fcc "NEW VALUE = "
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
125 NewVLen equ *-NewVMsg
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
126
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
127 CurVMsg fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
128 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
129 fcb C$LF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
130 fcc "CURRENT VALUE = "
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
131 CurVLen equ *-CurVMsg
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
132
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
133 TestMsg fcc " This is a test line for the TunePort utility"
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
134 fcb C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
135 TMsgLen equ *-TestMsg
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
136
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
137 start stu <u0003
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
138 clr <u0002
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
139 lbsr L0455
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
140 stx <u0009
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
141 cmpb #C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
142 lbeq L03FB
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
143 cmpb #'/
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
144 lbne L03FB
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
145 lda #Devic+Objct
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
146 leax $01,x
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
147 os9 F$Link
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
148 lbcs L03E6
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
149 stu <u000B
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
150 lda <u0012,u
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
151 ldu <u0003
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
152 cmpa #$00
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
153 lbne L03FB
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
154 ldy <u000B
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
155 leax <IT.BAU,y
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
156 lda ,x
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
157 anda #$0F
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
158 cmpa #$06
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
159 lbgt L03E9
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
160 sta <u0000
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
161 leax M$PDev,y
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
162 ldd ,x
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
163 leax d,y
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
164 leay <$19,u
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
165 L02EA lda ,x+
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
166 bmi L02F2
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
167 sta ,y+
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
168 bra L02EA
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
169 L02F2 anda #$7F
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
170 sta ,y+
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
171 lda #C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
172 sta ,y+
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
173 ldu <u000B
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
174 os9 F$UnLink
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
175 lbcs L03E6
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
176 ldu <u0003
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
177 ldx <u0009
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
178 lda #WRITE.
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
179 os9 I$Open
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
180 lbcs L03E6
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
181 sta <u0001
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
182 lbsr L0455
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
183 cmpb #C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
184 beq L031D
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
185 inc <u0002
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
186 stx <u0009
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
187 L031D lda #Drivr+Objct
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
188 leax <$19,u
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
189 os9 F$Link
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
190 lbcs L03DE
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
191 stu <u000B
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
192 sty <u000D
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
193 ldu <u0003
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
194 tst <u0002
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
195 bne L0345
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
196 lda #$01
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
197 leax >AdjPmpt,pcr
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
198 ldy #PmptLen
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
199 os9 I$Write
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
200 lbcs L03D7
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
201 L0345 ldd <u000D
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
202 subd #$000E
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
203 tfr d,x
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
204 lda <u0000
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
205 lsla
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
206 leax a,x
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
207 stx <u000F
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
208 tst <u0002
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
209 bne L035D
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
210 lbsr L045E
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
211 lbsr L040D
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
212 L035D tst <u0002
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
213 beq L038E
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
214 ldx <u0009
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
215 ldb ,x
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
216 cmpb #'-
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
217 lbne L03FB
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
218 leax $01,x
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
219 ldb ,x+
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
220 cmpb #'S
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
221 beq L037A
163
03bb361a6a42 Minor changes
boisy
parents: 97
diff changeset
222 cmpb #'s
97
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
223 beq L037A
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
224 lbra L03FB
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
225 L037A ldb ,x+
163
03bb361a6a42 Minor changes
boisy
parents: 97
diff changeset
226 cmpb #'=
97
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
227 bne L03FB
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
228 stx <u0009
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
229 lbsr L04F1
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
230 ldd <u0005
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
231 ldx <u000F
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
232 std ,x
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
233 clrb
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
234 bra L03D7
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
235 L038E lbsr L0432
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
236 lbsr L04DC
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
237 bcc L039D
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
238 lbsr L0444
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
239 andcc #^Carry
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
240 bra L038E
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
241 L039D ldd <u0005
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
242 beq L03A9
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
243 ldx <u000F
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
244 std ,x
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
245 bsr L040D
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
246 bra L038E
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
247 L03A9 ldx <u000B
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
248 ldd $02,x
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
249 subd #$0003
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
250 tfr d,y
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
251 leau d,x
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
252 ldd #$FFFF
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
253 std u0001,u
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
254 sta ,u
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
255 os9 F$CRC
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
256 com ,u
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
257 com u0001,u
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
258 com u0002,u
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
259 ldu <u0003
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
260 clra
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
261 leax >DoneMsg,pcr
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
262 ldy #DoneLen
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
263 os9 I$Write
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
264 bcs L03E6
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
265 lbsr L045E
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
266 L03D7 ldu <u000B
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
267 os9 F$UnLink
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
268 bcs L03E6
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
269 L03DE lda <u0001
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
270 os9 I$Close
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
271 bcs L03E6
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
272 clrb
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
273 L03E6 os9 F$Exit
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
274 L03E9 lda #$02
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
275 leax >ErrMsg,pcr
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
276 ldy #ErrLen
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
277 os9 I$Write
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
278 bcs L03E6
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
279 clrb
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
280 bra L03E6
927
207aaa792076 Added DOHELP conditional
boisy
parents: 924
diff changeset
281 L03FB equ *
207aaa792076 Added DOHELP conditional
boisy
parents: 924
diff changeset
282 IFNE DOHELP
207aaa792076 Added DOHELP conditional
boisy
parents: 924
diff changeset
283 lda #$02
97
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
284 leax >HelpMsg,pcr
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
285 ldy #HelpLen
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
286 os9 I$Write
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
287 bcs L03E6
927
207aaa792076 Added DOHELP conditional
boisy
parents: 924
diff changeset
288 ENDC
97
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
289 clrb
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
290 bra L03E6
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
291 L040D lda #$01
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
292 leax >TestNow,pcr
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
293 ldy #TestLen
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
294 os9 I$Write
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
295 bcs L03E6
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
296 lda <u0001
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
297 leax >TestMsg,pcr
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
298 ldy #TMsgLen
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
299 os9 I$WritLn
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
300 bcs L03E6
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
301 ldx #$000A
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
302 os9 F$Sleep
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
303 rts
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
304 L0432 bsr L045E
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
305 lda #$01
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
306 leax >NewVMsg,pcr
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
307 ldy #NewVLen
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
308 os9 I$Write
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
309 bcs L03E6
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
310 rts
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
311 L0444 pshs y,x,b,a
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
312 lda #$02
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
313 leax >L0241,pcr
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
314 ldy #$0001
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
315 os9 I$Write
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
316 puls pc,y,x,b,a
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
317 L0455 ldb ,x+
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
318 cmpb #C$SPAC
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
319 beq L0455
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
320 leax -$01,x
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
321 rts
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
322 L045E pshs y,x,b,a
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
323 lda #$01
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
324 leax >CurVMsg,pcr
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
325 ldy #CurVLen
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
326 os9 I$Write
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
327 lbcs L03E6
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
328 ldx <u000F
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
329 ldd ,x
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
330 std <u0005
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
331 leay >L04D0,pcr
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
332 leax <u0013,u
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
333 stx <u0011
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
334 L0480 ldd ,y
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
335 beq L04BC
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
336 ldd <u0005
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
337 pshs b,a
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
338 ldd ,y++
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
339 lbsr L053F
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
340 cmpb #$00
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
341 bne L0498
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
342 leax <u0013,u
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
343 cmpx <u0011
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
344 beq L0480
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
345 L0498 std <u0007
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
346 addb #$30
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
347 ldx <u0011
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
348 stb ,x+
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
349 stx <u0011
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
350 ldx <u0007
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
351 leax -$01,x
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
352 leay -$02,y
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
353 ldd ,y++
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
354 std <u0007
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
355 L04AC addd <u0007
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
356 leax -$01,x
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
357 bne L04AC
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
358 std <u0007
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
359 ldd <u0005
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
360 subd <u0007
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
361 std <u0005
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
362 bra L0480
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
363 L04BC ldx <u0011
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
364 lda #$0D
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
365 sta ,x
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
366 leax <u0013,u
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
367 lda #$01
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
368 ldy #$0006
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
369 os9 I$WritLn
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
370 puls pc,y,x,b,a
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
371 L04D0 fcb $27,$10,$03,$e8,$00,$64,$00,$0a,$00,$01,$00,$00
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
372 L04DC pshs y,x,b,a
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
373 clra
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
374 leax <u0013,u
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
375 L04E2 ldy #$0006
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
376 os9 I$ReadLn
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
377 lbcs L03E6
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
378 bsr L0504
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
379 puls pc,y,x,b,a
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
380 L04F1 pshs y,x,b,a
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
381 ldx <u0009
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
382 leay <u0013,u
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
383 L04F8 lda ,x+
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
384 sta ,y+
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
385 cmpa #C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
386 bne L04F8
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
387 bsr L0504
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
388 puls pc,y,x,b,a
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
389 L0504 pshs y,x,b,a
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
390 clra
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
391 clrb
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
392 std <u0005
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
393 leay <u0013,u
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
394 L050D ldb ,y+
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
395 cmpb #'0
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
396 blt L0537
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
397 cmpb #'9
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
398 bgt L0537
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
399 pshs b
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
400 ldx #$0009
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
401 ldd <u0005
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
402 std <u0007
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
403 L0520 addd <u0007
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
404 leax -$01,x
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
405 bne L0520
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
406 std <u0005
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
407 puls b
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
408 subb #'0
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
409 clra
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
410 std <u0007
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
411 ldd <u0005
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
412 addd <u0007
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
413 std <u0005
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
414 bra L050D
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
415 L0537 cmpb #C$CR
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
416 beq L053D
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
417 orcc #Carry
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
418 L053D puls pc,y,x,b,a
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
419 L053F pshs b,a
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
420 leas -$02,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
421 clr ,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
422 clr $01,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
423 lda #$01
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
424 L0549 inca
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
425 lsl $03,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
426 rol $02,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
427 bpl L0549
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
428 sta ,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
429 ldd $06,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
430 clr $06,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
431 clr $07,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
432 L0558 subd $02,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
433 bcc L0562
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
434 addd $02,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
435 andcc #^Carry
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
436 bra L0564
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
437 L0562 orcc #Carry
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
438 L0564 rol $07,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
439 rol $06,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
440 lsr $02,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
441 ror $03,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
442 dec ,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
443 bne L0558
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
444 std $02,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
445 tst $01,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
446 beq L057E
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
447 ldd $06,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
448 nega
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
449 negb
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
450 sbca #$00
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
451 std $06,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
452 L057E ldx $04,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
453 ldd $06,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
454 std $04,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
455 stx $06,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
456 ldx $02,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
457 ldd $04,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
458 leas $06,s
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
459 rts
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
460
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
461 emod
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
462 eom equ *
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
463 end
e42a6ba46d18 Initial import of tuneport.asm
boisy
parents:
diff changeset
464