diff options
author | Nao Pross <naopross@thearcway.org> | 2017-09-07 14:27:14 +0200 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2017-09-07 14:27:14 +0200 |
commit | 26b68ceb8ec5ccad999a436c7d594d1df3398f04 (patch) | |
tree | cd08864a651d5648f47b1628e3512e5d8457ab3c | |
parent | minor bug fix for ROM programmer (diff) | |
download | z80uPC-26b68ceb8ec5ccad999a436c7d594d1df3398f04.tar.gz z80uPC-26b68ceb8ec5ccad999a436c7d594d1df3398f04.zip |
z80_test cleanup and makefile corrections
-rw-r--r-- | sw/z80_test/crt0.rel | 86 | ||||
-rw-r--r-- | sw/z80_test/main.c | 8 | ||||
-rw-r--r-- | sw/z80_test/makefile | 12 |
3 files changed, 13 insertions, 93 deletions
diff --git a/sw/z80_test/crt0.rel b/sw/z80_test/crt0.rel deleted file mode 100644 index 809c0e6..0000000 --- a/sw/z80_test/crt0.rel +++ /dev/null @@ -1,86 +0,0 @@ -XL2 -H 14 areas 5 global symbols -M crt0 -S _main Ref0000 -S .__.ABS. Def0000 -A _CODE size A flags 0 addr 0 -S __clock Def0000 -S _exit Def0004 -A _HEADER size 0 flags 8 addr 0 -A _HEADER0 size 3 flags 8 addr 0 -A _HEADER1 size 2 flags 8 addr 8 -A _HEADER2 size 2 flags 8 addr 10 -A _HEADER3 size 2 flags 8 addr 18 -A _HEADER4 size 2 flags 8 addr 20 -A _HEADER5 size 2 flags 8 addr 28 -A _HEADER6 size 2 flags 8 addr 30 -A _HEADER7 size 2 flags 8 addr 38 -A _HEADER8 size C flags 8 addr 100 -A _HOME size 0 flags 0 addr 0 -A _INITIALIZER size 0 flags 0 addr 0 -A _GSINIT size 6 flags 0 addr 0 -S gsinit Def0000 -A _GSFINAL size 1 flags 0 addr 0 -A _DATA size 0 flags 0 addr 0 -A _INITIALIZED size 0 flags 0 addr 0 -A _BSEG size 0 flags 0 addr 0 -A _BSS size 0 flags 0 addr 0 -A _HEAP size 0 flags 0 addr 0 -T 00 00 -R 00 00 02 00 -T 00 00 C3 00 01 -R 00 00 02 00 00 03 0A 00 -T 08 00 -R 00 00 03 00 -T 08 00 ED 4D -R 00 00 03 00 -T 10 00 -R 00 00 04 00 -T 10 00 ED 4D -R 00 00 04 00 -T 18 00 -R 00 00 05 00 -T 18 00 ED 4D -R 00 00 05 00 -T 20 00 -R 00 00 06 00 -T 20 00 ED 4D -R 00 00 06 00 -T 28 00 -R 00 00 07 00 -T 28 00 ED 4D -R 00 00 07 00 -T 30 00 -R 00 00 08 00 -T 30 00 ED 4D -R 00 00 08 00 -T 38 00 -R 00 00 09 00 -T 38 00 ED 4D -R 00 00 09 00 -T 00 01 -R 00 00 0A 00 -T 00 01 -R 00 00 0A 00 -T 00 01 31 FF FF CD 00 00 CD 00 00 C3 04 00 -R 00 00 0A 00 00 06 0D 00 02 09 00 00 00 0C 00 00 -T 00 00 -R 00 00 00 00 -T 00 00 3E 02 CF C9 -R 00 00 00 00 -T 04 00 -R 00 00 00 00 -T 04 00 3E 00 CF -R 00 00 00 00 -T 07 00 -R 00 00 00 00 -T 07 00 76 18 FD -R 00 00 00 00 -T 00 00 -R 00 00 0D 00 -T 00 00 78 B1 28 02 ED B0 -R 00 00 0D 00 -T 06 00 -R 00 00 0D 00 -T 00 00 C9 -R 00 00 0E 00 diff --git a/sw/z80_test/main.c b/sw/z80_test/main.c index a90cd92..d2e1d8e 100644 --- a/sw/z80_test/main.c +++ b/sw/z80_test/main.c @@ -2,6 +2,10 @@ void main(void) { - usart_init(USART_BAUDRATE_9600, USART_PARITY_EVEN, USART_STOP_BITS_1); - usart_write("Hello, World!", 13); + usart_init(USART_BAUDRATE_1200, USART_PARITY_EVEN, USART_STOP_BITS_1); + usart_write("Hello, World!\n", 13); + + while(1) { + usart_write("done\n", 5); + } } diff --git a/sw/z80_test/makefile b/sw/z80_test/makefile index f718044..6f054ae 100644 --- a/sw/z80_test/makefile +++ b/sw/z80_test/makefile @@ -18,9 +18,9 @@ CFLAGS := -mz80 \ -I . \ -DDEBUG -LDFLAGS := -mz80 --no-std-crt0 crt0.rel \ +LDFLAGS := -mz80 --no-std-crt0 build/crt0.rel \ --std-c89 -pedantic \ - --code-loc 0x0800 --data-loc 0x8000 + --code-loc 0x0800 --data-loc 0x2000 .PHONY: dirs dis clean all: $(BINARY) @@ -29,14 +29,16 @@ all: $(BINARY) $(BINARY): $(OBJECTS) dirs $(CC) $(LDFLAGS) $(OBJECTS) -o $(HEXFILE) @# xxd -r -p $(HEXFILE) $(BINARY) - makebin -s 16384 $(HEXFILE) $(BINARY) + @# makebin -s 16384 $(HEXFILE) $(BINARY) + makebin -s 8192 $(HEXFILE) $(BINARY) -$(OBJECTS): build/%.rel : %.c $(CSOURCES) dirs crt0.rel +$(OBJECTS): build/%.rel : %.c $(CSOURCES) dirs build/crt0.rel @printf "\n" $(CC) $(CFLAGS) -c $< -o $@ -crt0.rel: crt0.s +build/crt0.rel: crt0.s sdasz80 -o $< + @mv crt0.rel build/ dirs: mkdir -p build |