Hi guys, i noticed around there isn't any info on how to make bloadable bin (floppy), using sdcc / sdasz80
After working hard on it, i could create a functional custom crt0.s header and i would like to share it on the web, hoping this will bring more info to make easier msx development in C.
This is the crt0dsk.s code
; BLOADABLE .BIN HEADER (floppy disk) .globl _main .area _HEADER (ABS) .org 0x8000 .db 0xfe .dw init .dw _end .dw init init: jp _main .area _GSFINIAL _end: halt
And this is my bash script for linux
#!/bin/sh rm -f myhello.rom rm -f *.bin rm -f *.rel rm -f *.sym rm -f *.mem rm -f 16kmem.* rm -f *.ihx rm -f *.lst rm -f *.map rm -f *.noi rm -f *.asm rm -f *.lk sdasz80 -o io.s sdasz80 -o crt0dsk.s sdcc -I include/ -mz80 -c -o conio.rel conio.c sdcc -I include/ --out-fmt-ihx --data-loc 0xc000 --code-loc 0x8020 -mz80 --no-std-crt0 crt0dsk.rel io.rel conio.rel main.c objcopy -Iihex -Obinary main.ihx myhello.bin
I hope this example will be useful for all.
Entrar ou registrar-se para comentar