]> git.sur5r.net Git - cc65/blob - libsrc/osic1p/gotoxy.s
lseek: Return EINVAL if new position is less than 0 or greater than 2^24 - 1.
[cc65] / libsrc / osic1p / gotoxy.s
1 ;
2 ; copied from CBM implementation
3 ;
4 ; originally by:
5 ; Ullrich von Bassewitz, 06.08.1998
6 ;
7 ; void gotoxy (unsigned char x, unsigned char y);
8 ;
9         .export         gotoxy, _gotoxy
10         .import         popa, plot
11         .include        "extzp.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         jmp     plot            ; Set the cursor position