2009-09-07 13:21:04 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 2009-09-07
|
|
|
|
;
|
2009-09-08 16:25:12 +00:00
|
|
|
; unsigned __fastcall__ videomode (unsigned Mode);
|
2009-09-07 13:21:04 +00:00
|
|
|
; /* Set the video mode, return the old mode */
|
|
|
|
;
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.export _videomode
|
2009-09-08 16:25:12 +00:00
|
|
|
.import SWAPPER, BSOUT
|
2009-09-07 13:21:04 +00:00
|
|
|
|
|
|
|
.include "c128.inc"
|
|
|
|
|
|
|
|
|
|
|
|
.proc _videomode
|
|
|
|
|
|
|
|
cmp MODE ; Do we have this mode already?
|
|
|
|
beq @L9
|
|
|
|
|
|
|
|
lda MODE ; Get current mode ...
|
|
|
|
pha ; ... and save it
|
|
|
|
|
|
|
|
jsr SWAPPER ; Toggle the mode
|
2013-05-09 11:56:54 +00:00
|
|
|
lda #14
|
|
|
|
jsr BSOUT ; Switch to lower case chars
|
2010-03-07 13:37:58 +00:00
|
|
|
|
2009-09-07 13:21:04 +00:00
|
|
|
pla ; Get old mode into A
|
|
|
|
|
|
|
|
; Done, old mode is in A
|
|
|
|
|
|
|
|
@L9: ldx #$00 ; Clear high byte
|
|
|
|
rts
|
|
|
|
|
|
|
|
.endproc
|
|
|
|
|