]> git.sur5r.net Git - cc65/blob - libsrc/atari5200/setcursor.s
00195f1cfb395d2cddeac68f95f88d4942cc8657
[cc65] / libsrc / atari5200 / setcursor.s
1
2
3         .include "atari5200.inc"
4         .export setcursor
5         .import cursor  ; from conio/_cursor.s
6
7
8
9 .proc   setcursor
10
11         rts
12
13 .if 0
14         ldy     #0
15
16         lda     ROWCRS_5200
17         jsr     mul20
18         clc
19 ;        adc     SAVMSC          ; add start of screen memory
20 ;        sta     OLDADR
21         txa
22 ;        adc     SAVMSC+1
23 ;        sta     OLDADR+1
24         lda     COLCRS_5200
25 ;        adc     OLDADR
26 ;        sta     OLDADR
27         bcc     nc
28 ;        inc     OLDADR+1
29 nc:;;;     lda     (OLDADR),y
30 ;        sta     OLDCHR
31
32         ldx     cursor          ; current cursor setting as requested by the user
33         beq     off
34         ldx     #0
35         beq     cont
36
37 off:    inx
38 cont:;;;   stx     CRSINH          ; update system variable
39
40         beq     turnon
41         and     #$7f            ; clear high bit / inverse flag
42 finish: ;;;sta     (OLDADR),y      ; update on-screen display
43         rts
44
45 turnon: ora     #$80            ; set high bit / inverse flag
46         bne     finish
47 .endif
48
49 .endproc