]> git.sur5r.net Git - cc65/blob - libsrc/nes/setcursor.s
Fix ftell() on Apple II to return the correct value.
[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 .endproc
26
27 ;-----------------------------------------------------------------------------
28 ; Tables with screen addresses
29
30 addrlo: .repeat screenrows,line
31         .byte <($2000+((1*32))+(line*charsperline))
32         .endrepeat
33
34 addrhi: .repeat screenrows,line
35         .byte >($2000+((1*32))+(line*charsperline))
36         .endrepeat
37