annotate level1/modules/sysgo.asm @ 3255:d0e8324af298

level3: nitro module: Use KrnBlk instead of hardcoded $3F Helps porting to non-CoCo3 platforms.
author Tormod Volden <debian.tormod@gmail.com>
date Wed, 29 Aug 2018 08:44:37 +0200
parents 185c31229f22
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1 ********************************************************************
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
2 * SysGo - Kickstart program module
0
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 *
1316
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
7 * Comment
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
8 * ------------------------------------------------------------------
1316
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
9 * 5 1998/10/12 Boisy G. Pitre
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
10 * Taken from OS-9 L2 Tandy distribution and modified banner for V3.
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
11 *
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
12 * 5r2 2003/01/08 Boisy G. Pitre
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
13 * Fixed fork behavior so that if 'shell startup' fails, system doesn't
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
14 * jmp to Crash, but tries AutoEx instead. Also changed /DD back to /H0
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
15 * for certain boot floppy cases.
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
16 *
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
17 * 2003/09/04 Boisy G. Pitre
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
18 * Back-ported to OS-9 Level One.
1462
062d65d5c132 Added check for SHIFT key which, if down, bypasses startup and AutoEx
boisy
parents: 1449
diff changeset
19 *
062d65d5c132 Added check for SHIFT key which, if down, bypasses startup and AutoEx
boisy
parents: 1449
diff changeset
20 * 5r3 2003/12/14 Boisy G. Pitre
062d65d5c132 Added check for SHIFT key which, if down, bypasses startup and AutoEx
boisy
parents: 1449
diff changeset
21 * Added SHIFT key check to prevent startup/autoex from starting if
062d65d5c132 Added check for SHIFT key which, if down, bypasses startup and AutoEx
boisy
parents: 1449
diff changeset
22 * held down. Gene Heskett, this Bud's for you.
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
23
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24 nam SysGo
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
25 ttl Kickstart program module
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
27 IFP1
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
28 use defsfile
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
29 ENDC
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
30
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
31 tylg set Prgrm+Objct
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32 atrv set ReEnt+rev
1462
062d65d5c132 Added check for SHIFT key which, if down, bypasses startup and AutoEx
boisy
parents: 1449
diff changeset
33 rev set $03
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
34 edition set $05
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
37
2059
46aa4db8204e More changes
boisy
parents: 2047
diff changeset
38
46aa4db8204e More changes
boisy
parents: 2047
diff changeset
39 org 0
46aa4db8204e More changes
boisy
parents: 2047
diff changeset
40 InitAddr rmb 2
46aa4db8204e More changes
boisy
parents: 2047
diff changeset
41 rmb 250
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
42 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
43
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
44 name fcs /SysGo/
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
45 fcb edition
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
46
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
47 * Default process priority
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
48 DefPrior set 128
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
49
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
50 Banner equ *
2989
5944d79e3fe5 sysgo: Update copyright year
Tormod Volden <debian.tormod@gmail.com>
parents: 2633
diff changeset
51 fcc /(C) 2014 The NitrOS-9 Project/
2059
46aa4db8204e More changes
boisy
parents: 2047
diff changeset
52 CrRtn fcb C$CR,C$LF
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
53
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
54 IFEQ ROM
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
55 IFNE NOS9DBG
1651
d696f50c0c67 updated standard.bl files with emulator clocks.
boisy
parents: 1642
diff changeset
56 fcc "** DEVELOPMENT BUILD **"
d696f50c0c67 updated standard.bl files with emulator clocks.
boisy
parents: 1642
diff changeset
57 fcb C$CR,C$LF
d696f50c0c67 updated standard.bl files with emulator clocks.
boisy
parents: 1642
diff changeset
58 fcc "** NOT FOR DISTRIBUTION! **"
1615
dc3272e71faa rb1773.asm: updated comments
boisy
parents: 1587
diff changeset
59 fcb C$CR,C$LF
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
60 ENDC
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
61 dts
591
40cc40e9ff5f New sysgo
boisy
parents: 588
diff changeset
62 fcb C$CR,C$LF
1419
98ae4a4b3e1c Makefiles now use -q with os9 format
boisy
parents: 1364
diff changeset
63 fcc !http://www.nitros9.org!
591
40cc40e9ff5f New sysgo
boisy
parents: 588
diff changeset
64 fcb C$CR,C$LF
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
65 ENDC
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
66
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 fcb C$LF
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
68 BannLen equ *-Banner
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
69
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
70 IFEQ ROM
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
71 DefDev equ *
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
72 IFNE DD
1228
0a49ee6bbd40 sysgo_dd and sysgo_h0 are now made
boisy
parents: 1222
diff changeset
73 fcc "/DD"
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
74 ELSE
1228
0a49ee6bbd40 sysgo_dd and sysgo_h0 are now made
boisy
parents: 1222
diff changeset
75 fcc "/H0"
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
76 ENDC
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
77 fcb C$CR
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
78 HDDev equ *
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
79 IFNE DD
1228
0a49ee6bbd40 sysgo_dd and sysgo_h0 are now made
boisy
parents: 1222
diff changeset
80 fcc "/DD/"
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
81 ELSE
1228
0a49ee6bbd40 sysgo_dd and sysgo_h0 are now made
boisy
parents: 1222
diff changeset
82 fcc "/H0/"
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
83 ENDC
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
84 ExecDir fcc "CMDS"
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
85 fcb C$CR
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
86 ENDC
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
87
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
88 Shell fcc "Shell"
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
89 fcb C$CR
274
00fe04149e6e Added AutoEx feature, ala Level Two
boisy
parents: 272
diff changeset
90 AutoEx fcc "AutoEx"
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
91 fcb C$CR
2633
41313184bd78 Expanded makefile... aded TODO, merged sysgo.asm into level1/modules file
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2614
diff changeset
92 AutoExPr fcc ""
41313184bd78 Expanded makefile... aded TODO, merged sysgo.asm into level1/modules file
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2614
diff changeset
93 fcb C$CR
41313184bd78 Expanded makefile... aded TODO, merged sysgo.asm into level1/modules file
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2614
diff changeset
94 AutoExPrL equ *-AutoExPr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
95
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
96 IFEQ ROM
1316
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
97 Startup fcc "startup -p"
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
98 fcb C$CR
1316
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
99 StartupL equ *-Startup
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
100 ENDC
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
101
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
102 ShellPrm equ *
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
103 IFGT Level-1
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
104 fcc "i=/1"
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
105 ENDC
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
106 CRtn fcb C$CR
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
107 ShellPL equ *-ShellPrm
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
108
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
109 * Default time packet
1642
31cba223dc92 sysgo.asm has new dts and dtb pseudo ops
boisy
parents: 1623
diff changeset
110 DefTime dtb
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111
3182
185c31229f22 Add level1 corsham port for the Corsham 6809 System
Boisy Pitre <coco@toughmac.com>
parents: 3181
diff changeset
112 IFEQ atari+corsham
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
113 IFEQ Level-1
2633
41313184bd78 Expanded makefile... aded TODO, merged sysgo.asm into level1/modules file
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2614
diff changeset
114 * BASIC reset code (CoCo port only)
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
115 BasicRst fcb $55
252
06775bf93f3a sysgo source commented additionally
boisy
parents: 201
diff changeset
116 neg <$0074
76
6f72b77131c0 Disassembled reset code a little
boisy
parents: 0
diff changeset
117 nop
1300
636cabe76c6e Now Bt.Size is defined for Level One
boisy
parents: 1287
diff changeset
118 clr >PIA0Base+3
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
119 nop
76
6f72b77131c0 Disassembled reset code a little
boisy
parents: 0
diff changeset
120 nop
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
121 sta >$FFDF turn off ROM mode
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
122 jmp >Bt.Start+2 jump to boot
252
06775bf93f3a sysgo source commented additionally
boisy
parents: 201
diff changeset
123 BasicRL equ *-BasicRst
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
124 ENDC
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
125 ENDC
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126
2059
46aa4db8204e More changes
boisy
parents: 2047
diff changeset
127 Init fcs /Init/
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
128
2061
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
129 * Entry: X = pointer to start of nul terminated string
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
130 * Exit: D = length of string
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
131 strlen pshs x
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
132 ldd #-1
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
133 go@ addd #$0001
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
134 tst ,x+
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
135 bne go@
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
136 puls x,pc
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
137
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
138 * Display carriage-return/line-feed.
2061
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
139 WriteCR pshs y
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
140 leax CrRtn,pcr
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
141 ldy #$0001
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
142 os9 I$WritLn
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
143 puls y,pc
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
144
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
145 **********************************************************
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
146 * SysGo Entry Point
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
147 **********************************************************
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
148 start leax >IcptRtn,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
149 os9 F$Icpt
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
150 * Set priority of this process
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
151 os9 F$ID
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
152 ldb #DefPrior
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
153 os9 F$SPrior
2059
46aa4db8204e More changes
boisy
parents: 2047
diff changeset
154
46aa4db8204e More changes
boisy
parents: 2047
diff changeset
155 * Write OS name and Machine name strings
46aa4db8204e More changes
boisy
parents: 2047
diff changeset
156 leax Init,pcr
46aa4db8204e More changes
boisy
parents: 2047
diff changeset
157 clra
2060
1a29c44561b3 Fixed sysgo issue for level 2
boisy
parents: 2059
diff changeset
158 pshs u
2059
46aa4db8204e More changes
boisy
parents: 2047
diff changeset
159 os9 F$Link
46aa4db8204e More changes
boisy
parents: 2047
diff changeset
160 bcs SignOn
46aa4db8204e More changes
boisy
parents: 2047
diff changeset
161 stx <InitAddr
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
162 ldd OSName,u point to OS name in INIT module
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
163 leax d,u point to install name in INIT module
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
164 bsr strlen
2061
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
165 tfr d,y
2059
46aa4db8204e More changes
boisy
parents: 2047
diff changeset
166 lda #$01
2061
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
167 os9 I$Write
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
168 bsr WriteCR
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
169 ldd InstallName,u
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
170 leax d,u point to install name in INIT module
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
171 bsr strlen
2061
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
172 tfr d,y
2059
46aa4db8204e More changes
boisy
parents: 2047
diff changeset
173 lda #$01
2061
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
174 os9 I$Write
b17559c279fe sysgo strings now nul terminated
boisy
parents: 2060
diff changeset
175 bsr WriteCR
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
176
2059
46aa4db8204e More changes
boisy
parents: 2047
diff changeset
177 * Show rest of banner
46aa4db8204e More changes
boisy
parents: 2047
diff changeset
178 SignOn
2060
1a29c44561b3 Fixed sysgo issue for level 2
boisy
parents: 2059
diff changeset
179 puls u
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
180 leax >Banner,pcr
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
181 ldy #BannLen
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
182 lda #$01 standard output
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
183 os9 I$Write write out banner
2059
46aa4db8204e More changes
boisy
parents: 2047
diff changeset
184
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
185 * Set default time
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
186 leax >DefTime,pcr
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
187 os9 F$STime set time to default
3181
d9760f344c96 Whitespace/comments in Atari sections of krn, clock, sysgo
Boisy Pitre <coco@toughmac.com>
parents: 3162
diff changeset
188
d9760f344c96 Whitespace/comments in Atari sections of krn, clock, sysgo
Boisy Pitre <coco@toughmac.com>
parents: 3162
diff changeset
189 IFEQ ROM
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
190 * Change EXEC and DATA dirs
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
191 leax >ExecDir,pcr
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
192 lda #EXEC.
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
193 os9 I$ChgDir change exec. dir
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
194 leax >DefDev,pcr
2614
d9e5c4629696 sysgo no longer I$ChgDir's with write mode
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2609
diff changeset
195 * Made READ. so that no write occurs at boot (Boisy on Feb 5, 2012)
d9e5c4629696 sysgo no longer I$ChgDir's with write mode
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2609
diff changeset
196 lda #READ.
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
197 os9 I$ChgDir change data dir.
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
198 bcs L0125
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
199 leax >HDDev,pcr
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
200 lda #EXEC.
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
201 os9 I$ChgDir change exec. dir to HD
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
202 ENDC
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
203
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
204 L0125 equ *
1316
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
205 pshs u,y
3182
185c31229f22 Add level1 corsham port for the Corsham 6809 System
Boisy Pitre <coco@toughmac.com>
parents: 3181
diff changeset
206 IFEQ atari+corsham
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
207 IFEQ Level-1
2633
41313184bd78 Expanded makefile... aded TODO, merged sysgo.asm into level1/modules file
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2614
diff changeset
208 * Setup BASIC code (CoCo port only)
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
209 leax >BasicRst,pcr
252
06775bf93f3a sysgo source commented additionally
boisy
parents: 201
diff changeset
210 ldu #D.CBStrt
06775bf93f3a sysgo source commented additionally
boisy
parents: 201
diff changeset
211 ldb #BasicRL
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
212 CopyLoop lda ,x+
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
213 sta ,u+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
214 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
215 bne CopyLoop
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
216 ELSE
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
217 os9 F$ID get process ID
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
218 lbcs L01A9 fail
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
219 leax ,u
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
220 os9 F$GPrDsc get process descriptor copy
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
221 lbcs L01A9 fail
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
222 leay ,u
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
223 ldx #$0000
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
224 ldb #$01
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
225 os9 F$MapBlk
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
226 bcs L01A9
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
227
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
228 lda #$55 set flag for Color BASIC
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
229 sta <D.CBStrt,u
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
230 * Copy our default I/O ptrs to the system process
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
231 ldd <D.SysPrc,u
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
232 leau d,u
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
233 leau <P$DIO,u
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
234 leay <P$DIO,y
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
235 ldb #DefIOSiz-1
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
236 L0151 lda b,y
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
237 sta b,u
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
238 decb
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
239 bpl L0151
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
240 ENDC
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
241 ENDC
274
00fe04149e6e Added AutoEx feature, ala Level Two
boisy
parents: 272
diff changeset
242
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
243 IFEQ ROM
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
244 * Fork shell startup here
3182
185c31229f22 Add level1 corsham port for the Corsham 6809 System
Boisy Pitre <coco@toughmac.com>
parents: 3181
diff changeset
245 IFEQ atari+corsham
2633
41313184bd78 Expanded makefile... aded TODO, merged sysgo.asm into level1/modules file
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2614
diff changeset
246 * Added 12/14/03: If SHIFT is held down, startup is not run (CoCo only)
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
247 lda #$01 standard output
1462
062d65d5c132 Added check for SHIFT key which, if down, bypasses startup and AutoEx
boisy
parents: 1449
diff changeset
248 ldb #SS.KySns
062d65d5c132 Added check for SHIFT key which, if down, bypasses startup and AutoEx
boisy
parents: 1449
diff changeset
249 os9 I$GetStt
062d65d5c132 Added check for SHIFT key which, if down, bypasses startup and AutoEx
boisy
parents: 1449
diff changeset
250 bcs DoStartup
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
251 bita #SHIFTBIT SHIFT key down?
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
252 bne L0186 Yes, don't to startup or autoex
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
253 ENDC
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
254
1462
062d65d5c132 Added check for SHIFT key which, if down, bypasses startup and AutoEx
boisy
parents: 1449
diff changeset
255 DoStartup leax >Shell,pcr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
256 leau >Startup,pcr
252
06775bf93f3a sysgo source commented additionally
boisy
parents: 201
diff changeset
257 ldd #256
1316
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
258 ldy #StartupL
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
259 os9 F$Fork
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
260 bcs DoAuto Startup failed..
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
261 os9 F$Wait
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
262 ENDC
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
263
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
264 * Fork AutoEx here
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
265 DoAuto leax >AutoEx,pcr
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
266 leau >CRtn,pcr
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
267 ldd #$0100
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
268 ldy #$0001
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
269 os9 F$Fork
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
270 bcs L0186 AutoEx failed..
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
271 os9 F$Wait
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
272
1316
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
273 L0186 equ *
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
274 puls u,y
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
275 FrkShell leax >ShellPrm,pcr
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
276 leay ,u
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
277 ldb #ShellPL
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
278 L0190 lda ,x+
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
279 sta ,y+
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
280 decb
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
281 bne L0190
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
282 * Fork final shell here
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
283 leax >Shell,pcr
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
284 lda #$01 D = 256 (B already 0 from above)
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
285 ldy #ShellPL
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
286 IFGT Level-1
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
287 os9 F$Chain Level 2/3. Should not return..
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
288 ldb #$06 it did! Fatal. Load error code
1315
23c681a015e1 cc3go has been renamed to SysGo
boisy
parents: 1300
diff changeset
289 bra Crash
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
290
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
291 L01A9 ldb #$04 error code
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
292 Crash clr >DPort+$08 turn off disk motor
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
293 jmp <D.Crash fatal error
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
294 ELSE
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
295 os9 F$Fork Level 1.
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
296 bcs DeadEnd Fatal.
1316
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
297 os9 F$Wait
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
298 bcc FrkShell OK, go start shell.
1316
50e9ec54e7e6 Fixed a problem in OS-9 Level One SysGo
boisy
parents: 1315
diff changeset
299 DeadEnd bra DeadEnd
3162
c44cd20907bd sysgo.asm: Delete trailing whitespace, fix indent (no functional change)
Neal Crook <foofoobedoo@gmail.com>
parents: 2989
diff changeset
300 ENDC
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
301
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
302 IcptRtn rti
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
303
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
304 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
305 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
306 end