Created a target and a library for the Commander X16 prototype computer.

This commit is contained in:
Greg King
2019-09-27 03:38:51 -04:00
parent 0896deedef
commit 18afc7c703
49 changed files with 2440 additions and 59 deletions

30
libsrc/cx16/videomode.s Normal file
View File

@@ -0,0 +1,30 @@
;
; 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