]> git.sur5r.net Git - cc65/blob - libsrc/geos-common/conio/_scrsize.s
Moved the 'conio' files from 'geos-cbm' to 'geos-common' which are believed to work...
[cc65] / libsrc / geos-common / conio / _scrsize.s
1
2 ;
3 ; Maciej 'YTM/Elysium' Witkowiak
4 ;
5 ; Screen size variables
6 ;
7 ; 6.3.2001, 17.4.2003
8
9
10         .include        "geossym.inc"
11
12         .export         xsize, ysize
13         .export         screensize
14         .importzp       cursor_r, cursor_c
15         .import         _cursor
16         .constructor    initscrsize
17                       
18 .segment        "INIT"
19
20 initscrsize:
21 .ifdef  __GEOS_CBM__
22         lda     graphMode
23         bpl     L1
24         lda     #80             ; 80 columns (more or less)
25         .byte   $2c
26 L1:     lda     #40             ; 40 columns (more or less)
27         sta     xsize
28         lda     #24             ; something like that for Y size
29 .else
30         lda     #70             ; 70 columns (more or less)
31         sta     xsize
32         lda     #23             ; something like that for Y size
33 .endif
34         sta     ysize
35         ldx     #1
36         stx     cursor_r
37         dex
38         stx     cursor_c
39         txa
40         jmp     _cursor         ; home and update cursor
41
42 screensize:
43         ldx     xsize
44         ldy     ysize
45         rts
46
47 .bss
48
49 xsize:  .res    1
50 ysize:  .res    1