Mirror of CollapseOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
378B

  1. ; Glue code for the emulated environment
  2. RAMSTART .equ 0x8000
  3. RAMEND .equ 0xffff
  4. ZASM_CODE .equ RAMSTART
  5. ZASM_INPUT .equ 0xa000
  6. ZASM_OUTPUT .equ 0xd000
  7. jr init
  8. init:
  9. di
  10. ld hl, RAMEND
  11. ld sp, hl
  12. ld hl, ZASM_INPUT
  13. ld de, ZASM_OUTPUT
  14. call ZASM_CODE
  15. ; signal the emulator we're done
  16. ; BC contains the number of written bytes
  17. ld a, b
  18. out (c), a
  19. halt
  20. #include "core.asm"