annotate 3rdparty/packages/sierra/objs_lsl/sierra.asm @ 1080:3d0b20100199

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