annotate level1/cmds/tuneport.asm @ 1528:1c5a50add566

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