]> git.sur5r.net Git - cc65/blob - libsrc/nes/gotoxy.s
rearranged order of new optimizations to better handle -Oi flag
[cc65] / libsrc / nes / gotoxy.s
1 ;
2 ; Ullrich von Bassewitz, 06.08.1998
3 ;
4 ; void gotoxy (unsigned char x, unsigned char y);
5 ;
6
7         .export         gotoxy, _gotoxy
8         .import         setcursor
9         .import         popa
10
11         .include        "nes.inc"
12
13 gotoxy:
14         jsr     popa            ; Get Y
15
16 _gotoxy:
17         sta     CURS_Y          ; Set Y
18         jsr     popa            ; Get X
19         sta     CURS_X          ; Set X
20         tay
21         ldx     CURS_Y
22         jmp     setcursor       ; Set the cursor position