]> git.sur5r.net Git - cc65/blob - libsrc/geos/conio/gotoxy.s
simple conio support for GEOS
[cc65] / libsrc / geos / conio / gotoxy.s
1
2 ;
3 ; Maciej 'YTM/Elysium' Witkowiak
4 ;
5 ; 27.10.2001
6
7 ; void gotox (unsigned char x);
8 ; void gotoy (unsigned char y);
9 ; void gotoxy (unsigned char x, unsigned char y);
10
11             .export _gotox, _gotoy, _gotoxy
12             .import popa
13
14             .include "../inc/jumptab.inc"
15             .include "cursor.inc"
16
17 _gotox:     sta cursor_x
18             jmp fixcursor
19
20 _gotoy:     sta cursor_y
21             jmp fixcursor
22
23 _gotoxy:    sta cursor_y
24             jsr popa
25             sta cursor_x
26
27 ; convert 8x8 x/y coordinates to GEOS hires
28 fixcursor:
29             ldx #cursor_x
30             ldy #3
31             jsr DShiftLeft
32             asl cursor_y
33             asl cursor_y
34             asl cursor_y
35             rts