Mercurial > hg > Members > kono > nitros9-code
annotate level1/atari/modules/vtio.asm @ 3295:6b7a7b233925 default tip
makefile: Allow PORTS with level1/2 mix
https://sourceforge.net/p/nitros9/feature-requests/10/
author | Tormod Volden <debian.tormod@gmail.com> |
---|---|
date | Tue, 19 Apr 2022 18:12:17 +0200 |
parents | 31cd1f1b4fb0 |
children |
rev | line source |
---|---|
2617
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
1 ******************************************************************** |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
2 * VTIO - NitrOS-9 Video Terminal I/O driver for Atari XE/XL |
2617
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
3 * |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
4 * $Id$ |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
5 * |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
6 * Edt/Rev YYYY/MM/DD Modified by |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
7 * Comment |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
8 * ------------------------------------------------------------------ |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
9 * 1 2012/02/20 Boisy G. Pitre |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
10 * Started from VTIO for the Atari XE/XL |
2617
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
11 |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
12 nam VTIO |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
13 ttl NitrOS-9 Video Terminal I/O driver for Atari XE/XL |
2617
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
14 |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
15 ifp1 |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
16 use defsfile |
2624 | 17 use atarivtio.d |
2617
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
18 endc |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
19 |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
20 tylg set Drivr+Objct |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
21 atrv set ReEnt+rev |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
22 rev set $00 |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
23 edition set 1 |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
24 |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
25 mod eom,name,tylg,atrv,start,size |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
26 |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
27 size equ V.Last |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
28 |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
29 fcb UPDAT.+EXEC. |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
30 |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
31 name fcs /VTIO/ |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
32 fcb edition |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
33 |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
34 start lbra Init |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
35 lbra Read |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
36 lbra Write |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
37 lbra GetStat |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
38 lbra SetStat |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
39 lbra Term |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
40 |
2618 | 41 |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
42 * The display list sets up the ANTIC chip to display the main screen. |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
43 * It is copied to the Atari Screen Area in low memory (see atari.d) |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
44 * The size of this code MUST be <= G.DListSize |
2649
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
45 *DList |
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
46 * fcb $70,$70,$70 3 * 8 blank scanlines |
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
47 * fcb $42 Mode 2 with LMS (Load Memory Scan). Mode 2 = 40 column hires text, next 2 bytes L/H determine screen origin |
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
48 * fdbs G.ScrStart+(G.Cols*0) origin |
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
49 * fcb 2,2,2,2,2,2,2,2,2,2 |
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
50 * fcb 2,2,2,2,2,2,2,2,2,2 |
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
51 * fcb 2,2,2 |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
52 * 23 extra mode 2 lines for total of 24. 240 scanlines can be used for display area, but a hires line cannot be on scanline 240 due to an Antic bug |
2649
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
53 * fcb $41 this is the end of Display List command JVB (Jump and wait for Vertical Blank) |
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
54 * fdb $0000 |
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
55 *DListSz equ *-DList |
2618 | 56 |
2617
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
57 * Init |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
58 * |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
59 * Entry: |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
60 * Y = address of device descriptor |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
61 * U = address of device memory area |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
62 * |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
63 * Exit: |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
64 * CC = carry set on error |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
65 * B = error code |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
66 * |
2618 | 67 Init |
2620 | 68 stu >D.KbdSta store devmem ptr |
2618 | 69 pshs u |
70 | |
2625
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
71 leax ChkSpc,pcr |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
72 stx V.EscVect,u |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
73 |
2618 | 74 * setup static vars |
75 clra | |
76 clrb | |
77 std V.CurRow,u | |
78 | |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
79 * Clear screen memory |
2649
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
80 ldy #G.ScrEnd |
2618 | 81 pshs y |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
82 ldy #G.ScrStart |
2618 | 83 ldd #$0000 |
84 clearLoop@ | |
85 std ,y++ | |
86 cmpy ,s | |
87 bne clearLoop@ | |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
88 puls u G.DList address is aleady in U |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
89 |
2649
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
90 * copy the display list into our memory area to the global location in low RAM |
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
91 * leax DList,pcr |
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
92 * ldy #DListSz |
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
93 *dlcopy@ |
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
94 * ldd ,x++ |
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
95 * std ,u++ |
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
96 * leay -2,y |
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
97 * bne dlcopy@ |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
98 * patch last word to be address of start of DList (byte swap for ANTIC) |
2649
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
99 * leau -DListSz,u |
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
100 * tfr u,d |
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
101 * exg a,b |
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
102 * std DListSz-2,u |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
103 |
2618 | 104 * tell the ANTIC where the dlist is |
2649
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
105 * std DLISTL |
2617
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
106 |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
107 * tell the ANTIC where the character set is (page aligned, currently in Krn) |
2649
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
108 * lda #G.CharSetAddr>>8 |
928b4a062979
Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2631
diff
changeset
|
109 * sta CHBASE |
2618 | 110 |
111 * set background color | |
2653
40d55004f686
o krn.asm: Conditionalized out code in kernel to check for top of RAM
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2649
diff
changeset
|
112 clra |
2618 | 113 sta COLBK |
2617
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
114 |
2618 | 115 * set text color |
116 lda #$0F | |
117 sta COLPF1 | |
118 lda #$94 | |
119 sta COLPF2 | |
120 | |
121 * tell ANTIC to start DMA | |
2653
40d55004f686
o krn.asm: Conditionalized out code in kernel to check for top of RAM
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2649
diff
changeset
|
122 * lda #$22 |
40d55004f686
o krn.asm: Conditionalized out code in kernel to check for top of RAM
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2649
diff
changeset
|
123 * sta DMACTL |
2618 | 124 |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
125 * tell ANTIC to enable character set 2 |
2653
40d55004f686
o krn.asm: Conditionalized out code in kernel to check for top of RAM
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2649
diff
changeset
|
126 * lda #$02 |
40d55004f686
o krn.asm: Conditionalized out code in kernel to check for top of RAM
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2649
diff
changeset
|
127 * sta CHACTL |
2620 | 128 |
129 * install keyboard ISR | |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
130 ldd #IRQST POKEY IRQ status address |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
131 leay IRQSvc,pcr pointer to our service routine |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
132 leax IRQPkt,pcr F$IRQ requires a 3 byte packet |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
133 ldu ,s use our saved devmem as ISR static |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
134 os9 F$IRQ install the ISR |
2620 | 135 bcs initex |
136 | |
2625
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
137 * set POKEY to active |
2714
8399491c0821
Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2656
diff
changeset
|
138 lda #$13 |
2625
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
139 sta SKCTL |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
140 |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
141 * tell POKEY to enable keyboard scanning |
2714
8399491c0821
Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2656
diff
changeset
|
142 lda #(IRQST.BREAKDOWN|IRQST.KEYDOWN) |
2631
442795681807
o Fixed Atari SIO DWRead to timeout longer
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2625
diff
changeset
|
143 pshs cc |
442795681807
o Fixed Atari SIO DWRead to timeout longer
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2625
diff
changeset
|
144 orcc #IntMasks |
2714
8399491c0821
Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2656
diff
changeset
|
145 ora >D.IRQENSHDW |
8399491c0821
Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2656
diff
changeset
|
146 sta >D.IRQENSHDW |
2631
442795681807
o Fixed Atari SIO DWRead to timeout longer
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2625
diff
changeset
|
147 puls cc |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
148 sta IRQEN |
2620 | 149 |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
150 * clear carry and return |
2618 | 151 clrb |
2620 | 152 initex puls u,pc |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
153 |
2618 | 154 |
2617
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
155 * Term |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
156 * |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
157 * Entry: |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
158 * U = address of device memory area |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
159 * |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
160 * Exit: |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
161 * CC = carry set on error |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
162 * B = error code |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
163 * |
2618 | 164 Term |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
165 * clear carry and return |
2618 | 166 clrb |
167 rts | |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
168 |
2617
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
169 |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
170 * Read |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
171 * |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
172 * Entry: |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
173 * Y = address of path descriptor |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
174 * U = address of device memory area |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
175 * |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
176 * Exit: |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
177 * A = character read |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
178 * CC = carry set on error |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
179 * B = error code |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
180 * |
2620 | 181 Read |
182 leax V.InBuf,u point X to input buffer | |
183 ldb V.IBufT,u get tail pointer | |
184 orcc #IRQMask mask IRQ | |
185 cmpb V.IBufH,u same as head pointer | |
186 beq Put2Bed if so, buffer is empty, branch to sleep | |
187 abx X now points to curr char | |
188 lda ,x get char | |
189 bsr cktail check for tail wrap | |
190 stb V.IBufT,u store updated tail | |
191 andcc #^(IRQMask+Carry) unmask IRQ | |
192 rts | |
2617
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
193 |
2620 | 194 Put2Bed lda V.BUSY,u get calling process ID |
195 sta V.WAKE,u store in V.WAKE | |
196 andcc #^IRQMask clear interrupts | |
197 ldx #$0000 | |
198 os9 F$Sleep sleep forever | |
199 clr V.WAKE,u clear wake | |
200 ldx <D.Proc get pointer to current proc desc | |
201 ldb <P$Signal,x get signal recvd | |
202 beq Read branch if no signal | |
203 cmpb #S$Window window signal? | |
204 bcc Read branch if so | |
205 coma | |
206 rts | |
207 * Check if we need to wrap around tail pointer to zero | |
208 cktail incb increment pointer | |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
209 cmpb #KBufSz-1 at end? |
2620 | 210 bls readex branch if not |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
211 * clear carry and return |
2620 | 212 clrb else clear pointer (wrap to head) |
213 readex rts | |
2617
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
214 |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
215 |
2617
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
216 * Write |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
217 * |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
218 * Entry: |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
219 * A = character to write |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
220 * Y = address of path descriptor |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
221 * U = address of device memory area |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
222 * |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
223 * Exit: |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
224 * CC = carry set on error |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
225 * B = error code |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
226 * |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
227 Write |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
228 bsr hidecursor |
2653
40d55004f686
o krn.asm: Conditionalized out code in kernel to check for top of RAM
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2649
diff
changeset
|
229 ldx V.EscVect,u |
40d55004f686
o krn.asm: Conditionalized out code in kernel to check for top of RAM
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2649
diff
changeset
|
230 jsr ,x |
40d55004f686
o krn.asm: Conditionalized out code in kernel to check for top of RAM
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2649
diff
changeset
|
231 bra drawcursor |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
232 |
2653
40d55004f686
o krn.asm: Conditionalized out code in kernel to check for top of RAM
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2649
diff
changeset
|
233 ChkSpc cmpa #C$SPAC space or greater? |
2625
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
234 bcs ChkESC branch if not |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
235 |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
236 wchar suba #$20 |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
237 pshs a |
2620 | 238 lda V.CurRow,u |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
239 ldb #G.Cols |
2620 | 240 mul |
241 addb V.CurCol,u | |
242 adca #0 | |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
243 ldx #G.ScrStart |
2618 | 244 leax d,x |
245 puls a | |
246 sta ,x | |
247 ldd V.CurRow,u | |
248 incb | |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
249 cmpb #G.Cols |
2618 | 250 blt ok |
251 clrb | |
252 incrow | |
253 inca | |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
254 cmpa #G.Rows |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
255 blt clrline |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
256 SCROLL EQU 1 |
2620 | 257 IFNE SCROLL |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
258 deca set A to G.Rows - 1 |
2620 | 259 pshs d save off Row/Col |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
260 ldx #G.ScrStart get start of screen memory |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
261 ldy #G.Cols*(G.Rows-1) set Y to size of screen minus last row |
2620 | 262 scroll_loop |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
263 ldd G.Cols,x get two bytes on next row |
2620 | 264 std ,x++ store on this row |
265 leay -2,y decrement Y | |
266 bne scroll_loop branch if not 0 | |
267 puls d recover Row/Col | |
268 ELSE | |
2618 | 269 clra |
2620 | 270 ENDC |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
271 * clear line |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
272 clrline std V.CurRow,u |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
273 bsr DelLine |
2653
40d55004f686
o krn.asm: Conditionalized out code in kernel to check for top of RAM
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2649
diff
changeset
|
274 rts |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
275 ok std V.CurRow,u |
2653
40d55004f686
o krn.asm: Conditionalized out code in kernel to check for top of RAM
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2649
diff
changeset
|
276 ret rts |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
277 |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
278 * calculates the cursor location in screen memory |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
279 * Exit: X = address of cursor |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
280 * All other regs preserved |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
281 calcloc |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
282 pshs d |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
283 lda V.CurRow,u |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
284 ldb #G.Cols |
2619
d888412d8118
o Fixed assembler issue in init.asm
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2618
diff
changeset
|
285 mul |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
286 addb V.CurCol,u |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
287 adca #0 |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
288 ldx #G.ScrStart |
2619
d888412d8118
o Fixed assembler issue in init.asm
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2618
diff
changeset
|
289 leax d,x |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
290 puls d,pc |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
291 |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
292 drawcursor |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
293 bsr calcloc |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
294 lda ,x |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
295 sta V.CurChr,u |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
296 lda #$80 |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
297 sta ,x |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
298 rts |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
299 |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
300 hidecursor |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
301 pshs a |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
302 bsr calcloc |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
303 lda V.CurChr,u |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
304 sta ,x |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
305 puls a,pc |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
306 |
2625
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
307 ChkESC |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
308 cmpa #$1B ESC? |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
309 lbeq EscHandler |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
310 cmpa #$0D $0D? |
2653
40d55004f686
o krn.asm: Conditionalized out code in kernel to check for top of RAM
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2649
diff
changeset
|
311 bhi ret branch if higher than |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
312 leax <DCodeTbl,pcr deal with screen codes |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
313 lsla adjust for table entry size |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
314 ldd a,x get address in D |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
315 jmp d,x and jump to routine |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
316 |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
317 * display functions dispatch table |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
318 DCodeTbl fdb NoOp-DCodeTbl $00:no-op (null) |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
319 fdb CurHome-DCodeTbl $01:HOME cursor |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
320 fdb CurXY-DCodeTbl $02:CURSOR XY |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
321 fdb DelLine-DCodeTbl $03:ERASE LINE |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
322 fdb ErEOLine-DCodeTbl $04:CLEAR TO EOL |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
323 fdb Do05-DCodeTbl $05:CURSOR ON/OFF |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
324 fdb CurRght-DCodeTbl $005e $06:CURSOR RIGHT |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
325 fdb NoOp-DCodeTbl $07:no-op (bel:handled in VTIO) |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
326 fdb CurLeft-DCodeTbl $08:CURSOR LEFT |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
327 fdb CurUp-DCodeTbl $09:CURSOR UP |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
328 fdb CurDown-DCodeTbl $0A:CURSOR DOWN |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
329 fdb ErEOScrn-DCodeTbl $0B:ERASE TO EOS |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
330 fdb ClrScrn-DCodeTbl $0C:CLEAR SCREEN |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
331 fdb Retrn-DCodeTbl $0D:RETURN |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
332 |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
333 DelLine |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
334 lda V.CurRow,u |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
335 ldb #G.Cols |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
336 mul |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
337 ldx #G.ScrStart |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
338 leax d,x |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
339 lda #G.Cols |
2619
d888412d8118
o Fixed assembler issue in init.asm
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2618
diff
changeset
|
340 clrloop@ clr ,x+ |
d888412d8118
o Fixed assembler issue in init.asm
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2618
diff
changeset
|
341 deca |
d888412d8118
o Fixed assembler issue in init.asm
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2618
diff
changeset
|
342 bne clrloop@ |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
343 rts |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
344 |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
345 ClrScrn |
2736
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
346 clr V.CurCol,u |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
347 lda #G.Rows-1 |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
348 clrloop@ |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
349 sta V.CurRow,u |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
350 pshs a |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
351 bsr DelLine |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
352 puls a |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
353 deca |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
354 bpl clrloop@ |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
355 clr V.CurCol,u |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
356 rts |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
357 |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
358 ErEOScrn |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
359 CurUp |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
360 NoOp |
2736
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
361 CurHome clr V.CurCol,u |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
362 clr V.CurRow,u |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
363 rts |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
364 |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
365 CurXY |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
366 ErEOLine |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
367 Do05 |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
368 CurRght |
2653
40d55004f686
o krn.asm: Conditionalized out code in kernel to check for top of RAM
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2649
diff
changeset
|
369 rts |
2620 | 370 |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
371 CurLeft |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
372 ldd V.CurRow,u |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
373 beq leave |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
374 decb |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
375 bpl erasechar |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
376 ldb #G.Cols-1 |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
377 deca |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
378 bpl erasechar |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
379 clra |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
380 erasechar |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
381 std V.CurRow,u |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
382 ldb #G.Cols |
2620 | 383 mul |
384 addb V.CurCol,u | |
385 adca #0 | |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
386 ldx #G.ScrStart |
2620 | 387 leax d,x |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
388 clr 1,x |
2653
40d55004f686
o krn.asm: Conditionalized out code in kernel to check for top of RAM
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2649
diff
changeset
|
389 leave rts |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
390 |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
391 CurDown |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
392 ldd V.CurRow,u |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
393 lbra incrow |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
394 |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
395 Retrn |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
396 clr V.CurCol,u |
2653
40d55004f686
o krn.asm: Conditionalized out code in kernel to check for top of RAM
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2649
diff
changeset
|
397 rts |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
398 |
2625
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
399 EscHandler |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
400 leax EscHandler2,pcr |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
401 eschandlerout |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
402 stx V.EscVect,u |
2653
40d55004f686
o krn.asm: Conditionalized out code in kernel to check for top of RAM
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2649
diff
changeset
|
403 rts |
2625
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
404 |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
405 EscHandler2 |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
406 sta V.EscCh1,u |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
407 leax EscHandler3,pcr |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
408 bra eschandlerout |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
409 |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
410 EscHandler3 |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
411 ldb V.EscCh1,u |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
412 cmpb #$32 |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
413 beq DoFore |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
414 cmpb #$33 |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
415 beq DoBack |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
416 cmpb #$34 |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
417 beq DoBord |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
418 eschandler3out |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
419 leax ChkSpc,pcr |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
420 bra eschandlerout |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
421 |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
422 DoFore |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
423 * sta COLPF0 |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
424 sta COLPF1 |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
425 * sta COLPF3 |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
426 bra eschandler3out |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
427 DoBack |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
428 sta COLPF2 |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
429 bra eschandler3out |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
430 DoBord |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
431 sta COLBK |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
432 bra eschandler3out |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
433 |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
434 |
2617
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
435 * GetStat |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
436 * |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
437 * Entry: |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
438 * A = function code |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
439 * Y = address of path descriptor |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
440 * U = address of device memory area |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
441 * |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
442 * Exit: |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
443 * CC = carry set on error |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
444 * B = error code |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
445 * |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
446 GetStat |
2619
d888412d8118
o Fixed assembler issue in init.asm
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2618
diff
changeset
|
447 cmpa #SS.ScSiz |
d888412d8118
o Fixed assembler issue in init.asm
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2618
diff
changeset
|
448 bne gserr |
d888412d8118
o Fixed assembler issue in init.asm
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2618
diff
changeset
|
449 ldx PD.RGS,y |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
450 ldd #G.Cols |
2619
d888412d8118
o Fixed assembler issue in init.asm
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2618
diff
changeset
|
451 std R$X,x |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
452 ldd #G.Rows |
2619
d888412d8118
o Fixed assembler issue in init.asm
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2618
diff
changeset
|
453 std R$Y,x |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
454 * clear carry and return |
2619
d888412d8118
o Fixed assembler issue in init.asm
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2618
diff
changeset
|
455 clrb |
d888412d8118
o Fixed assembler issue in init.asm
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2618
diff
changeset
|
456 rts |
d888412d8118
o Fixed assembler issue in init.asm
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2618
diff
changeset
|
457 gserr |
d888412d8118
o Fixed assembler issue in init.asm
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2618
diff
changeset
|
458 comb |
d888412d8118
o Fixed assembler issue in init.asm
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2618
diff
changeset
|
459 ldb #E$UnkSvc |
2618 | 460 rts |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
461 |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
462 |
2617
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
463 * SetStat |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
464 * |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
465 * Entry: |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
466 * A = function code |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
467 * Y = address of path descriptor |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
468 * U = address of device memory area |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
469 * |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
470 * Exit: |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
471 * CC = carry set on error |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
472 * B = error code |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
473 * |
b1145d2cb659
Adding atari port folder and modifications to init and krn to accommodate
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
474 SetStat |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
475 * clear carry and return |
2618 | 476 clrb |
477 rts | |
478 | |
479 | |
2620 | 480 IRQPkt equ * |
2714
8399491c0821
Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2656
diff
changeset
|
481 Pkt.Flip fcb (IRQST.BREAKDOWN|IRQST.KEYDOWN) flip byte |
8399491c0821
Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2656
diff
changeset
|
482 Pkt.Mask fcb (IRQST.BREAKDOWN|IRQST.KEYDOWN) mask byte |
2620 | 483 fcb $0A priority |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
484 |
2620 | 485 |
486 * | |
487 * IRQ routine for keyboard | |
488 * | |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
489 IRQSvc |
2714
8399491c0821
Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2656
diff
changeset
|
490 * check if BREAK key pressed; if so, it's a C$QUIT char |
8399491c0821
Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2656
diff
changeset
|
491 ldb IRQST |
8399491c0821
Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2656
diff
changeset
|
492 bitb #IRQST.BREAKDOWN |
8399491c0821
Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2656
diff
changeset
|
493 bne getcode |
8399491c0821
Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2656
diff
changeset
|
494 lda #C$QUIT |
8399491c0821
Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2656
diff
changeset
|
495 bra noctrl@ |
8399491c0821
Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2656
diff
changeset
|
496 getcode |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
497 ldb KBCODE get keyboard code from POKEY |
2714
8399491c0821
Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2656
diff
changeset
|
498 gotcode |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
499 pshs b |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
500 andb #$7F mask out potential CTRL key |
2620 | 501 leax ATASCI,pcr |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
502 lda b,x fetch character for code |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
503 tst ,s+ CTRL key down? |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
504 bpl noctrl@ branch if not |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
505 cmpa #$40 |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
506 bcs noctrl@ |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
507 anda #$5F |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
508 suba #$40 |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
509 noctrl@ |
2736
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
510 * check for caps lock |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
511 cmpa #$82 |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
512 bne tst4caps@ |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
513 tst V.CapsLck,u |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
514 beq turnon@ |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
515 clra |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
516 turnon@ sta V.CapsLck,u |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
517 bra KeyLeave |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
518 tst4caps@ |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
519 tst V.CapsLck,u |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
520 beq goon@ |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
521 cmpa #$61 |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
522 blt goon@ |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
523 cmpa #$7a |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
524 bgt goon@ |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
525 suba #$20 |
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
526 goon@ |
2620 | 527 ldb V.IBufH,u get head pointer in B |
528 leax V.InBuf,u point X to input buffer | |
529 abx X now holds address of head | |
530 lbsr cktail check for tail wrap | |
531 cmpb V.IBufT,u B at tail? | |
532 beq L012F branch if so | |
533 stb V.IBufH,u | |
534 L012F sta ,x store our char at ,X | |
535 beq WakeIt if nul, do wake-up | |
536 cmpa V.PCHR,u pause character? | |
537 bne L013F branch if not | |
538 ldx V.DEV2,u else get dev2 statics | |
539 beq WakeIt branch if none | |
540 sta V.PAUS,x else set pause request | |
541 bra WakeIt | |
542 L013F ldb #S$Intrpt get interrupt signal | |
543 cmpa V.INTR,u our char same as intr? | |
544 beq L014B branch if same | |
545 ldb #S$Abort get abort signal | |
546 cmpa V.QUIT,u our char same as QUIT? | |
547 bne WakeIt branch if not | |
548 L014B lda V.LPRC,u get ID of last process to get this device | |
549 bra L0153 go for it | |
550 WakeIt ldb #S$Wake get wake signal | |
551 lda V.WAKE,u get process to wake | |
552 L0153 beq L0158 branch if none | |
553 os9 F$Send else send wakeup signal | |
554 L0158 clr V.WAKE,u clear process to wake flag | |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
555 |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
556 * Update the shadow register then the real register to disable and |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
557 * re-enable the keyboard interrupt |
2736
31cd1f1b4fb0
Added ClrScrn and CapsLock functionality for Atari VTIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
558 KeyLeave |
2625
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
559 pshs cc |
d1ea3dc90082
More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2624
diff
changeset
|
560 orcc #IntMasks |
2714
8399491c0821
Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2656
diff
changeset
|
561 lda >D.IRQENShdw |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
562 tfr a,b |
2714
8399491c0821
Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2656
diff
changeset
|
563 anda #^(IRQST.BREAKDOWN|IRQST.KEYDOWN) |
8399491c0821
Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2656
diff
changeset
|
564 orb #(IRQST.BREAKDOWN|IRQST.KEYDOWN) |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
565 sta IRQEN |
2714
8399491c0821
Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2656
diff
changeset
|
566 stb >D.IRQENShdw |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
567 stb IRQEN |
2656
2ebf5e737ceb
Updated to address Atari port problems
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2653
diff
changeset
|
568 puls cc,pc |
2620 | 569 |
570 ATASCI fcb $6C,$6A,$3B,$80,$80,$6B,$2B,$2A ;LOWER CASE | |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
571 fcb $6F,$80,$70,$75,$0D,$69,$2D,$3D |
2620 | 572 |
573 fcb $76,$80,$63,$80,$80,$62,$78,$7A | |
574 fcb $34,$80,$33,$36,$1B,$35,$32,$31 | |
575 | |
576 fcb $2C,$20,$2E,$6E,$80,$6D,$2F,$81 | |
577 fcb $72,$80,$65,$79,$7F,$74,$77,$71 | |
578 | |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
579 fcb $39,$80,$30,$37,$08,$38,$3C,$3E |
2620 | 580 fcb $66,$68,$64,$80,$82,$67,$73,$61 |
581 | |
582 | |
583 fcb $4C,$4A,$3A,$80,$80,$4B,$5C,$5E ;UPPER CASE | |
584 fcb $4F,$80,$50,$55,$9B,$49,$5F,$7C | |
585 | |
586 fcb $56,$80,$43,$80,$80,$42,$58,$5A | |
587 fcb $24,$80,$23,$26,$1B,$25,$22,$21 | |
588 | |
589 fcb $5B,$20,$5D,$4E,$80,$4D,$3F,$81 | |
590 fcb $52,$80,$45,$59,$9F,$54,$57,$51 | |
591 | |
592 fcb $28,$80,$29,$27,$9C,$40,$7D,$9D | |
593 fcb $46,$48,$44,$80,$83,$47,$53,$41 | |
594 | |
595 | |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
596 * fcb $0C,$0A,$7B,$80,$80,$0B,$1E,$1F ;CONTROL |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
597 * fcb $0F,$80,$10,$15,$9B,$09,$1C,$1D |
2620 | 598 |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
599 * fcb $16,$80,$03,$80,$80,$02,$18,$1A |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
600 * fcb $80,$80,$85,$80,$1B,$80,$FD,$80 |
2620 | 601 |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
602 * fcb $00,$20,$60,$0E,$80,$0D,$80,$81 |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
603 * fcb $12,$80,$05,$19,$9E,$14,$17,$11 |
2620 | 604 |
2622
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
605 * fcb $80,$80,$80,$80,$FE,$80,$7D,$FF |
1df7d248bb24
Made progress... clock is running, fixed some stuff, things are working
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2620
diff
changeset
|
606 * fcb $06,$08,$04,$80,$84,$07,$13,$01 |
2620 | 607 |
2618 | 608 emod |
609 eom equ * | |
610 end |