]> git.sur5r.net Git - cc65/blob - libsrc/c128/conio.s
Add 80 column mode
[cc65] / libsrc / c128 / conio.s
1 ;
2 ; Ullrich von Bassewitz, 06.08.1998
3 ;
4 ; Low level stuff for screen output/console input
5 ;
6
7         .export         initconio, doneconio
8         .exportzp       CURS_X, CURS_Y
9         .import         xsize, ysize
10
11         .include        "c128.inc"
12         .include        "../cbm/cbm.inc"
13
14 .bss
15 keyvec: .res    2
16
17
18 .code
19
20 initconio:
21
22         lda     #$80
23         sta     SCROLL
24
25 ; Save the old vector
26
27         lda     KeyStoreVec
28         sta     keyvec
29         lda     KeyStoreVec+1
30         sta     keyvec+1
31
32 ; Set the new vector. I can only hope that this works for other C128
33 ; versions...
34
35         lda     #<$C6B7
36         ldx     #>$C6B7
37
38 SetVec: sei
39         sta     KeyStoreVec
40         stx     KeyStoreVec+1
41         cli
42         rts
43
44 doneconio:
45         lda     keyvec
46         ldx     keyvec+1
47         bne     SetVec
48