From 3b2f2ea6c6fbfcb23ea9ab324c83d602d45a8820 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Thu, 9 Nov 2017 13:17:35 +0100 Subject: Update makefile, and bug fix in pio driver and usart --- sw/z80/tests/usart/crt0.s | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 sw/z80/tests/usart/crt0.s (limited to 'sw/z80/tests/usart/crt0.s') diff --git a/sw/z80/tests/usart/crt0.s b/sw/z80/tests/usart/crt0.s new file mode 100644 index 0000000..c900065 --- /dev/null +++ b/sw/z80/tests/usart/crt0.s @@ -0,0 +1,38 @@ + .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 + .area _INITIALIZER + .area _GSINIT + .area _GSFINAL + + .area _DATA + .area _INITIALIZED + .area _BSEG + .area _BSS + .area _HEAP -- cgit v1.2.1