[A83] Re: Free App signing key
[Prev][Next][Index][Thread]
[A83] Re: Free App signing key
There are few, but important differences when converting programs to apps.
First, b_call(_puts) and _vputs won't work. Technical explanation: when you
call these routines, the ROM page they are on is swapped in, so your app
isn't hence, the pointer in HL to the string isn't pointing to your string
anymore. So, you put the routines in your app. This is what I use:
putstr:
push bc
push af
ld a,(WinBtm)
ld b,a
putstr10:
ld a,(hl)
inc hl
or a
scf
jr z,putstr20
bcall(_putc)
ld a,(currow)
cp b
jr c,putstr10
putstr20:
pop bc
ld a,b
pop bc
ret
vputstr:
push af
push de
push ix
vputstr10:
ld a,(hl)
inc hl
or a
jr z,vputstr20
bcall(_vputmap)
jr nc,vputstr10
vputstr20:
pop ix
pop de
pop af
ret
Now you can call putstr, or call vputstr. Also, you cannot exit an app with
'ret'. You need to B_JUMP(_jforcecmdnochar).
The most important part of an app is the header. Below is a sample header
(with .org statement also). Nicely commented.
.org $4000
;Field: Program length
.db 080h,0Fh
;Length=0 (N/A for unsigned apps)
.db 00h,00h,00h,00h
;Field: Program type
.db 080h,012h
;Type = Freeware, 0104
.db $01,$04
;Field: App ID
.db 080h,021h
;Id = 1
.db 01h
;Field: App Build
.db 080h,031h
;Build = 1
.db 01h
;Field: App Name
.db 080h,048h
;App Name = PUT YOUR APP NAME HERE
.db "X-Link "
;Field: App Pages
.db 080h,081h
;App Pages = 1
.db 01h
;No default splash screen
.db 080h,090h
;Field: Date stamp - 5/12/1999
.db 003h,026h,009h,004h,004h,06fh,01bh,080h
;Dummy encrypted TI date stamp signature
.db 002h ,00dh ,040h
.db 0a1h ,06bh ,099h ,0f6h ,059h ,0bch ,067h
.db 0f5h ,085h ,09ch ,009h ,06ch ,00fh ,0b4h ,003h ,09bh ,0c9h
.db 003h ,032h ,02ch ,0e0h ,003h ,020h ,0e3h ,02ch ,0f4h ,02dh
.db 073h ,0b4h ,027h ,0c4h ,0a0h ,072h ,054h ,0b9h ,0eah ,07ch
.db 03bh ,0aah ,016h ,0f6h ,077h ,083h ,07ah ,0eeh ,01ah ,0d4h
.db 042h ,04ch ,06bh ,08bh ,013h ,01fh ,0bbh ,093h ,08bh ,0fch
.db 019h ,01ch ,03ch ,0ech ,04dh ,0e5h ,075h
;Field: Program Image length
.db 80h,7Fh
.db 0,0,0,0 ;Length=0, N/A
.db 0,0,0,0 ;Reserved
.db 0,0,0,0 ;Reserved
.db 0,0,0,0 ;Reserved
.db 0,0,0,0 ;Reserved
Note for the APPNAME part, your name must be =8 characters. If shorter, pad
with spaces to =8.
I hope this helps. I'll be happy to provide any more info you need.
--
Michael Vincent
Detached Solutions - www.detacheds.com
--
Senior Vice-President/Chief Software Architect
Radical Software - www.radicalsoft.org
----- Original Message -----
From: "Hyperbyte" <hyper@hysoft-automation.com>
To: <assembly-83@lists.ticalc.org>
Sent: Wednesday, June 20, 2001 1:48 PM
Subject: [A83] Free App signing key
>
> Well, it seems Ti found out what we knew from the start:
> There is no profit in selling educational signings for $100 :-)
>
> Perhaps some of us who have expierience with programming APPS, can give us
all a tutorial on how to convert our existing programs to apps.
>
> Problem:
>
> Now that everyone who wants to can create an app, it might give some
problems
> with user-space if everyone converts his 2k program to an application
without
> taking full advantage of the 16kb memory.
> It might be an idea to set some guidelines (not rules!) about when to make
> something an app or not...
> Any expert ideas?
>
>
> --Peter Martijn
>
>
References: