Make screensize() fetch the values dynamically instead of using variables
that are set on startup. This is needed to support the C128, which can switch the screen size at runtime. git-svn-id: svn://svn.cc65.org/cc65/trunk@2042 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -4,12 +4,15 @@
|
||||
; Screen size variables
|
||||
;
|
||||
|
||||
.export xsize, ysize
|
||||
.export screensize
|
||||
|
||||
.rodata
|
||||
.include "apple2.inc"
|
||||
|
||||
xsize: .byte 40
|
||||
ysize: .byte 24
|
||||
.proc screensize
|
||||
|
||||
ldx #XSIZE
|
||||
ldy #YSIZE
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
|
||||
@@ -20,6 +20,12 @@ MEMSIZE = $73 ; Highest free RAM location
|
||||
BRKVec = $03F0 ; Break vector
|
||||
RESTOR = $03D0 ; Goto Dos
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Screen size
|
||||
|
||||
XSIZE = 40
|
||||
YSIZE = 24
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Hardware
|
||||
|
||||
|
||||
Reference in New Issue
Block a user