gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
gbdk-lib/libc/targets/z80/gg/___sdcc_bcall_ehl.s
1 .include "global.s"
2
3 .area _CODE
4
5 .globl ___sdcc_bcall_ehl
6
7 ;
8 ; default trampoline to call banked functions
9 ; Usage:
10 ; ld e, #<function_bank>
11 ; ld hl, #<function>
12 ; call ___sdcc_bcall_ehl
13 ;
14 ___sdcc_bcall_ehl::
15 ld a, (#.MAP_FRAME1)
16 push af
17 inc sp
18 ld a, e
19 ld (#.MAP_FRAME1), a
20 CALL_HL
21 dec sp
22 pop bc
23 ld c, a
24 ld a, b
25 ld (#.MAP_FRAME1), a
26 ld a, c
27 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.