dev: fixed assembly errors, added linker script and Makefile

Additionally created a .gitignore to avoid committing object
code and output formats
This commit is contained in:
A.M. Rowsell 2025-12-20 15:45:51 -05:00
commit f753eb9642
Signed by: amr
GPG key ID: E0879EDBDB0CA7B1
5 changed files with 372 additions and 246 deletions

16
.gitignore vendored Normal file
View file

@ -0,0 +1,16 @@
# Created by https://www.toptal.com/developers/gitignore/api/assembler
# Edit at https://www.toptal.com/developers/gitignore?templates=assembler
### Assembler ###
*.exe
*.o
*.obj
*.bc
# Output
*.hex
*.srec
*.s19
*.elf
# End of https://www.toptal.com/developers/gitignore/api/assembler

21
Makefile Normal file
View file

@ -0,0 +1,21 @@
ASM=vasm_z80_std
LINK=vlink
ASMFLAGS=-Fvobj
LINKFLAGS=-b ihex -T linker.cmd
all: float.hex
float.o: float.asm
$(ASM) $(ASMFLAGS) -o $@ $<
printChar.o: printChar.asm
$(ASM) $(ASMFLAGS) -o $@ $<
float.hex: float.o printChar.o linker.cmd
$(LINK) $(LINKFLAGS) -o $@ float.o printChar.o
clean:
rm -f float.o printChar.o float.hex
.PHONY: all clean

571
float.asm

File diff suppressed because it is too large Load diff

6
linker.cmd Normal file
View file

@ -0,0 +1,6 @@
SECTIONS
{
.text 0xE000 : { *(.text) }
.data 0x7000 : { *(.data) }
.bss : { *(.bss) }
}

4
printChar.asm Normal file
View file

@ -0,0 +1,4 @@
; Stub printChar: does nothing
.global printChar
printChar:
ret