2003-05-02 15:00:45 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 06.08.1998
|
|
|
|
;
|
|
|
|
; void gotoxy (unsigned char x, unsigned char y);
|
|
|
|
;
|
|
|
|
|
2016-06-05 12:58:38 +00:00
|
|
|
.export gotoxy, _gotoxy
|
2003-05-02 15:00:45 +00:00
|
|
|
.import setcursor
|
2013-05-09 11:56:54 +00:00
|
|
|
.import popa
|
2003-05-02 15:00:45 +00:00
|
|
|
|
|
|
|
.include "nes.inc"
|
|
|
|
|
2016-06-05 12:58:38 +00:00
|
|
|
gotoxy:
|
|
|
|
jsr popa ; Get Y
|
2003-05-02 15:00:45 +00:00
|
|
|
|
2016-06-05 12:58:38 +00:00
|
|
|
_gotoxy:
|
2013-05-09 11:56:54 +00:00
|
|
|
sta CURS_Y ; Set Y
|
|
|
|
jsr popa ; Get X
|
|
|
|
sta CURS_X ; Set X
|
2003-05-02 15:00:45 +00:00
|
|
|
tay
|
|
|
|
ldx CURS_Y
|
2013-05-09 11:56:54 +00:00
|
|
|
jmp setcursor ; Set the cursor position
|