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.

42 lines
726B

  1. ; classic RC2014 setup (8K ROM + 32K RAM) and a stock Serial I/O module
  2. ; The RAM module is selected on A15, so it has the range 0x8000-0xffff
  3. .equ RAMSTART 0x8000
  4. .equ RAMEND 0xffff
  5. .equ ACIA_CTL 0x80 ; Control and status. RS off.
  6. .equ ACIA_IO 0x81 ; Transmit. RS on.
  7. jp init
  8. ; interrupt hook
  9. .fill 0x38-$
  10. jp aciaInt
  11. #include "err.h"
  12. #include "core.asm"
  13. #include "parse.asm"
  14. .equ ACIA_RAMSTART RAMSTART
  15. #include "acia.asm"
  16. .equ STDIO_RAMSTART ACIA_RAMEND
  17. #include "stdio.asm"
  18. .equ SHELL_RAMSTART STDIO_RAMEND
  19. .equ SHELL_EXTRA_CMD_COUNT 0
  20. #include "shell.asm"
  21. init:
  22. di
  23. ; setup stack
  24. ld hl, RAMEND
  25. ld sp, hl
  26. im 1
  27. call aciaInit
  28. ld hl, aciaGetC
  29. ld de, aciaPutC
  30. call stdioInit
  31. call shellInit
  32. ei
  33. jp shellLoop