annotate 3rdparty/packages/sierra/objs_lsl/sierra.asm @ 2523:b8dc2c8bfa03

Slight mods to comments
author boisy
date Fri, 09 Apr 2010 13:24:51 +0000
parents 1712fac2daac
children 67f9b769969f
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 ********************************************************************
2523
b8dc2c8bfa03 Slight mods to comments
boisy
parents: 2140
diff changeset
2 * sierra - Sierra 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 *
2523
b8dc2c8bfa03 Slight mods to comments
boisy
parents: 2140
diff changeset
6 * Notes: This module is for the 2.072 version of the interpreter.
b8dc2c8bfa03 Slight mods to comments
boisy
parents: 2140
diff changeset
7 *
1357
0de024ea86cd Added new style comments
boisy
parents: 1081
diff changeset
8 * Edt/Rev YYYY/MM/DD Modified by
0de024ea86cd Added new style comments
boisy
parents: 1081
diff changeset
9 * Comment
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
10 * ------------------------------------------------------------------
1357
0de024ea86cd Added new style comments
boisy
parents: 1081
diff changeset
11 * 0 2003/01/31 Paul W. Zibaila
0de024ea86cd Added new style comments
boisy
parents: 1081
diff changeset
12 * Disassembly of original distribution and merged in comments from
0de024ea86cd Added new style comments
boisy
parents: 1081
diff changeset
13 * an earlier disasm dated 1992.
0de024ea86cd Added new style comments
boisy
parents: 1081
diff changeset
14 *
0de024ea86cd Added new style comments
boisy
parents: 1081
diff changeset
15 * 1 2003/03/10 Boisy G. Pitre
0de024ea86cd Added new style comments
boisy
parents: 1081
diff changeset
16 * Monitor type bug now fixed.
777
3a8f068cc438 Import of sources
boisy
parents:
diff changeset
17
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
18 *Monitor defs
2140
1712fac2daac Updated
boisy
parents: 1357
diff changeset
19 #COMP equ 0
1712fac2daac Updated
boisy
parents: 1357
diff changeset
20 #RGB equ 1
1712fac2daac Updated
boisy
parents: 1357
diff changeset
21 #MONO equ 2
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
22
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
23
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
24 * I/O path definitions
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
25 StdIn equ 0
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
26 StdOut equ 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
27 StdErr equ 2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
28
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
29 nam sierra
2523
b8dc2c8bfa03 Slight mods to comments
boisy
parents: 2140
diff changeset
30 ttl Sierra setup module
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
31
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
32 ifp1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
33 use defsfile
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
34 use scfdefs
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
35 endc
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
36
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
37 tylg set Prgrm+Objct
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
38 atrv set ReEnt+rev
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
39 rev set $01
1080
3d0b20100199 Monitor type bug fixed, edition now 1
boisy
parents: 1079
diff changeset
40 edition set 1
1079
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 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
43
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
44 org 0
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
45 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
46 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
47 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
48 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
49 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
50 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
51 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
52 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
53 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
54 u000C rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
55 u000D rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
56 u000E rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
57 u000F rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
58 u0010 rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
59 u0011 rmb 3
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
60 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
61 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
62 u0017 rmb 4
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
63 u001C rmb 2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
64 u001E rmb 4
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
65 u0022 rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
66 u0023 rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
67 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
68 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
69 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
70 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
71 u002C rmb 2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
72 u002E rmb 16
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
73 u003E rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
74 u003F rmb 2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
75 u0041 rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
76 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
77 u0043 rmb 2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
78 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
79 u0046 rmb 2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
80 u0048 rmb 2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
81 u004A rmb 5
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
82 u004F rmb 4
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
83 u0053 rmb 2
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
84 u0055 rmb 10
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
85 u005F rmb 163
1081
4e78dd135898 Slight source cleanup
boisy
parents: 1080
diff changeset
86 u0102 rmb 112
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
87 mtf173 rmb 1 multitasking flag
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
88 scr174 rmb 1 screen number?
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
89 x01076 rmb 212
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
90 u0249 rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
91 u024A rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
92 u024B rmb 1
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
93 u024C rmb 497
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
94 u043D rmb 245
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
95 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
96 u0542 rmb 15
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
97 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
98 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
99 u0554 rmb 154
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
100 rmb 169
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
101 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
102 rmb 106
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
103 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
104 rmb 116
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
105 u0xxx rmb 6281
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
106 size equ .
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
107
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
108 name fcs /sierra/
1080
3d0b20100199 Monitor type bug fixed, edition now 1
boisy
parents: 1079
diff changeset
109 fcb edition
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
110
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
111 start equ *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
112 L0014 lbra L007D branch to entry process params
2523
b8dc2c8bfa03 Slight mods to comments
boisy
parents: 2140
diff changeset
113 L0017 lbra L00DB agi_exit() branch to clean up routines
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
114
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
115
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
116 * 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
117 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
118 * 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
119
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
120
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
121 * 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
122 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
123 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
124 fcb $00
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
125 Infosz equ *-L001B
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
126
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
127
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
128 * Useage text string
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
129 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
130 fcb C$CR
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
131 Usgsz equ *-L005C
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
132
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 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
135 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
136 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
137 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
138 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
139
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
140 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
141
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
142 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
143 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
144 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
145 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
146 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
147 sta <u0011 save that value
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
148 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
149 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
150 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
151
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
152 * Process any command line args
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
153 * 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
154
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
155 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
156 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
157 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
158 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
159 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
160
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
161 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
162 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
163 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
164 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
165 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
166 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
167
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
168 * 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
169 * 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
170
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
171 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
172 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
173 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
174 os9 I$WritLn write it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
175 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
176 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
177
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
178 * found a "-r"
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
179 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
180 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
181 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
182 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
183 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
184 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
185 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
186
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
187 * found an "-m"
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
188 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
189 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
190 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
191
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
192 L00DA rts return
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
193
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
194
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
195 * This is just a relay call to L0336
2523
b8dc2c8bfa03 Slight mods to comments
boisy
parents: 2140
diff changeset
196 agi_exit
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
197 L00DB lbsr L0133
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 L00DE clrb NOBODY USES ME ?
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
200 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
201
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
202 * 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
203 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
204
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
205 * 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
206 * quirky assemblage of bytes
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
207 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
208 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
209 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
210 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
211
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
212 * 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
213 * 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
214 * 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
215 * MORE SELF MODIFYING CODE
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 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
218 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
219
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
220 * 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
221
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
222 L0106 fcc 'Shdw'
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 L010B fcc 'Scrn'
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 L0110 fcc 'MnLn'
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
229 fcb C$CR
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
230
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
231
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
232 * 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
233 L0115 fcb $00 Echo
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
234 L0116 fcb $00 EOF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
235 L0117 fcb $00 INTerupt
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
236 L0118 fcb $00 Quit
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
237 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
238
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 * L011A called by L0086
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
241 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
242
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
243 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
244 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
245
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
246 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
247 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
248
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
249 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
250 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
251
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
252 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
253 bcs L0133 problems deallocate them
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
254 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
255
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
256 * clean up and shut down
2523
b8dc2c8bfa03 Slight mods to comments
boisy
parents: 2140
diff changeset
257 agi_shutdown
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
258 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
259 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
260 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
261 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
262 rts
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 * 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
265 * 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
266 * 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
267
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
268 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
269 ldd #$0000
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
270 L0146 std ,x++
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
271 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
272 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
273
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
274 * initialize some variables
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
275 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
276 sta mtf173 >$0173 store it
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 ldd #$0776 why twice
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
279 std <u0053
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
280 std <u0055
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
281
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
282 lda #$5C
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
283 sta >$0101
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
284
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
285 lda #$17
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
286 sta >$01D7
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
287
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
288 lda #$0F
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
289 sta >$023E
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
290
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
291 ldd #$0000
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
292 std <u004F
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
293
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
294 * get current montype
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
295 * GetStat Function Code $92
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
296 * 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
297 * into application address space
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
298 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
299 * a -> path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
300 * 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
301 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
302 * exit:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
303 * x -> monitor type
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 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
306 * CC -> Carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
307 * b -> error code (if any)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
308 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
309 lda #StdOut $01 path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
310 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
311 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
312 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
313 stb >L0119,pcr trim it to a byte and save it
3d0b20100199 Monitor type bug fixed, edition now 1
boisy
parents: 1079
diff changeset
314 andb #$01 mask out mono type only RGB or COMP
2523
b8dc2c8bfa03 Slight mods to comments
boisy
parents: 2140
diff changeset
315 stb >$0553 save that value off as display_type
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
316
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
317 * set current montype
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
318 * SetStat Function Code $92
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
319 * 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
320 * into application address space
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
321 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
322 * a -> path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
323 * 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
324 * x -> momitor type
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
325 * 0 = color composite
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
326 * 1 = analog RGB
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
327 * 2 = monochrome composite
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 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
330 * CC -> Carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
331 * b -> error code (if any)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
332 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
333 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
334 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
335 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
336 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
337
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
338 * initialize more variables
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
339
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
340 lda #$32
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
341 sta >$0245
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
342
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
343 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
344 std <u0046
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
345
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
346 lda #$15
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
347 sta >$0247
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
348
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
349 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
350 sta $05EE
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
351 ldb #$10
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
352 ldx #$0531
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
353
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
354 * Fill routine-one byte pattern
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
355 * 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
356 * B=# bytes to fill
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
357 * X=Start address of fill
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
358
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
359 L01A3 sta ,x+
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
360 decb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
361 bne L01A3
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
362 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
363
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
364 * Fill routine-two byte pattern
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
365 * 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
366 * B=# bytes to fill
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
367 * X=Start address of fill
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
368 * NO BODY CALLS HERE ??
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
369 *L01A9 stu ,x++
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
370 * decb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
371 * bne L01A9
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
372 * rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
373
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
374 * Raw disassembly of followin code
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
375 *L01AF orcc #$50
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
376 * ldx #$0002
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
377 * stx <u0022
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
378 * lda >$FFAF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
379 * sta <u0008
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
380 * clr >$FFA9
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
381 * ldd >$2050
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
382 * anda #$1F
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
383 * addd #$2043
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
384 * std <u0043
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
385 * ldb >$2050
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
386 * andb #$E0
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 * lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
389 * lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
390 * lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
391 * lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
392 * ldx #$FFA0
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
393 * lda b,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
394 * sta <u0042
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
395 * sta >$FFA9
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
396 * ldx <u0043
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
397 * ldd -$01,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
398 * std >L0102,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
399 * ldd $01,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
400 * std >L0104,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
401 * ldd -$03,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
402 * std -$01,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
403 * std $01,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
404 * tfr b,a
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
405 * std >$FFA9
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
406 * std <u0002
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
407 * andcc #$AF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
408 * rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
409
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
410 **********************************************************
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
411 * COMMENTS FROM CODE RECIEVED
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
412 * Change our process map:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
413 * 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
414 * changes actual MMU regs themselves &
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
415 * 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
416 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
417 * 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
418 * 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
419 * 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
420 * 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
421
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
422 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
423 ldx #$0002 ???
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
424 stx <u0022
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
425
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
426 * 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
427 * available for Sierra process
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
428
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
429 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
430 sta <u0008 Save it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
431 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
432 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
433 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
434
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
435 * 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
436 * 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
437
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
438 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
439 std <u0043 Save it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
440 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
441 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
442 * system task it's in
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 lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
445 lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
446 lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
447 lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
448
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
449 * 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
450 * 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
451 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
452 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
453 sta <u0042 Save it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
454 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
455 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
456 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
457 std >L0102,pc Save it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
458 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
459 std >L0104,pc Save it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
460 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
461 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
462 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
463 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
464
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
465 * 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
466 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
467 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
468 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
469 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
470
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
471
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
472 * 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
473
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
474 * load first routine
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
475 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
476 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
477 stx ,s Save ptr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
478 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
479 * 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
480 ldu #sub659
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
481 L0209 lda ,x+ Copy routine
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
482 sta ,u+
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
483 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
484 blo L0209 No, keep going
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
485
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
486 * 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
487 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
488 stx ,s save pointer
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
489 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
490 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
491 L021E lda ,x+ copy routine
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
492 sta ,u+
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
493 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
494 blo L021E No, keep going
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
495 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
496 rts return
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 * 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
499 * 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
500 * 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
501
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
502 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
503 incb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
504 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
505
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
506 addd #$0202
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
507 std <u001E
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
508
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
509 addd #$0202
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
510 sta <u005F
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
511 std <u000C
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
512 std <u000E
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
513
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
514 ldu #$001A
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
515 stu <u0028
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
516 leax >L0106,pcr shdw
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
517 lbsr L03D0 NMLoads named module
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
518 bcs L026A return on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
519
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
520 ldu #$0012
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
521 stu <u0026
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
522 leax >L010B,pcr scrn
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
523 lbsr L03D0 NMLoads named module
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
524 bcs L026A return on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
525
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
526 ldu #$000A
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
527 stu <u0024
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
528 leax >L0110,pcr mnln
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
529 lbsr L03D0 NMLoads named module
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 leau >$2000,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
532 stu <u002E
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
533 L026A rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
534
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
535 *****************************************************
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
536 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
537 * Set up screens
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
538 * SetStat Function Code $8B
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
539 * 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
540 * into application address space
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
541 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
542 * a -> path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
543 * 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
544 * x -> screen type
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
545 * 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
546 * 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
547 * 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
548 * 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
549 * 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
550 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
551 * exit:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
552 * 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
553 * y -> screen number (1-3)
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 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
556 * CC -> Carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
557 * b -> error code (if any)
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 * 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
560 * 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
561 * 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
562 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
563
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
564 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
565 lda #$01 Std out
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
566 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
567 ldx #$0004 320x192x16 screen
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
568 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
569 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
570 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
571 * stb >$0174 Save screen #
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
572 stb scr174 Save screen #
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
573
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
574 * 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
575 * returns with values in u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
576 lbsr L03B6 twiddle addresses
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
577 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
578 stu <u0014
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
579
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
580 leax >$4000,x end address ???
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
581 lbsr L03B6 twiddle addresses
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
582 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
583 stu <u0016
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
584
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
585 * TFM for 6309
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
586 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
587 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
588 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
589 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
590 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
591 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
592
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
593 * 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
594 * SetStat Function Code $8C
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
595 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
596 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
597 * a -> path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
598 * 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
599 * y -> screen numbe
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
600 * 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
601 * 1-3 = high resolution screen
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 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
604 * CC -> Carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
605 * b -> error code (if any)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
606
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
607 clra Get screen # to display
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
608 ldb scr174
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
609 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
610 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
611 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
612 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
613 bcs L02E6
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
614
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
615 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
616 ldb >$0553 monitor type
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
617 lda #$10
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
618 mul
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
619 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
620
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
621
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
622 * 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
623 * 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
624 lda #$1B Escape code
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
625 sta ,s push on stack
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
626 lda #$31 Palette code
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
627 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
628 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
629 sta $02,s push it `
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
630 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
631 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
632 stb $03,s push it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
633 pshs x save it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
634 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
635 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
636 os9 I$Write write it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
637 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
638 puls x retrieve our x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
639 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
640 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
641 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
642 bcs L02C8 loop
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
643
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
644 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
645 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
646 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
647 rts return
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
648
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
649
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
650 * Raw disassembly of following section
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
651 *L02E9 leas <-$20,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
652 * lda #$00
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
653 * ldb #$00
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
654 * leax ,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
655 * os9 I$GetStt
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
656 * bcs L0332
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
657 * lda >L0115,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
658 * ldb $04,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
659 * sta $04,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
660 * stb >L0115,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
661 * lda >L0116,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
662 * ldb $0C,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
663 * sta $0C,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
664 * stb >L0116,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
665 * lda >L0117,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
666 * ldb <$10,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
667 * sta <$10,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
668 * stb >L0117,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
669 * lda >L0118,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
670 * ldb <$11,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
671 * sta <$11,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
672 * stb >L0118,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
673 * lda #$00
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
674 * ldb #$00
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
675 * os9 I$SetStt
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
676 *L0332 leas <$20,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
677 * rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
678
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
679 * 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
680 * get current options packet
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
681 * GetStat Function Code $00
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
682 * 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
683 * 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
684 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
685 * a -> path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
686 * 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
687 * 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
688 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
689 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
690 * CC -> Carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
691 * b -> error code (if any)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
692 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
693
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
694 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
695 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
696 ldb #SS.OPT $00
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
697 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
698 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
699 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
700
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
701 * 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
702 * 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
703 * 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
704 * 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
705
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
706 lda >L0115,pc
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
707 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
708 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
709 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
710
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
711 lda >L0116,pc
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
712 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
713 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
714 stb >L0116,pc
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
715
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
716 lda >L0117,pc
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
717 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
718 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
719 stb >L0117,pc
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
720
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
721 lda >L0118,pc
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
722 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
723 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
724 stb >L0118,pc
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
725
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
726 * set current options packet
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
727 * SetStat Function Code $00
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
728 * 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
729 * 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
730 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
731 * a -> path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
732 * 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
733 * 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
734 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
735 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
736 * CC -> Carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
737 * b -> error code (if any)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
738 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
739
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
740 * 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
741 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
742 ldb #SS.OPT $00
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
743 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
744
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
745 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
746 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
747
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
748 * raw disassembly
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
749 *L0336 leas -$02,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
750 * tst >$0174
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
751 * beq L036D
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
752 * lbsr L02E9
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
753 * bcs L036D
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
754 ** lda #$1B
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
755 * sta ,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
756 * lda #$30
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
757 * sta $01,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
758 * ldy #$0002
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
759 * lda #$01
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
760 * leax ,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
761 * os9 I$Write
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
762 * bcs L036D
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
763 * ldb #$8C
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
764 * ldy #$0000
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
765 * os9 I$SetStt
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
766 * clra
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
767 * ldb >$0174
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
768 * tfr d,y
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
769 * lda #$01
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
770 * ldb #$8D
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
771 * os9 I$SetStt
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
772 *L036D leas $02,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
773 * rts
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
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
776 * 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
777 * 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
778
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
779 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
780 * 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
781 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
782 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
783 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
784 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
785 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
786 sta ,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
787 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
788 sta 1,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
789 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
790 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
791 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
792 os9 I$Write write
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
793 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
794
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
795 * 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
796 * SetStat Function Code $8C
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
797 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
798 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
799 * a -> path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
800 * 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
801 * y -> screen numbe
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
802 * 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
803 * 1-3 = high resolution screen
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 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
806 * CC -> Carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
807 * b -> error code (if any)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
808
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
809 * 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
810 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
811 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
812 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
813
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
814 * 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
815 * SetStat Function Code $8C
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
816 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
817 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
818 * a -> path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
819 * 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
820 * 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
821 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
822 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
823 * CC -> Carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
824 * b -> error code (if any)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
825
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
826 clra clear high byte
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
827 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
828 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
829 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
830 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
831 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
832
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
833 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
834 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
835
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
836
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
837
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
838 * Unload the other modules
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
839 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
840 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
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 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
843 lbsr L040B unload it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
844 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
845 lbsr L040B unload it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
846 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
847
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
848 *L0388 orcc #$50
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
849 * lda <u0042
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
850 * sta >$FFA9
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
851 * ldx <u0043
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
852 * ldd >L0104,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
853 * std $01,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
854 * stb >$FFAA
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
855 * ldd >L0102,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
856 * std -$01,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
857 * stb >$FFA9
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
858 * andcc #$AF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
859 * clra
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
860 * ldb >L0119,pcr
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
861 * andb #$03
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
862 * tfr d,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
863 * lda #$01
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
864 * ldb #$92
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
865 * os9 I$SetStt
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
866 * rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
867 **
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
868 *L03B6 tfr x,d
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
869 * exg a,b
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 * lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
872 * lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
873 * lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
874 * lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
875 * pshs b
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
876 * ldu #$FFA8
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
877 * lda b,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
878 * incb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
879 * andb #$07
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
880 * ldb b,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
881 * tfr d,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
882 * puls a
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
883 * rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
884
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
885
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
886 * Restore original MMU block numbers
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
887 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
888 lda <u0042 get MMU Block #
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
889 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
890 ldx <u0043
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
891 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
892 std 1,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
893 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
894 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
895 std -1,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
896 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
897 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
898
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
899 * 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
900 clra
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
901 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
902 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
903 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
904 lda #StdOut set path $01
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
905 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
906 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
907 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
908
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
909 * twiddles address
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
910 * 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
911 * returns block # in a
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
912 * ????? in u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
913 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
914 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
915 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
916 lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
917 lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
918 lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
919 lsrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
920 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
921 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
922 lda b,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
923 incb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
924 andb #$07
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
925 ldb b,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
926 tfr d,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
927 puls a
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
928 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
929
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
930
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
931
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
932 *************************************************************
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
933 * 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
934 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
935 * 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
936 * u -> contains some arbitrary value
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
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
939 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
940 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
941
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
942 * 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
943 * 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
944 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
945 * a -> type/language byte
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
946 * 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
947 * 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
948 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
949 * exit:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
950 * a -> type/language
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
951 * b -> module revision
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
952 * 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
953 * 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
954 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
955 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
956 * b -> error code if any
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
957 * cc -> carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
958
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
959 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
960 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
961 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
962 bcs L0408 exit on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
963
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
964 * 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
965 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
966 * a -> type/language byte
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
967 * 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
968 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
969 * exit:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
970 * a -> type/language
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
971 * b -> attributes/module revision
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
972 * 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
973 * 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
974 * u -> module header abosolute address
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
975 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
976 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
977 * cc -> set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
978
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
979 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
980 os9 F$Link link it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
981 bcs L0408 exit on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
982 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
983 tfr u,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
984 L03E8 stx $04,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
985 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
986 ldx ,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
987 leax a,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
988 exg d,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
989 sta ,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
990 exg d,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
991 cmpa #$06
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
992 beq L0403
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
993 ldx $04,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
994 leax >$2000,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
995 bra L03E8
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
996
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
997 L0403 ldu $06,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
998 os9 F$UnLink
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
999 L0408 leas $08,s
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1000 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1001
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1002 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
1003 bcc L040B
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1004 clrb
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1005 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1006
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1007 L0412 fcc '/VI'
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1008 L0415 fcb C$CR
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1009 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
1010 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
1011
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1012 **************************************************************
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1013 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1014 * subroutine entry is L0419
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1015 * sets up Sig Intercept
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1016 * 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
1017 * and allocates ram for it
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1018 * 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
1019
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1020
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1021 * Set signal intercept trap
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1022 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1023 * x -> address of intercept routine
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1024 * 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
1025 * exit:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1026 * 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
1027 * 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
1028
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1029 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
1030 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
1031 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
1032
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1033 * 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
1034 * 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
1035 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1036 * a -> access mode
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1037 * 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
1038 * 1 = read only
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1039 * 2 = write only
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1040 * 3 = update (read and write)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1041 * 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
1042 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1043 * exit:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1044 * x -> updated past device name
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1045 * 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
1046 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1047 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1048 * b -> error code (if any)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1049 * cc -> carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1050
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1051 lda #$01 attach for read
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1052 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
1053 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
1054 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
1055 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
1056
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1057 * 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
1058 * entry:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1059 * 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
1060 * 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
1061 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1062 * exit:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1063 * a -> path number
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1064 * 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
1065 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1066 * error:
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1067 * b -> error code(if any)
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1068 * cc -> carry set on error
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1069 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1070 * a still contains $01 read
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1071 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
1072 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
1073 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
1074 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
1075
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1076 * Allocate process+path RAM blocks
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1077
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1078 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
1079 ldx #$000D
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1080 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
1081 bcs L0451
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1082 pshs x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1083
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1084 * Set process+path VIRQ KQ3
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1085 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
1086 os9 I$SetStt
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1087 puls b,a
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1088 L0451 rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1089
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1090 * 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
1091 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
1092 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
1093 tfr u,d
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1094 tfr a,dp
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1095 dec <u004A
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1096 bne L0464
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1097 bsr L0465
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1098 lda #$03
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1099 sta <u004A
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1100 L0464 rti
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1101
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1102 L0465 inc >u024C,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 >u024B,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1105 bne L047B
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1106 inc >u024A,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1107 bne L047B
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1108 inc >u0249,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1109 L047B tst >u0102,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1110 bne L04BC
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1111 inc <u003F
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1112 bne L0487
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1113 inc <u003E
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1114 L0487 ldd <u0048
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1115 addd #$0001
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 cmpd #$0014
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1118 bcs L04BC
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1119 subd #$0014
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1120 std <u0048
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1121 ldd #$003C
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1122 leax >u043D,u
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 cmpb ,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1129 bhi L04BC
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1130 sta ,x+
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1131 inc ,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1132 ldb #$18
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1133 cmpb ,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1134 bhi L04BC
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1135 sta ,x+
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1136 inc ,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1137 L04BC rts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1138
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1139 * deallocates the VIRQ device
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1140 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
1141 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
1142 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
1143 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
1144 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
1145 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
1146 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
1147 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
1148 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
1149 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
1150 L04D9 rts
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 * 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
1153 * 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
1154 * 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
1155 *
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1156 * 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
1157
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1158 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
1159 * 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
1160 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
1161 orcc #IntMasks mask the interrupts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1162 lda <u0042
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1163 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
1164 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
1165 ldu <u0043
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1166 lda $06,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1167 sta u000C,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1168 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
1169 lda $05,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1170 sta u000A,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1171 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
1172 lda $04,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1173 sta u0008,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1174 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
1175 lda $03,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1176 sta u0006,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1177 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
1178 lda $02,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1179 sta u0004,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1180 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
1181 andcc #^IntMasks unmask interrupts
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1182
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1183 lda $07,x
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1184 ldu <u002E
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1185 adda u000A,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1186 jsr a,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1187
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1188 orcc #IntMasks
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1189 lda <u0042
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1190 sta >$FFA9
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1191 ldu <u0043
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1192 lda <u0010
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1193 sta u000C,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1194 sta >$FFAF
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1195 lda <u000F
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1196 sta u000A,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1197 sta >$FFAE
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1198 lda <u000E
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1199 sta u0008,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1200 sta >$FFAD
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1201 lda <u000D
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1202 sta u0006,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1203 sta >$FFAC
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1204 lda <u000B
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1205 sta u0002,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1206 sta >$FFAA
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1207 lda <u000A
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1208 sta ,u
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1209 sta >$FFA9
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1210 andcc #^IntMasks
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1211
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1212 jmp [>$002A]
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1213
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1214 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
1215 L0557 fcb $73,$69,$65,$72,$72,$61,$00 sierra.
1081
4e78dd135898 Slight source cleanup
boisy
parents: 1080
diff changeset
1216
1079
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1217 emod
9b0571f2c817 Took source from KQ3 and made changes to assemble to LSL's sierra
boisy
parents: 777
diff changeset
1218 eom equ *
1081
4e78dd135898 Slight source cleanup
boisy
parents: 1080
diff changeset
1219 end
4e78dd135898 Slight source cleanup
boisy
parents: 1080
diff changeset
1220