1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-09-07 11:58:56 +10:00
collapseos/apps/zasm/emul/glue.asm
Virgil Dupras 88cee235b1 zasm: have a whole kernel in emulation instead of a simple wrapper
zasm is going to need to call to kernel code...
2019-04-16 14:26:45 -04:00

23 lines
378 B
NASM

; Glue code for the emulated environment
RAMSTART .equ 0x8000
RAMEND .equ 0xffff
ZASM_CODE .equ RAMSTART
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
call ZASM_CODE
; signal the emulator we're done
; BC contains the number of written bytes
ld a, b
out (c), a
halt
#include "core.asm"