mirror of
https://github.com/cc65/cc65.git
synced 2024-12-25 17:29:50 +00:00
31 lines
734 B
ArmAsm
31 lines
734 B
ArmAsm
;
|
|
; 2009-09-07, Ullrich von Bassewitz
|
|
; 2019-09-23, Greg King
|
|
;
|
|
; unsigned __fastcall__ videomode (unsigned Mode);
|
|
; /* Set the video mode, return the old mode. */
|
|
;
|
|
|
|
.export _videomode
|
|
.import SWAPPER
|
|
|
|
.include "cx16.inc"
|
|
|
|
|
|
.proc _videomode
|
|
cmp LLEN ; Do we have this mode already?
|
|
beq @L9
|
|
|
|
lda LLEN ; Get current mode ...
|
|
pha ; ... and save it
|
|
|
|
jsr SWAPPER ; Toggle the mode
|
|
|
|
pla ; Get old mode into A
|
|
|
|
; Done, old mode is in .A
|
|
|
|
@L9: ldx #>$0000 ; Clear high byte
|
|
rts
|
|
.endproc
|