2163
|
1 NAM bootman
|
|
2 TTL Boot Manager
|
|
3
|
|
4 BOOTTRACK equ 0
|
|
5
|
2191
|
6
|
|
7 PSECT bootman,$11,$80,0,0,entry
|
2163
|
8
|
|
9 VSECT
|
|
10 ENDSECT
|
|
11
|
|
12 TOP EQU $FE00
|
|
13
|
|
14 * The entry point of the boot manager
|
|
15 * Entry: stack is set up, U points to static storage
|
|
16 csect
|
|
17 sectptr rmb 2
|
|
18 endsect
|
|
19
|
2191
|
20 entry lbsr mach_init initialize the machine we're running on
|
|
21 leas entry,pcr set up stack
|
|
22 leau entry-256,pcr set up static storage
|
|
23 leax entry-512,pcr set up sector buffer pointer
|
2163
|
24 stx sectptr,u
|
|
25 leax welcome,pcr
|
|
26 bsr writestr
|
2191
|
27
|
|
28 * start booter calling
|
|
29 bootup
|
|
30 leax cfg_boot,pcr
|
|
31 ldy ,x get address of booter
|
|
32 beq bootup if 0, try again
|
|
33
|
|
34 * call booter's get info entry
|
|
35 leax attempt,pcr
|
|
36 bsr writestr
|
|
37 jsr 12,y
|
|
38 bsr writestr
|
|
39 leax crlf,pcr
|
|
40 bsr writestr
|
|
41
|
2163
|
42 loop bra loop
|
|
43
|
|
44
|
2191
|
45 attempt fcc "Attempting to boot from "
|
|
46 fcb 0
|
2163
|
47 welcome fcc "NitrOS-9 Boot Manager"
|
2191
|
48 crlf fcb 13,10
|
2163
|
49 fcb 0
|
|
50
|
|
51 * Helpful routines
|
|
52
|
|
53 * writestr - write string to output handler
|
|
54 * Entry:
|
|
55 * X = address of string (nul terminated)
|
2233
|
56 * Preserves:
|
|
57 * Y
|
2163
|
58 writestr:
|
2233
|
59 pshs y
|
2163
|
60 leay llio,pcr
|
|
61 writeloop
|
|
62 lda ,x+
|
|
63 beq writedone
|
|
64 jsr 3,y
|
|
65 bra writeloop
|
|
66 writedone
|
2233
|
67 puls y,pc
|
2163
|
68
|
|
69 endsect
|