]> git.sur5r.net Git - cc65/blob - libsrc/geos/conio/_scrsize.s
Remove the load address since it's supplied in its own module now.
[cc65] / libsrc / geos / 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        "../inc/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         lda     graphMode
22         bpl     L1
23         lda     #80             ; 80 columns (more or less)
24         .byte   $2c
25 L1:     lda     #40             ; 40 columns (more or less)
26         sta     xsize
27         lda     #24             ; something like that for Y size
28         sta     ysize
29         ldx     #1
30         stx     cursor_r
31         dex
32         stx     cursor_c
33         txa
34         jmp     _cursor         ; home and update cursor
35
36 screensize:
37         ldx     xsize
38         ldy     ysize
39         rts
40
41 .bss
42
43 xsize:  .res    1
44 ysize:  .res    1