annotate 3rdparty/packages/sierra/objs_lsl/sierra.asm @ 1357:0de024ea86cd

Added new style comments
author boisy
date Wed, 17 Sep 2003 21:56:49 +0000
parents 4e78dd135898
children 1712fac2daac
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1 ********************************************************************
1081
4e78dd135898 Slight source cleanup
boisy
parents: 1080
diff changeset
2 * sierra - Leisure Suit Larry setup module
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
3 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
4 * $Id$
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
5 *
1357
0de024ea86cd Added new style comments
boisy
parents: 1081
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
0de024ea86cd Added new style comments
boisy
parents: 1081
diff changeset
7 * Comment
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
8 * ------------------------------------------------------------------
1357
0de024ea86cd Added new style comments
boisy
parents: 1081
diff changeset
9 * 0 2003/01/31 Paul W. Zibaila
0de024ea86cd Added new style comments
boisy
parents: 1081
diff changeset
10 * Disassembly of original distribution and merged in comments from
0de024ea86cd Added new style comments
boisy
parents: 1081
diff changeset
11 * an earlier disasm dated 1992.
0de024ea86cd Added new style comments
boisy
parents: 1081
diff changeset
12 *
0de024ea86cd Added new style comments
boisy
parents: 1081
diff changeset
13 * 1 2003/03/10 Boisy G. Pitre
0de024ea86cd Added new style comments
boisy
parents: 1081
diff changeset
14 * Monitor type bug now fixed.
777
3a8f068cc438 Import of sources
boisy
parents:
diff changeset
15
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
16 *Monitor defs
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
17 COMP equ 0
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
18 RGB equ 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
19 MONO equ 2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
20
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
21
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
22 * I/O path definitions
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
23 StdIn equ 0
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
24 StdOut equ 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
25 StdErr equ 2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
26
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
27 nam sierra
1081
4e78dd135898 Slight source cleanup
boisy
parents: 1080
diff changeset
28 ttl Leisure Suit Larry setup module
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
29
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
30 ifp1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
31 use defsfile
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
32 use scfdefs
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
33 endc
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
34
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
35 tylg set Prgrm+Objct
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
36 atrv set ReEnt+rev
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
37 rev set $01
1080
3d0b20100199 Monitor type bug fixed, edition now 1
boisy
parents: 1079
diff changeset
38 edition set 1
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
39
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
40 mod eom,name,tylg,atrv,start,size
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
41
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
42 org 0
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
43 u0000 rmb 2 holds size of data area
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
44 u0002 rmb 1 MMU block # mapped into block #2 -org
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
45 u0003 rmb 1 MMU block # mapped into block #3 -org
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
46 u0004 rmb 2 Hi res screen start address
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
47 u0006 rmb 2 Hi res screen end address ?????
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
48 u0008 rmb 1 disasm as u0008 rmb 2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
49 u0009 rmb 1 MMU Block # SIERRA is in -org
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
50 u000A rmb 1 double byte MMU Task 1 block 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
51 u000B rmb 1 value actually resides here
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
52 u000C rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
53 u000D rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
54 u000E rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
55 u000F rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
56 u0010 rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
57 u0011 rmb 3
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
58 u0014 rmb 2 Hi res screen start address
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
59 u0016 rmb 2 Hi res screen end address ???
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
60 u0017 rmb 4
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
61 u001C rmb 2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
62 u001E rmb 4
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
63 u0022 rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
64 u0023 rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
65 u0024 rmb 2 mnln remap value holder
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
66 u0026 rmb 2 scrn remap value holder
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
67 u0028 rmb 2 shdw remap value holder
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
68 u002A rmb 2 saves stack pointer of caller to sub659
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
69 u002C rmb 2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
70 u002E rmb 16
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
71 u003E rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
72 u003F rmb 2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
73 u0041 rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
74 u0042 rmb 1 MMU Block # of SIERRA's dsc.
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
75 u0043 rmb 2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
76 u0045 rmb 1 flag after color table sets
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
77 u0046 rmb 2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
78 u0048 rmb 2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
79 u004A rmb 5
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
80 u004F rmb 4
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
81 u0053 rmb 2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
82 u0055 rmb 10
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
83 u005F rmb 163
1081
4e78dd135898 Slight source cleanup
boisy
parents: 1080
diff changeset
84 u0102 rmb 112
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
85 mtf173 rmb 1 multitasking flag
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
86 scr174 rmb 1 screen number?
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
87 x01076 rmb 212
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
88 u0249 rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
89 u024A rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
90 u024B rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
91 u024C rmb 497
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
92 u043D rmb 245
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
93 u0532 rmb 16 vol_handle_table (pointer to file structures)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
94 u0542 rmb 15
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
95 u0551 rmb 2 given_pic_data (pointer)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
96 u0553 rmb 1 monitor type V26_MONITORTYPE
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
97 u0554 rmb 154
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
98 rmb 169
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
99 int5EE rmb 1 Signal Intercept routine from 452 - 4BD
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
100 rmb 106
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
101 sub659 rmb 1 Slot to hold subroutine for others uses at 4DA - 54F
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
102 rmb 116
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
103 u0xxx rmb 6281
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
104 size equ .
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
105
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
106 name fcs /sierra/
1080
3d0b20100199 Monitor type bug fixed, edition now 1
boisy
parents: 1079
diff changeset
107 fcb edition
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
108
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
109 start equ *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
110 L0014 lbra L007D branch to entry process params
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
111 L0017 lbra L00DB branch to clean up routines
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
112
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
113
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
114 * Multi-tasking flag (0=No multitask, 1=multitask)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
115 L001A fcb $00 we store a value here
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
116 * the "old self modifying code" trick
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
117
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
118
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
119 * Text strings think this was probably an Info thing
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
120 L001B fcc 'AGI (c) copyright 1988 SIERRA On-Line'
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
121 fcc 'CoCo3 version by Chris Iden'
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
122 fcb $00
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
123 Infosz equ *-L001B
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
124
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
125
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
126 * Useage text string
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
127 L005C fcc 'Usage: Sierra -Rgb -Multitasking'
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
128 fcb C$CR
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
129 Usgsz equ *-L005C
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
130
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
131
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
132 L007D tfr s,d save stack ptr / start of param ptr into d
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
133 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
134 subd #$04FF start of stack/end of data mem ptr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
135 std <u0000 store this value in user var
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
136 bsr L009C branch to input processer routine
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
137
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
138 L0086 lbsr L011A relay call to L0140
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
139
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
140 L0089 ldd <u0000 load the data pointer
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
141 beq L00DF if it is zero we have a problem
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
142 ldd >$FFA9 ??? MMU task 1 block 1 ???
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
143 std <u000A save the task 1 block one value
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
144 lda #$00 clear a to zero
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
145 sta <u0011 save that value
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
146 ldx <u0024 set up to jump to mnln and go for it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
147 jsr sub659 code at L04DA plays with mmu blocks
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
148 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
149
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
150 * Process any command line args
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
151 * See F$Fork description 8-15 for entry conditions
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
152
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
153 L009C lda ,x+ get next char after name string
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
154 cmpa #C$CR is it a CR?
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
155 beq L00DA yes exit from routine
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
156 cmpa #$2D is it a dash '-
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
157 bne L009C not a dash go look again
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
158
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
159 lda ,x+ was as dash get the next char
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
160 ora #$20 apply mask to lower case
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
161 cmpa #$72 is it a 'r ?
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
162 beq L00C2 yep go set up for RGB monitor
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
163 cmpa #$6D is it an 'm ?
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
164 beq L00D2 if so go store a flag and continue
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
165
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
166 * We've found something other than Mm or Rr after a dash
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
167 * write usage message and Exit program
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
168
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
169 lda #StdOut load path std out
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
170 leax >L005C,pcr load address of message
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
171 ldy #Usgsz $0021 load the size of the message
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
172 os9 I$WritLn write it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
173 clrb clear the error code (unneeded branch to L00DE)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
174 bra L00DF and branch to exit!
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
175
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
176 * found a "-r"
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
177 L00C2 pshs x save x-reg since set stat call uses it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
178 lda #StdOut $01 set the path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
179 ldb #SS.Montr code #$92 sets the monitor type
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
180 ldx #RGB monitor type code $0001
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
181 os9 I$SetStt set it up
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
182 puls x fetch our x back assumes call doesn't fail
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
183 bra L009C go process the rest of the parms
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
184
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
185 * found an "-m"
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
186 L00D2 lda #$01 we have found a -m and load a flag
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
187 sta >L001A,pcr and stow it in our code area (SELF MODIFYING)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
188 bra L009C check for next param
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
189
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
190 L00DA rts return
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
191
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
192
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
193 * This is just a relay call to L0336
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
194 L00DB lbsr L0133
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
195
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
196 L00DE clrb NOBODY USES ME ?
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
197 L00DF os9 F$Exit time to check out
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
198
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
199 * disassembler had a little problem here
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
200 L00E2 fdb $000C another prog internal var
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
201
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
202 * Are these all data bytes of some kind ???
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
203 * quirky assemblage of bytes
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
204 L00E4 fcb $02,$2E,$06,$09,$04,$20,$10,$1B
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
205 fcb $11,$3D,$17,$29,$33,$3F,$00,$08
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
206 fcb $14,$18,$20,$28,$22,$38,$07,$0B
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
207 fcb $16,$1F,$27,$2D,$37,$3F
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
208
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
209 * The disassembly gets confused here with text and the nulls
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
210 * according to the partial disassembly I recieved these hold
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
211 * Original MMU block image of second and third blocks of SIERRA
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
212 * MORE SELF MODIFYING CODE
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
213
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
214 L0102 fdb $0000 Orig MMU block image of 2nd blk of sierra
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
215 L0104 fdb $0000 Orig MMU block image of 3nd blk of sierra
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
216
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
217 * Name strings of other modules to load.
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
218
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
219 L0106 fcc 'Shdw'
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
220 fcb C$CR
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
221
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
222 L010B fcc 'Scrn'
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
223 fcb C$CR
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
224
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
225 L0110 fcc 'MnLn'
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
226 fcb C$CR
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
227
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
228
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
229 * Internal variables for self modifying code
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
230 L0115 fcb $00 Echo
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
231 L0116 fcb $00 EOF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
232 L0117 fcb $00 INTerupt
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
233 L0118 fcb $00 Quit
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
234 L0119 fcb $00 Monitor type Coco set to when Sierra ran
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
235
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
236
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
237 * L011A called by L0086
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
238 L011A lbsr L0140 Clears data area, sets up vars and saves montype
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
239
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
240 lbsr L01AF Change our process image to dupe block 0 to 1-2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
241 L0120 lbsr L01FA copies two subs to data area so others can use them
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
242
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
243 lbsr L0419 load intercept routine and open /VI and allocate Ram
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
244 bcs L0139 if errors occured close VIRQ device
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
245
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
246 lbsr L0229 NMLoads the three other modules and sets up vals
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
247 bcs L0136 problems then unload them
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
248
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
249 lbsr L026B go set up screens
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
250 bcs L0133 problems deallocate them
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
251 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
252
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
253 * clean up and shut down
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
254 L0133 lbsr L0336 go deallocate hi res screens
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
255 L0136 lbsr L0370 unloads the three other modules
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
256 L0139 lbsr L04BD Close VIRQ device
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
257 lbsr L0388 restore the MMU blocks
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
258 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
259
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
260 * at this point u0000 contains the value of s on entry minus $04FF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
261 * which should be the size of our initialized data
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
262 * so we don't over write it but clear the rest of the data area
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
263
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
264 L0140 ldx #$0002 Init data area from 2-end with 0's
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
265 ldd #$0000
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
266 L0146 std ,x++
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
267 cmpx <u0000 should have the value $04FF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
268 bcs L0146 appears this zeros out memory somewhere
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
269
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
270 * initialize some variables
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
271 lda >L001A,pcr multitasking flag from startup parms
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
272 sta mtf173 >$0173 store it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
273
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
274 ldd #$0776 why twice
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
275 std <u0053
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
276 std <u0055
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
277
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
278 lda #$5C
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
279 sta >$0101
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
280
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
281 lda #$17
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
282 sta >$01D7
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
283
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
284 lda #$0F
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
285 sta >$023E
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
286
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
287 ldd #$0000
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
288 std <u004F
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
289
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
290 * get current montype
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
291 * GetStat Function Code $92
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
292 * Allocates and maps high res screen
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
293 * into application address space
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
294 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
295 * a -> path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
296 * b -> function code $92 (SS.Montr)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
297 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
298 * exit:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
299 * x -> monitor type
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
300 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
301 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
302 * CC -> Carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
303 * b -> error code (if any)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
304 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
305 lda #StdOut $01 path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
306 ldb #SS.Montr monitor type code (not listed for getstat $92
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
307 os9 I$GetStt make the call
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
308 tfr x,d save in d appears he expects montype returned
1080
3d0b20100199 Monitor type bug fixed, edition now 1
boisy
parents: 1079
diff changeset
309 stb >L0119,pcr trim it to a byte and save it
3d0b20100199 Monitor type bug fixed, edition now 1
boisy
parents: 1079
diff changeset
310 andb #$01 mask out mono type only RGB or COMP
3d0b20100199 Monitor type bug fixed, edition now 1
boisy
parents: 1079
diff changeset
311 stb >$0553 save that value off
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
312
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
313 * set current montype
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
314 * SetStat Function Code $92
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
315 * Allocates and maps high res screen
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
316 * into application address space
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
317 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
318 * a -> path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
319 * b -> function code $92 (SS.Montr)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
320 * x -> momitor type
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
321 * 0 = color composite
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
322 * 1 = analog RGB
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
323 * 2 = monochrome composite
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
324 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
325 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
326 * CC -> Carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
327 * b -> error code (if any)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
328 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
329 ldx #RGB $0001 set type to RGB again as in L00C2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
330 lda #StdOut $01 set the path
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
331 ldb #SS.Montr Monitor type code $92
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
332 os9 I$SetStt make the call
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
333
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
334 * initialize more variables
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
335
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
336 lda #$32
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
337 sta >$0245
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
338
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
339 ldd #$6000 This is the start of high res screen memory
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
340 std <u0046
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
341
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
342 lda #$15
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
343 sta >$0247
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
344
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
345 lda #$FF Init 15 bytes at u0532 to $FF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
346 sta $05EE
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
347 ldb #$10
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
348 ldx #$0531
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
349
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
350 * Fill routine-one byte pattern
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
351 * Entry: A=Byte to fill with
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
352 * B=# bytes to fill
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
353 * X=Start address of fill
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
354
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
355 L01A3 sta ,x+
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
356 decb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
357 bne L01A3
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
358 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
359
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
360 * Fill routine-two byte pattern
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
361 * Entry: U=2-Byte pattern to fill with
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
362 * B=# bytes to fill
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
363 * X=Start address of fill
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
364 * NO BODY CALLS HERE ??
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
365 *L01A9 stu ,x++
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
366 * decb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
367 * bne L01A9
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
368 * rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
369
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
370 * Raw disassembly of followin code
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
371 *L01AF orcc #$50
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
372 * ldx #$0002
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
373 * stx <u0022
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
374 * lda >$FFAF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
375 * sta <u0008
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
376 * clr >$FFA9
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
377 * ldd >$2050
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
378 * anda #$1F
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
379 * addd #$2043
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
380 * std <u0043
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
381 * ldb >$2050
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
382 * andb #$E0
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
383 * lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
384 * lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
385 * lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
386 * lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
387 * lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
388 * ldx #$FFA0
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
389 * lda b,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
390 * sta <u0042
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
391 * sta >$FFA9
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
392 * ldx <u0043
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
393 * ldd -$01,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
394 * std >L0102,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
395 * ldd $01,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
396 * std >L0104,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
397 * ldd -$03,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
398 * std -$01,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
399 * std $01,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
400 * tfr b,a
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
401 * std >$FFA9
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
402 * std <u0002
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
403 * andcc #$AF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
404 * rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
405
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
406 **********************************************************
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
407 * COMMENTS FROM CODE RECIEVED
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
408 * Change our process map:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
409 * Blocks 1-2 become duplicates of block 0 (data area...
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
410 * changes actual MMU regs themselves &
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
411 * changes them in our process descriptor
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
412 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
413 * NOTE: SHOULD CHANGE SO IT MAPS IN BLOCK 0 IN AN UNUSED BLOCK 1ST
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
414 * TO GET PROCESS DESCRIPTOR DAT IMAGE FOR SIERRA.
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
415 * THEN, CAN BUMP BLOCKS AROUND WITH THE ACTUAL BLOCK #
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
416 * IN FULL 2 MB RANGE, INSTEAD OF JUST GIME 512K RANGE.
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
417
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
418 L01AF orcc #IntMasks Shut interrupts off
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
419 ldx #$0002 ???
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
420 stx <u0022
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
421
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
422 * As per above NOTE, should postpone this until we have DAT image
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
423 * available for Sierra process
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
424
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
425 lda >$FFAF Get MMU block # SIERRA is in
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
426 sta <u0008 Save it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
427 clr >$FFA9 Map system block 0 into $2000-$3FFF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
428 ldd >D.Proc+$2000 Get SIERRA's process dsc. ptr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
429 anda #$1F Keep non-MMU dependent address
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
430
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
431 * NOTE: OFFSET IS STUPID, SHOULD USE EVEN BYTE SO LDD'S BELOW
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
432 * CAN USE FASTER LDD ,X INSTEAD OF OFFSET,X
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
433
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
434 addd #$2000+P$DATImg+3 Set up ptr for what we want out of it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
435 std <u0043 Save it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
436 ldb >D.Proc+$2000 Get MSB of SIERRA's process dsc. ptr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
437 andb #$E0 Calculate which 8K block within
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
438 * system task it's in
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
439 lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
440 lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
441 lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
442 lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
443 lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
444
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
445 * NOTE: HAVE TO CHANGE THIS TO GET BLOCK #'S FROM SYSTEM DAT IMAGE,
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
446 * NOT RAW GIME REGS (TO WORK WITH >512K MACHINES)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
447 ldx #$FFA0 Point to base of System task DAT register set block 0 task 0
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
448 lda b,x Get block # that has process desc. for SIERRA
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
449 sta <u0042 Save it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
450 sta >$FFA9 Map in block with process dsc. to $2000-$3FFF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
451 ldx <u0043 Get offset to 2nd 8K block in DAT map for SIERRA
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
452 ldd -1,x Get MMU block # of current 2nd 8k block in SIERRA
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
453 std >L0102,pc Save it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
454 ldd 1,x Get MMU block # of current 3rd 8k block in SIERRA
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
455 std >L0104,pc Save it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
456 ldd -3,x Get data area block 3 from sierra (1st block)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
457 std -1,x Move 8k data area to 2nd block
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
458 std 1,x And to 3rd block
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
459 tfr b,a D=Raw MMU block # for both
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
460
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
461 * HAVE TO CHANGE TO ALLOW FOR DISTO DAT EXTENSION
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
462 std >$FFA9 Map data area block into both blocks 2&3
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
463 std <u0002 Save both block #'s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
464 andcc #^IntMasks Turn interrupts back on
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
465 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
466
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
467
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
468 * NOTE: 6809/6309 MOD: STUPID. DO LEAX, AND THEN PSHS X
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
469
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
470 * load first routine
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
471 L01FA leas -2,s Make 2 word buffer on stack
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
472 leax >L054F,pc Point to end of routine
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
473 stx ,s Save ptr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
474 leax >L04DA,pc Point to routine
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
475 * ldu #$0659 Point to place in data area to copy it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
476 ldu #sub659
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
477 L0209 lda ,x+ Copy routine
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
478 sta ,u+
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
479 cmpx ,s Done whole routine yet?
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
480 blo L0209 No, keep going
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
481
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
482 * get next routine interrupt intecept routine
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
483 leax >L04BD,pcr point to end of routine
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
484 stx ,s save pointer
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
485 leax >L0452,pcr point to routine
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
486 ldu #int5EE point to place in data area to copy it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
487 L021E lda ,x+ copy routine
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
488 sta ,u+
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
489 cmpx ,s Done whole routine yet?
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
490 blo L021E No, keep going
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
491 leas $02,s clean up stack
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
492 rts return
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
493
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
494 * Called from dispatch table at L0120
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
495 * The last op in the subroutine before this one
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
496 * was a puls a,b after a puhs x and a setsatt call for process+path to VIRQ
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
497
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
498 L0229 tfr b,a don't see what's going on here
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
499 incb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
500 std <u001C but we save off a bunch of values
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
501
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
502 addd #$0202
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
503 std <u001E
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
504
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
505 addd #$0202
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
506 sta <u005F
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
507 std <u000C
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
508 std <u000E
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
509
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
510 ldu #$001A
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
511 stu <u0028
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
512 leax >L0106,pcr shdw
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
513 lbsr L03D0 NMLoads named module
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
514 bcs L026A return on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
515
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
516 ldu #$0012
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
517 stu <u0026
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
518 leax >L010B,pcr scrn
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
519 lbsr L03D0 NMLoads named module
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
520 bcs L026A return on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
521
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
522 ldu #$000A
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
523 stu <u0024
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
524 leax >L0110,pcr mnln
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
525 lbsr L03D0 NMLoads named module
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
526
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
527 leau >$2000,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
528 stu <u002E
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
529 L026A rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
530
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
531 *****************************************************
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
532 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
533 * Set up screens
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
534 * SetStat Function Code $8B
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
535 * Allocates and maps high res screen
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
536 * into application address space
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
537 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
538 * a -> path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
539 * b -> function code $8B (SS.AScrn)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
540 * x -> screen type
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
541 * 0 = 640 x 192 x 2 colors (16K)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
542 * 1 = 320 x 192 x 4 colors (16K)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
543 * 2 = 160 x 192 x 16 colors (16K)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
544 * 3 = 640 x 192 x 4 colors (32K)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
545 * 4 = 320 x 192 x 16 colors (32K)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
546 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
547 * exit:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
548 * x -> application address space of screen
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
549 * y -> screen number (1-3)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
550 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
551 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
552 * CC -> Carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
553 * b -> error code (if any)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
554 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
555 * Call use VDGINT allocates high res graphics for use with screens
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
556 * updated by the process, does not clear the screens only allocates
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
557 * See OS-9 Technical Reference 8-142 for more details
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
558 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
559
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
560 L026B leas -$04,s mamke room om stack 2 words
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
561 lda #$01 Std out
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
562 ldb #SS.AScrn Allocate & map in hi-res screen (VDGINT)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
563 ldx #$0004 320x192x16 screen
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
564 os9 I$SetStt Map it in
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
565 bcs L02E6 Error, Restore stack & exit
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
566 tfr y,d Move screen # returned to D
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
567 * stb >$0174 Save screen #
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
568 stb scr174 Save screen #
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
569
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
570 * call with application address of screen in x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
571 * returns with values in u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
572 lbsr L03B6 twiddle addresses
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
573 stu <u0004 stow it two places
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
574 stu <u0014
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
575
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
576 leax >$4000,x end address ???
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
577 lbsr L03B6 twiddle addresses
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
578 stu <u0006 stow it in two places
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
579 stu <u0016
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
580
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
581 * TFM for 6309
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
582 ldu #$D800 Clear hi-res screen to color 0
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
583 ldx #$7800 Screen is from $6000 to $D800
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
584 ldd #$0000 (U will end up pointing to beginning of screen)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
585 L0299 std ,--u writes 0000 to screen address and decrements
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
586 leax -2,x decrement x loop counter
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
587 bne L0299 keep going till all of screen is cleared
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
588
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
589 * Display a screen allocated by SS.AScrn
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
590 * SetStat Function Code $8C
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
591 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
592 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
593 * a -> path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
594 * b -> function code $8C (SS.DScrn)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
595 * y -> screen numbe
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
596 * 0 = text screen (32 x 16)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
597 * 1-3 = high resolution screen
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
598 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
599 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
600 * CC -> Carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
601 * b -> error code (if any)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
602
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
603 clra Get screen # to display
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
604 ldb scr174
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
605 tfr d,y Y=screen # to display
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
606 lda #StdOut $01 Std out path
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
607 ldb #SS.DScrn Display 320x192x16 screen
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
608 os9 I$SetStt make the call
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
609 bcs L02E6
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
610
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
611 leax >L00E2,pc values initialized to is $000C
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
612 ldb >$0553 monitor type
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
613 lda #$10
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
614 mul
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
615 abx add b to x and stow at x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
616
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
617
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
618 * This loads up the control sequence to set the pallete 1B 31 PRN CTN
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
619 * PRN palette register 0 - 15, CTN color table 0 - 63
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
620 lda #$1B Escape code
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
621 sta ,s push on stack
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
622 lda #$31 Palette code
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
623 sta $01,s push on stack
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
624 clra make a zero palette reg value
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
625 sta $02,s push it `
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
626 ldy #$0004 sets up # of bytes to write
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
627 L02C8 ldb ,x+ get value computed above for color table and bump it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
628 stb $03,s push it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
629 pshs x save it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
630 lda #StdOut $01 Std Out path
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
631 leax $02,s start of data to write
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
632 os9 I$Write write it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
633 bcs L02E6 error during write clean up stack and leave
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
634 puls x retrieve our x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
635 inc $02,s this is our palette register value
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
636 lda $02,s we bumped it by one
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
637 cmpa #$10 we loop 15 times to set them all
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
638 bcs L02C8 loop
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
639
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
640 clr <u0045 clear a flag in memory
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
641 lbsr L02E9 go disable keyboard interrupts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
642 L02E6 leas $04,s clean up stack
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
643 rts return
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
644
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
645
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
646 * Raw disassembly of following section
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
647 *L02E9 leas <-$20,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
648 * lda #$00
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
649 * ldb #$00
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
650 * leax ,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
651 * os9 I$GetStt
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
652 * bcs L0332
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
653 * lda >L0115,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
654 * ldb $04,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
655 * sta $04,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
656 * stb >L0115,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
657 * lda >L0116,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
658 * ldb $0C,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
659 * sta $0C,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
660 * stb >L0116,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
661 * lda >L0117,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
662 * ldb <$10,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
663 * sta <$10,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
664 * stb >L0117,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
665 * lda >L0118,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
666 * ldb <$11,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
667 * sta <$11,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
668 * stb >L0118,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
669 * lda #$00
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
670 * ldb #$00
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
671 * os9 I$SetStt
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
672 *L0332 leas <$20,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
673 * rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
674
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
675 * Kills the echo, eof, int and quit signals
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
676 * get current options packet
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
677 * GetStat Function Code $00
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
678 * Reads the options section of the path descriptor and
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
679 * copies it into the 32 byte area pointed to by reg X`
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
680 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
681 * a -> path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
682 * b -> function code $00 (SS.OPT)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
683 * x -> address to recieve status packet
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
684 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
685 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
686 * CC -> Carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
687 * b -> error code (if any)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
688 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
689
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
690 L02E9 leas <-$20,s Make temp buffer to hold PD.OPT data
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
691 lda #StdIn $00 Get 32 byte PD.OPT from Std In
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
692 ldb #SS.OPT $00
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
693 leax ,s point to our temp buffer
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
694 os9 I$GetStt make the call
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
695 bcs L0332 error goto exit sub
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
696
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
697 * NOTE: make sure following lines assemble into 5 bit, not 8 bit
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
698 * These appear to be loading the echo EOF, INT and QUIT with
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
699 * null values and saving the original ones back to vars
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
700 * since L0115 - L0118 were initialized with $00
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
701
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
702 lda >L0115,pc
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
703 ldb PD.EKO-PD.OPT,x Get echo option
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
704 sta PD.EKO-PD.OPT,x change echo option no echo
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
705 stb >L0115,pc Save original echo option
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
706
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
707 lda >L0116,pc
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
708 ldb PD.EOF-PD.OPT,x Change EOF char
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
709 sta PD.EOF-PD.OPT,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
710 stb >L0116,pc
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
711
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
712 lda >L0117,pc
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
713 ldb <PD.INT-PD.OPT,x Change INTerrupt char (normally CTRL-C)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
714 sta <PD.INT-PD.OPT,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
715 stb >L0117,pc
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
716
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
717 lda >L0118,pc
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
718 ldb <PD.QUT-PD.OPT,x Change QUIT char (normally CTRL-E)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
719 sta <PD.QUT-PD.OPT,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
720 stb >L0118,pc
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
721
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
722 * set current options packet
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
723 * SetStat Function Code $00
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
724 * Writes the options section of the path descriptor
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
725 * from the 32 byte area pointed to by reg X`
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
726 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
727 * a -> path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
728 * b -> function code $00 (SS.OPT)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
729 * x -> address holding the status packet
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
730 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
731 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
732 * CC -> Carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
733 * b -> error code (if any)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
734 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
735
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
736 * x is still pointing to our temp buff
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
737 lda #StdIn $00 Set VDG screen to new options
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
738 ldb #SS.OPT $00
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
739 os9 I$SetStt set them to be our new values
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
740
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
741 L0332 leas <$20,s Eat temp stack & return
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
742 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
743
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
744 * raw disassembly
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
745 *L0336 leas -$02,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
746 * tst >$0174
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
747 * beq L036D
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
748 * lbsr L02E9
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
749 * bcs L036D
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
750 ** lda #$1B
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
751 * sta ,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
752 * lda #$30
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
753 * sta $01,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
754 * ldy #$0002
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
755 * lda #$01
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
756 * leax ,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
757 * os9 I$Write
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
758 * bcs L036D
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
759 * ldb #$8C
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
760 * ldy #$0000
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
761 * os9 I$SetStt
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
762 * clra
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
763 * ldb >$0174
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
764 * tfr d,y
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
765 * lda #$01
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
766 * ldb #$8D
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
767 * os9 I$SetStt
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
768 *L036D leas $02,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
769 * rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
770
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
771
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
772 * Return the screen to default text sreen and its values
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
773 * deallocate and free memory of high res screen created
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
774
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
775 L0336 leas -2,s Make temp buffer to hold write data
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
776 * tst >$0174 Any hi-res screen # allocated?
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
777 tst scr174 Any hi-res screen # allocated?
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
778 beq L036D No, restore stack & return
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
779 lbsr L02E9 go change the echo,eof,int and quit settings
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
780 bcs L036D had an error restore stack and return
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
781 lda #$1B Setup DefColr sequence in temp buffer
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
782 sta ,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
783 lda #$30 Sets palettes back to default color
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
784 sta 1,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
785 ldy #$0002 number of bytes to write
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
786 lda #StdOut path to write to $01
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
787 leax ,s point x a buffer
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
788 os9 I$Write write
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
789 bcs L036D we have an error clean stack and leave
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
790
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
791 * Display a screen allocated by SS.AScrn
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
792 * SetStat Function Code $8C
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
793 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
794 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
795 * a -> path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
796 * b -> function code $8C (SS.DScrn)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
797 * y -> screen numbe
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
798 * 0 = text screen (32 x 16)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
799 * 1-3 = high resolution screen
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
800 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
801 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
802 * CC -> Carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
803 * b -> error code (if any)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
804
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
805 * a is still set to stdout from above
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
806 ldb #SS.DScrn Display screen function code
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
807 ldy #$0000 Display screen #0 (lo-res or 32x16 text)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
808 os9 I$SetStt make the call
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
809
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
810 * Frees the memory of a screen allocated by SS.AScrn
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
811 * SetStat Function Code $8C
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
812 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
813 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
814 * a -> path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
815 * b -> function code $8D (SS.FScrn)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
816 * y -> screen number 1-3 = high resolution screen
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
817 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
818 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
819 * CC -> Carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
820 * b -> error code (if any)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
821
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
822 clra clear high byte
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
823 ldb scr174 Get hi-res screen # again
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
824 tfr d,y move it to Y=screen #
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
825 lda #StdOut set the path $01
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
826 ldb #SS.FSCrn Return screen memory to system
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
827 os9 I$SetStt amke the call
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
828
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
829 L036D leas 2,s Eat stack & return
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
830 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
831
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
832
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
833
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
834 * Unload the other modules
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
835 L0370 leax >L0106,pcr shdw name string
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
836 lda #Prgrm+Objct #$11 module type
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
837 lbsr L040B unload it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
838 leax >L010B,pcr scrn name string
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
839 lbsr L040B unload it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
840 leax >L0110,pcr mnln name string
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
841 lbsr L040B unload it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
842 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
843
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
844 *L0388 orcc #$50
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
845 * lda <u0042
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
846 * sta >$FFA9
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
847 * ldx <u0043
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
848 * ldd >L0104,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
849 * std $01,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
850 * stb >$FFAA
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
851 * ldd >L0102,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
852 * std -$01,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
853 * stb >$FFA9
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
854 * andcc #$AF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
855 * clra
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
856 * ldb >L0119,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
857 * andb #$03
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
858 * tfr d,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
859 * lda #$01
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
860 * ldb #$92
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
861 * os9 I$SetStt
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
862 * rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
863 **
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
864 *L03B6 tfr x,d
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
865 * exg a,b
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
866 * lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
867 * lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
868 * lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
869 * lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
870 * lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
871 * pshs b
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
872 * ldu #$FFA8
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
873 * lda b,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
874 * incb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
875 * andb #$07
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
876 * ldb b,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
877 * tfr d,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
878 * puls a
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
879 * rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
880
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
881
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
882 * Restore original MMU block numbers
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
883 L0388 orcc #IntMasks Shut off interrupts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
884 lda <u0042 get MMU Block #
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
885 sta >$FFA9 Restore original block 0 onto MMU
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
886 ldx <u0043
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
887 ldd >L0104,pc Origanl 3rd block of MMU
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
888 std 1,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
889 stb >$FFAA Restore original block 1 onto MMU
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
890 ldd >L0102,pc Original 2nd block of MMU
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
891 std -1,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
892 stb >$FFA9 Restore block 0 again
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
893 andcc #^IntMasks Turn interrupts back on
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
894
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
895 * return monitor type to original value
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
896 clra
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
897 ldb >L0119,pc Get original monitor type
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
898 andb #$03 Force to only legit values
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
899 tfr d,x Move to proper register
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
900 lda #StdOut set path $01
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
901 ldb #SS.Montr Restore original monitor type
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
902 os9 I$SetStt make the call
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
903 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
904
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
905 * twiddles address
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
906 * called with value to be twiddled in X
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
907 * returns block # in a
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
908 * ????? in u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
909 L03B6 tfr x,d Move address to D
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
910 exg a,b Swap MSB/LSB
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
911 lsrb Divide MSB by 32 (calculate 8k block # in proc map)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
912 lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
913 lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
914 lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
915 lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
916 pshs b Save block # in process map
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
917 ldu #$FFA8 Point to start of user DAT image
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
918 lda b,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
919 incb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
920 andb #$07
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
921 ldb b,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
922 tfr d,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
923 puls a
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
924 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
925
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
926
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
927
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
928 *************************************************************
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
929 * Called from within sub at L0229
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
930 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
931 * x -> is loaded with the address of the name string to load
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
932 * u -> contains some arbitrary value
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
933 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
934
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
935 L03D0 leas -$08,s Make a little scratch on the stack
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
936 stu ,s pointer to our buffer
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
937
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
938 * Loads one or more modules from a file but does not map the module
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
939 * into user's address space F$NMLoad
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
940 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
941 * a -> type/language byte
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
942 * x -> address of the path list
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
943 * with out path list default path is current execution dir
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
944 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
945 * exit:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
946 * a -> type/language
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
947 * b -> module revision
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
948 * x -> address of the last byte in the pathlist + 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
949 * y -> storageb requirements of the module
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
950 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
951 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
952 * b -> error code if any
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
953 * cc -> carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
954
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
955 stx $02,s pointer module name
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
956 lda #Prgrm+Objct $11 module type
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
957 os9 F$NMLoad Load it but don't map it in
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
958 bcs L0408 exit on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
959
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
960 * Links to a memory module that has the specified name, language and type
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
961 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
962 * a -> type/language byte
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
963 * x -> address of the module name
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
964 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
965 * exit:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
966 * a -> type/language
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
967 * b -> attributes/module revision
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
968 * x -> address of the last byte in the modulename + 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
969 * y -> module entry point absolute address
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
970 * u -> module header abosolute address
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
971 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
972 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
973 * cc -> set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
974
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
975 ldx $02,s get our name string again
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
976 os9 F$Link link it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
977 bcs L0408 exit on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
978 stu $06,s store module header address
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
979 tfr u,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
980 L03E8 stx $04,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
981 lbsr L03B6 Go twiddle with address`
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
982 ldx ,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
983 leax a,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
984 exg d,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
985 sta ,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
986 exg d,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
987 cmpa #$06
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
988 beq L0403
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
989 ldx $04,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
990 leax >$2000,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
991 bra L03E8
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
992
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
993 L0403 ldu $06,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
994 os9 F$UnLink
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
995 L0408 leas $08,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
996 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
997
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
998 L040B os9 F$UnLoad Unlink a module by name
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
999 bcc L040B
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1000 clrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1001 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1002
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1003 L0412 fcc '/VI'
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1004 L0415 fcb C$CR
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1005 L0416 fdb $0000 address of the device table entry
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1006 L0418 fcb $00 path number to device
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1007
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1008 **************************************************************
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1009 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1010 * subroutine entry is L0419
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1011 * sets up Sig Intercept
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1012 * verifies /VI device is loaded links to it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1013 * and allocates ram for it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1014 * called from dispatch table around L0120
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1015
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1016
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1017 * Set signal intercept trap
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1018 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1019 * x -> address of intercept routine
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1020 * u -> starting adress of routines memory area
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1021 * exit:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1022 * Signals sent to the process cause the intercept to be
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1023 * called instead of the process being killed
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1024
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1025 L0419 ldu #$0000 start of Sierra memory area
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1026 ldx #int5EE Intercept rourtine copied to mem area
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1027 os9 F$Icpt install the trap
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1028
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1029 * Attach to the vrt memory descriptor
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1030 * Attaches and verifies loaded the VI descriptor
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1031 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1032 * a -> access mode
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1033 * 0 = use any special device capabilities
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1034 * 1 = read only
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1035 * 2 = write only
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1036 * 3 = update (read and write)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1037 * x -> address of device name string
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1038 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1039 * exit:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1040 * x -> updated past device name
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1041 * u -> address of device table entry
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1042 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1043 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1044 * b -> error code (if any)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1045 * cc -> carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1046
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1047 lda #$01 attach for read
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1048 leax >L0412+1,pcr skip the slash Load VI only
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1049 os9 I$Attach make the call
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1050 bcs L0451 didn't work exit
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1051 stu >L0416,pcr did work save address
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1052
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1053 * Open a path to the device /VI
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1054 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1055 * a -> access mode (D S PE PW PR E W R)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1056 * x -> address of the path list
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1057 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1058 * exit:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1059 * a -> path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1060 * x -> address of the last byte if the pathlist + 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1061 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1062 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1063 * b -> error code(if any)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1064 * cc -> carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1065 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1066 * a still contains $01 read
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1067 leax >L0412,pcr load with device name including /
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1068 os9 I$Open make the call
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1069 bcs L0451 didn't work exit
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1070 sta >L0418,pcr did work save path #
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1071
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1072 * Allocate process+path RAM blocks
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1073
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1074 ldb #SS.ARAM $CA function code for VIRQ
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1075 ldx #$000D
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1076 os9 I$SetStt make the call
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1077 bcs L0451
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1078 pshs x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1080 * Set process+path VIRQ KQ3
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1081 ldb #SS.KSet $C8 function code for VIRQ
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1082 os9 I$SetStt
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1083 puls b,a
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1084 L0451 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1085
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1086 * Signal Intercept processing gets copied to int5EE mem slot
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1087 L0452 cmpb #$80 b gets the signal code if not $80 ignore
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1088 bne L0464 $80 is user defined
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1089 tfr u,d
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1090 tfr a,dp
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1091 dec <u004A
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1092 bne L0464
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1093 bsr L0465
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1094 lda #$03
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1095 sta <u004A
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1096 L0464 rti
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1097
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1098 L0465 inc >u024C,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1099 bne L047B
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1100 inc >u024B,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1101 bne L047B
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1102 inc >u024A,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1103 bne L047B
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1104 inc >u0249,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1105 L047B tst >u0102,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1106 bne L04BC
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1107 inc <u003F
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1108 bne L0487
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1109 inc <u003E
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1110 L0487 ldd <u0048
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1111 addd #$0001
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1112 std <u0048
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1113 cmpd #$0014
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1114 bcs L04BC
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1115 subd #$0014
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1116 std <u0048
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1117 ldd #$003C
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1118 leax >u043D,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1119 inc ,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1120 cmpb ,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1121 bhi L04BC
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1122 sta ,x+
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1123 inc ,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1124 cmpb ,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1125 bhi L04BC
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1126 sta ,x+
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1127 inc ,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1128 ldb #$18
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1129 cmpb ,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1130 bhi L04BC
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1131 sta ,x+
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1132 inc ,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1133 L04BC rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1134
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1135 * deallocates the VIRQ device
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1136 L04BD lda >L0418,pcr load path number to /VI device
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1137 beq L04D0 no path open check for device table addr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1138 ldb #SS.KClr $C9 Clear KQ3 VIRQ
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1139 os9 I$SetStt make the call
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1140 ldb #SS.DRAM $CB deallocate the ram
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1141 os9 I$SetStt make the call
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1142 os9 I$Close close the path to /VI
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1143 L04D0 ldu >L0416,pcr load device table address for VI
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1144 beq L04D9 don't have one leave now
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1145 os9 I$Detach else detach it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1146 L04D9 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1147
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1148 * Twiddles with MMU blocks for us
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1149 * This sub gets copied into $0659 and executed there from this and
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1150 * the other modules this one loads (sub659)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1151 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1152 * s and x loaded by calling routine
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1153
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1154 L04DA ldd ,s++ load d with current stack pointer and bump it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1155 * from mnln we come in with $4040
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1156 std <u002A save the calling stack pointer in u002A
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1157 orcc #IntMasks mask the interrupts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1158 lda <u0042
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1159 sta ,x x is loaded with value from u0028 in mnln
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1160 sta >$FFA9 task 1 block 2 x2000 - x3FFF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1161 ldu <u0043
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1162 lda $06,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1163 sta u000C,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1164 sta >$FFAF task 1 block 8 xE000 - xFFFF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1165 lda $05,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1166 sta u000A,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1167 sta >$FFAE task 1 block 7 xC000 - xDFFF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1168 lda $04,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1169 sta u0008,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1170 sta >$FFAD task 1 block 6 xA000 - xBFFF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1171 lda $03,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1172 sta u0006,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1173 sta >$FFAC task 1 block 5 x8000 - x9FFF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1174 lda $02,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1175 sta u0004,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1176 sta >$FFAB task 1 block 4 x6000 - x7FFF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1177 andcc #^IntMasks unmask interrupts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1178
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1179 lda $07,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1180 ldu <u002E
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1181 adda u000A,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1182 jsr a,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1183
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1184 orcc #IntMasks
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1185 lda <u0042
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1186 sta >$FFA9
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1187 ldu <u0043
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1188 lda <u0010
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1189 sta u000C,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1190 sta >$FFAF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1191 lda <u000F
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1192 sta u000A,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1193 sta >$FFAE
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1194 lda <u000E
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1195 sta u0008,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1196 sta >$FFAD
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1197 lda <u000D
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1198 sta u0006,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1199 sta >$FFAC
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1200 lda <u000B
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1201 sta u0002,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1202 sta >$FFAA
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1203 lda <u000A
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1204 sta ,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1205 sta >$FFA9
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1206 andcc #^IntMasks
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1207
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1208 jmp [>$002A]
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1209
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1210 L054F fcb $00,$00,$00,$00,$00,$00,$00,$00 ........
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1211 L0557 fcb $73,$69,$65,$72,$72,$61,$00 sierra.
1081
4e78dd135898 Slight source cleanup
boisy
parents: 1080
diff changeset
1212
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1213 emod
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1214 eom equ *
1081
4e78dd135898 Slight source cleanup
boisy
parents: 1080
diff changeset
1215 end
4e78dd135898 Slight source cleanup
boisy
parents: 1080
diff changeset
1216