2019-04-16 16:49:47 -04:00
|
|
|
#include "user.inc"
|
2019-04-16 14:26:45 -04:00
|
|
|
; Glue code for the emulated environment
|
|
|
|
ZASM_INPUT .equ 0xa000
|
|
|
|
ZASM_OUTPUT .equ 0xd000
|
|
|
|
|
2019-04-16 17:00:19 -04:00
|
|
|
jr init ; 2 bytes
|
|
|
|
; *** JUMP TABLE ***
|
|
|
|
jp strncmp
|
|
|
|
jp addDE
|
|
|
|
jp upcase
|
2019-04-30 13:45:31 -04:00
|
|
|
jp unsetZ
|
2019-04-16 17:00:19 -04:00
|
|
|
|
2019-04-16 14:26:45 -04:00
|
|
|
init:
|
|
|
|
di
|
|
|
|
ld hl, RAMEND
|
|
|
|
ld sp, hl
|
|
|
|
ld hl, ZASM_INPUT
|
|
|
|
ld de, ZASM_OUTPUT
|
2019-04-16 16:49:47 -04:00
|
|
|
call USER_CODE
|
2019-04-16 14:26:45 -04:00
|
|
|
; signal the emulator we're done
|
|
|
|
; BC contains the number of written bytes
|
2019-04-17 10:34:30 -04:00
|
|
|
ld a, c
|
|
|
|
ld c, b
|
2019-04-16 14:26:45 -04:00
|
|
|
out (c), a
|
|
|
|
halt
|
|
|
|
|
|
|
|
#include "core.asm"
|