]> git.sur5r.net Git - cc65/blob - libsrc/pce/gotoxy.s
Saved 2 bytes and fixed error in case of negative result.
[cc65] / libsrc / pce / gotoxy.s
1 ;
2 ; void __fastcall__ gotoxy (unsigned char x, unsigned char y);
3 ;
4
5         .export         gotoxy, _gotoxy
6
7         .import         popa, plot
8
9         .include        "pce.inc"
10         .include        "extzp.inc"
11
12 gotoxy:
13         jsr     popa            ; Get Y
14
15 _gotoxy:
16         sta     CURS_Y          ; Set Y
17         jsr     popa            ; Get X
18         sta     CURS_X          ; Set X
19         jmp     plot            ; Set the cursor position