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
|
|
|
|
|
|
|
|
jr init
|
|
|
|
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
|
|
|
|
ld a, b
|
|
|
|
out (c), a
|
|
|
|
halt
|
|
|
|
|
|
|
|
#include "core.asm"
|