1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-25 02:29:52 +00:00
cc65/libsrc/conio/scrsize.s

37 lines
751 B
ArmAsm
Raw Normal View History

;
; Ullrich von Bassewitz, 08.08.1998
;
; void screensize (unsigned char* x, unsigned char* y);
;
.export _screensize
2018-05-22 13:59:05 +00:00
.import popptr1
.import screensize
2018-05-22 13:59:05 +00:00
.importzp ptr1, ptr2
2022-04-17 14:06:22 +00:00
.macpack cpu
.proc _screensize
2018-05-22 13:59:05 +00:00
sta ptr2 ; Store the y pointer
stx ptr2+1
jsr popptr1 ; Get the x pointer into ptr1
jsr screensize ; Get screensize into X/Y
tya ; Get Y size into A
2018-05-22 13:59:05 +00:00
.if (.cpu .bitand ::CPU_ISET_65SC02)
sta (ptr2)
txa
sta (ptr1)
2018-05-22 13:59:05 +00:00
.else
ldy #0
sta (ptr2),y
txa
2018-05-22 13:59:05 +00:00
sta (ptr1),y
2022-04-17 14:06:22 +00:00
.endif
rts
.endproc