]> git.sur5r.net Git - cc65/blob - libsrc/c128/videomode.s
Removed (pretty inconsistently used) tab chars from source code base.
[cc65] / libsrc / c128 / videomode.s
1 ;
2 ; Ullrich von Bassewitz, 2009-09-07
3 ;
4 ; unsigned __fastcall__ videomode (unsigned Mode);
5 ; /* Set the video mode, return the old mode */
6 ;
7
8         .export         _videomode
9         .import         SWAPPER, BSOUT
10
11         .include        "c128.inc"
12
13
14 .proc   _videomode
15
16         cmp     MODE                    ; Do we have this mode already?
17         beq     @L9
18
19         lda     MODE                    ; Get current mode ...
20         pha                             ; ... and save it
21
22         jsr     SWAPPER                 ; Toggle the mode
23         lda     #14
24         jsr     BSOUT                   ; Switch to lower case chars
25
26         pla                             ; Get old mode into A
27
28 ; Done, old mode is in A
29
30 @L9:    ldx     #$00                    ; Clear high byte
31         rts
32
33 .endproc
34