]> git.sur5r.net Git - cc65/blob - libsrc/nes/setcursor.s
More additions
[cc65] / libsrc / nes / setcursor.s
1 ;
2 ; Written by Groepaz/Hitmen <groepaz@gmx.net>
3 ; Cleanup by Ullrich von Bassewitz <uz@cc65.org>
4 ;
5 ; Set the cursor position
6
7         .export         setcursor
8
9         .include        "nes.inc"
10
11 ;-----------------------------------------------------------------------------
12
13 .proc   setcursor
14
15         tya
16         clc
17         adc     addrlo,x
18         sta     SCREEN_PTR
19
20         lda     addrhi,x
21         adc     #0
22         sta     SCREEN_PTR+1
23         rts
24
25         rts
26
27 .endproc
28
29 ;-----------------------------------------------------------------------------
30 ; Tables with screen addresses
31
32 addrlo: .repeat screenrows,line
33         .byte <($2000+((1*32))+(line*charsperline))
34         .endrepeat
35
36 addrhi: .repeat screenrows,line
37         .byte >($2000+((1*32))+(line*charsperline))
38         .endrepeat
39