annotate level2/modules/cc3go.asm @ 473:091a1e4ae051

entered: chdir chmod qsort strass toupper tsleep wait
author roug
date Sun, 06 Oct 2002 09:10:36 +0000
parents 279247d74138
children d00fd02a9de5
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 * CC3Go - Kickstart program module
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 * 5 Taken from OS-9 L2 Tandy distribution and BGP 98/10/12
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
9 * modified banner for V3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
11 nam CC3Go
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
12 ttl Kickstart program module
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
13
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
15 use defsfile
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
16 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
18 tylg set Prgrm+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
19 atrv set ReEnt+rev
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
20 rev set $01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21 edition set $05
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
22
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
23 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25 u0000 rmb 32
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26 u0020 rmb 42
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
27 u004A rmb 33
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
28 u006B rmb 6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
29 u0071 rmb 655
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
30 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32 name fcs /CC3Go/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34
384
850b16b2aa76 cc3go_rom now folded into cc3go... Makefile modified to adjust
boisy
parents: 372
diff changeset
35 Banner
850b16b2aa76 cc3go_rom now folded into cc3go... Makefile modified to adjust
boisy
parents: 372
diff changeset
36 ifne NitrOS9
388
81ae11488745 Made changes to output
boisy
parents: 384
diff changeset
37 fcc /NitrOS-9 Level Two Vr. 0/
384
850b16b2aa76 cc3go_rom now folded into cc3go... Makefile modified to adjust
boisy
parents: 372
diff changeset
38 else
388
81ae11488745 Made changes to output
boisy
parents: 384
diff changeset
39 fcc / OS-9 Level Two Vr. 0/
384
850b16b2aa76 cc3go_rom now folded into cc3go... Makefile modified to adjust
boisy
parents: 372
diff changeset
40 endc
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
41 fcb 48+OS9Vrsn
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
42 fcc /.0/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
43 fcb 48+OS9Major
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
44 fcc /.0/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
45 fcb 48+OS9Minor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
46 fcb C$CR,C$LF
384
850b16b2aa76 cc3go_rom now folded into cc3go... Makefile modified to adjust
boisy
parents: 372
diff changeset
47 ifne NitrOS9
418
023a10777f77 Changed date to reflect NitrOS-9 beta 1 release
boisy
parents: 388
diff changeset
48 fcc " ORION BETA1 Release 09/22/2002"
384
850b16b2aa76 cc3go_rom now folded into cc3go... Makefile modified to adjust
boisy
parents: 372
diff changeset
49 else
388
81ae11488745 Made changes to output
boisy
parents: 384
diff changeset
50 fcc " ARIES BETA2 Release ??/??/2002"
384
850b16b2aa76 cc3go_rom now folded into cc3go... Makefile modified to adjust
boisy
parents: 372
diff changeset
51 endc
372
b3bfa479f8d0 scfdefs is now included from level2v3/defsfile and all references to it
boisy
parents: 0
diff changeset
52 fcb C$CR,C$LF
388
81ae11488745 Made changes to output
boisy
parents: 384
diff changeset
53 fcc / "A CoCo Community Project"/
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
54 fcb C$CR,C$LF
388
81ae11488745 Made changes to output
boisy
parents: 384
diff changeset
55 fcc / Visit us on the web:/
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
56 fcb C$CR,C$LF
388
81ae11488745 Made changes to output
boisy
parents: 384
diff changeset
57 fcc !http://cocoos9.sourceforge.net/!
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
58 fcb C$CR,C$LF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
59 fcb C$LF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
60 BannLen equ *-Banner
384
850b16b2aa76 cc3go_rom now folded into cc3go... Makefile modified to adjust
boisy
parents: 372
diff changeset
61 ifeq ROM
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
62 DefDev fcc "/H0"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63 fcb C$CR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
64 HDDev fcc "/H0/"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
65 ExecDir fcc "Cmds"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66 fcb C$CR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 fcc ",,,,,"
384
850b16b2aa76 cc3go_rom now folded into cc3go... Makefile modified to adjust
boisy
parents: 372
diff changeset
68 endc
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
69 Shell fcc "Shell"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
70 fcb C$CR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 fcc ",,,,,"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
72 AutoEx fcc "AutoEx"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
73 fcb C$CR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
74 fcc ",,,,,"
384
850b16b2aa76 cc3go_rom now folded into cc3go... Makefile modified to adjust
boisy
parents: 372
diff changeset
75 ifeq ROM
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
76 Startup fcc "STARTUP -P"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
77 fcb C$CR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
78 fcc ",,,,,"
384
850b16b2aa76 cc3go_rom now folded into cc3go... Makefile modified to adjust
boisy
parents: 372
diff changeset
79 endc
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
80 ShellPrm fcc "i=/1"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
81 CRtn fcb C$CR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
82 fcc ",,,,,"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
83 ShellPL equ *-ShellPrm
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
84
439
279247d74138 Changed default time
boisy
parents: 418
diff changeset
85 DefTime fcb 101,9,11,08,59,00
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
86
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
87 start leax >IcptRtn,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
88 os9 F$Icpt
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
89 os9 F$ID
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
90 ldb #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
91 os9 F$SPrior
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
92 leax >Banner,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
93 ldy #BannLen
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94 lda #$01 standard output
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
95 os9 I$Write write out banner
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
96 leax >DefTime,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
97 os9 F$STime set time to default
384
850b16b2aa76 cc3go_rom now folded into cc3go... Makefile modified to adjust
boisy
parents: 372
diff changeset
98 ifeq ROM
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
99 leax >ExecDir,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
100 lda #EXEC.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
101 os9 I$ChgDir change exec. dir
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
102 leax >DefDev,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
103 lda #READ.+WRITE.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104 os9 I$ChgDir change data dir.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
105 bcs L0125
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
106 leax >HDDev,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
107 lda #EXEC.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
108 os9 I$ChgDir change exec. dir to HD
384
850b16b2aa76 cc3go_rom now folded into cc3go... Makefile modified to adjust
boisy
parents: 372
diff changeset
109 endc
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
110 L0125 pshs u,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111 os9 F$ID
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112 bcs L01A9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
113 leax ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 os9 F$GPrDsc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
115 bcs L01A9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
116 leay ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
117 ldx #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
118 ldb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
119 os9 F$MapBlk
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
120 bcs L01A9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
121 * Set flag for Color BASIC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
122 lda #$55
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
123 sta <D.CBStrt,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
124 * Copy our default I/O ptrs to the system process
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125 ldd <D.SysPrc,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126 leau d,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
127 leau <P$DIO,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
128 leay <P$DIO,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129 ldb #DefIOSiz-1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
130 L0151 lda b,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
131 sta b,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
132 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
133 bpl L0151
384
850b16b2aa76 cc3go_rom now folded into cc3go... Makefile modified to adjust
boisy
parents: 372
diff changeset
134 ifeq ROM
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
135 * Fork shell startup here
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
136 leax >Shell,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
137 leau >Startup,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
138 ldd #256
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
139 ldy #16
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
140 os9 F$Fork
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
141 bcs L01A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
142 os9 F$Wait
384
850b16b2aa76 cc3go_rom now folded into cc3go... Makefile modified to adjust
boisy
parents: 372
diff changeset
143 endc
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
144 * Fork AutoEx here
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
145 leax >AutoEx,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
146 leau >CRtn,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
147 ldd #$0100
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
148 ldy #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
149 os9 F$Fork
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
150 bcs L0186
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
151 os9 F$Wait
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
152 L0186 puls u,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
153 leax >ShellPrm,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
154 leay ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
155 ldb #ShellPL
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
156 L0190 lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
157 sta ,y+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
158 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
159 bne L0190
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
160 * Fork final shell here
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
161 leax >Shell,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
162 ldd #$0100
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
163 ldy #ShellPL
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
164 os9 F$Chain
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
165 L01A5 ldb #$06
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
166 bra Crash
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
167 L01A9 ldb #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
168 Crash clr $FFA8 turn off disk motor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
169 jmp <D.Crash
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
170
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
171 IcptRtn rti
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
172
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
173 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
174 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
175 end