gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
gbdk-lib/libc/targets/z80/gotoxy.s
1 .include "global.s"
2
3 .title "console utilities"
4 .module ConsoleUtils
5
6 .globl .curx, .cury
7
8 .area _HOME
9
10 _gotoxy::
11 pop hl
12 pop de
13 push de
14 push hl
15
16 ld a, #.SCREEN_X_OFS
17 add e
18 ld (.curx), a
19 ld a, #.SCREEN_Y_OFS
20 add d
21 ld (.cury), a
22 ret
23
24 _posx::
25 ld a, (.curx)
26 sub #.SCREEN_X_OFS
27 ld l, a
28 ret
29
30 _posy::
31 ld a, (.cury)
32 sub #.SCREEN_Y_OFS
33 ld l, a
34 ret
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.