I have a tios_crt0.s file, This is used for linking when compiling c code on the TI-84+ (non-ce). It goes like this:
Code:
My issue is I'm trying to change it for compiling flash apps instead of asm programs. I found a form topic about a working header for making flash apps here but not sure how to combine them. This is the non-working file I have so far:
Code:
However, it crashes the emulator when I upload it and rabbitsign gives me these warnings:
Code:
If anybody can help me it would be greatly appreciated, I'm not too experienced with z80 asm and sdcc's z80 assembler is different in some ways from spasm. If it helps I'm using this
Code:
to sign the app with this bin generated from sdcc that would normally be packed with binpac8x.
Code:
; tios_crt0.s - TIOS assembly program header
.module crt
.globl _main
.area _HEADER (ABS)
.org #0x9D93
.dw #0x6DBB
call gsinit
jp _main
.org 0x9d9b ;9d9b
.area _HOME
.area _CODE
.area _GSINIT
.area _GSFINAL
.area _DATA
.area _BSEG
.area _BSS
.area _HEAP
.area _CODE
;; Twice ???
__clock::
ld a,#2
ret ; needed somewhere...
.area _GSINIT
gsinit::
.area _GSFINAL
ret
My issue is I'm trying to change it for compiling flash apps instead of asm programs. I found a form topic about a working header for making flash apps here but not sure how to combine them. This is the non-working file I have so far:
Code:
.module crt
.globl _main
.area _HEADER (ABS)
.org #0x4000
.db 0x80, 0x0F, 0, 0, 0, 0
; Name. While this is a variable-length field (0x40 | length for the second byte),
; spasm requires that names always be 8 characters. See
; https://github.com/alberthdev/spasm-ng/issues/53
.db 0x80, 0x48
.ascii "nop "
; Disable TI splash screen.
.db 0x80, 0x90
; Pages
.db 0x80, 0x81, 1
; Signing Key ID
.db 0x80, 0x12, 1, 4 ; or 15 for the TI-84+CSE
; Date stamp. Apparently, the calculator doesn't mind if you put
; nothing in this.
.db 0x03220900
; Date stamp signature. Since nothing ever checks this, there's no
; reason ever to update it. Or even have data in it.
.db 0x0200
; Final field
.db 0x8070
call gsinit
jp _main
.area _HOME
.area _CODE
.area _GSINIT
.area _GSFINAL
.area _DATA
.area _BSEG
.area _BSS
.area _HEAP
.area _CODE
;; Twice ???
__clock::
ld a,#2
ret ; needed somewhere...
.area _GSINIT
gsinit::
.area _GSFINAL
ret
However, it crashes the emulator when I upload it and rabbitsign gives me these warnings:
Code:
rapp.bin: warning: application has an incorrect page count (actual: 2)
rapp.bin: warning: application has no date stamp
rapp.bin: warning: application has no program image field
If anybody can help me it would be greatly appreciated, I'm not too experienced with z80 asm and sdcc's z80 assembler is different in some ways from spasm. If it helps I'm using this
Code:
rabbitsign -t 8xk -g -f app.bin