From 43be150dc6e84f6f6eeb071cd3cdb7fc21125d60 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Tue, 30 Oct 2018 11:41:24 +0100 Subject: Move sw to sw-old and hw to hw-altium, add kicad files --- sw-old/z80/tests/asm/main.s | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sw-old/z80/tests/asm/main.s (limited to 'sw-old/z80/tests/asm/main.s') diff --git a/sw-old/z80/tests/asm/main.s b/sw-old/z80/tests/asm/main.s new file mode 100644 index 0000000..8cf4df0 --- /dev/null +++ b/sw-old/z80/tests/asm/main.s @@ -0,0 +1,40 @@ + .module crt0 + .area _HEADER (ABS) + +;; Reset vectors + .org 0 + jp init + + .org 0x38 ; the instruction 0xff (not written) resets to this location + jp init + +;; main code + .org 0x100 + .globl _main + +init: + ;; Set stack pointer directly above top of memory. + ld sp,#0xffff + + ;; Start of the program + call _main + jp _exit + +_exit: + halt + ; jp _exit + +;; Ordering of segments for the linker. + .area _HOME + .area _CODE +_main: + ret + .area _INITIALIZER + .area _GSINIT + .area _GSFINAL + + .area _DATA + .area _INITIALIZED + .area _BSEG + .area _BSS + .area _HEAP -- cgit v1.2.1