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