Omnimaga

Calculator Community => TI Calculators => ASM => Topic started by: ACagliano on July 13, 2011, 08:22:35 pm

Title: App Programming
Post by: ACagliano on July 13, 2011, 08:22:35 pm
I'm a bit confused as to what the standard application header format is. Can anyone help?
Title: Re: App Programming
Post by: thepenguin77 on July 13, 2011, 09:06:02 pm
Well, if you actually want to know what the format is, then check out these two awesome sections I wrote on wikTi. Certificate/Headers (http://wikiti.brandonw.net/index.php?title=83Plus:OS:Certificate/Headers) and Certificate/Header fields (http://wikiti.brandonw.net/index.php?title=Category:83Plus:OS:Certificate/Headers:Fields_By_Number) where you will be most interested in the the $8XX fields.

However, if you are normal, you can just make it with TI's AppHeader Utility (http://education.ti.com/calculators/downloads/US/Software/Download/en/177/6653/appheader.zip) that was found on this page (http://education.ti.com/calculators/downloads/US/Software/Detail?id=177&ref=%2fcalculators%2fdownloads%2fUS%2fSoftware%2fSearch%2fResults%3fcp%3d28).
Title: Re: App Programming
Post by: ACagliano on July 14, 2011, 07:57:09 pm
That is a windows program. I'm using a mac. That is the problem I seem to be having. Very few of the resources actually work on my computer.

Can anyone just tell me what it is, or will it differ?
Title: Re: App Programming
Post by: thepenguin77 on July 14, 2011, 08:02:07 pm
Sure, here you go, just change the name to whatever the name of your app is, and make sure you don't change the total number of bytes. So pad with either 00 or spaces so that the name is 8 bytes long.

If your app is more than one page long, change the bolded byte.


 db 080h, 00Fh
 db 000h, 000h, 000h, 000h
 db 080h, 012h
 db 001h, 004h
 db 080h, 021h
 db 001h
 db 080h, 031h
 db 001h
 db 080h, 048h
 db "zStart", 000h, 000h
 db 080h, 081h
 db 001h
 db 080h, 090h
 db 003h, 026h, 009h, 004h
 db 018h, 034h, 0EEh, 04Eh
 db 002h, 00Dh, 040h, 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
 db 080h, 07Fh
 db 000h, 000h, 000h, 000h
 db 000h, 000h, 000h, 000h
 db 000h, 000h, 000h, 000h
 db 000h, 000h, 000h, 000h
 db 000h, 000h, 000h, 000h
Title: Re: App Programming
Post by: ACagliano on July 14, 2011, 08:10:59 pm
Other than that, just copy and paste, right? Where does that go? Do I open with the standard asm header?
Title: Re: App Programming
Post by: thepenguin77 on July 14, 2011, 08:15:37 pm
No, that goes right at the very start. Your header will look like this:

Code: [Select]
.nolist
#include "ti83plus.inc"
.list
.org $4000

;app header
;
;
;
;
;header end

bcall(_clrLCDFull)
;etc...

Edit:
    That doesn't have to be bcall(_clrLCDFull)
Title: Re: App Programming
Post by: ACagliano on July 14, 2011, 08:18:35 pm
fair enough. Now, question. Let's say you have the .db $001 for one page, and compile and you go onto two pages. Will the compiler throw an error? Or will u just royally screw up the calcs of your beta testers?

Edit: Why is it 3 digits in the .db's? Does it need to be that way in data too, or just for the header?
Title: Re: App Programming
Post by: ztrumpet on July 14, 2011, 09:28:51 pm
Edit: Why is it 3 digits in the .db's? Does it need to be that way in data too, or just for the header?
I'm going to guess that that's how TI originally wrote it, even though it doesn't make sense.
Title: Re: App Programming
Post by: calc84maniac on July 14, 2011, 09:29:21 pm
Edit: Why is it 3 digits in the .db's? Does it need to be that way in data too, or just for the header?
If you're using the h suffix to define hexadecimal values, the first character must be a digit. Thus you have to put a 0 behind all values $A0 to $FF, and you might as well do it with $00-$9F too, for consistency.
Title: Re: App Programming
Post by: ztrumpet on July 14, 2011, 09:31:02 pm
Edit: Why is it 3 digits in the .db's? Does it need to be that way in data too, or just for the header?
If you're using the h suffix to define hexadecimal values, the first character must be a digit. Thus you have to put a 0 behind all values $A0 to $FF, and you might as well do it with $00-$9F too, for consistency.
So why isn't it written with '$' ?
Title: Re: App Programming
Post by: calc84maniac on July 14, 2011, 09:34:35 pm
Edit: Why is it 3 digits in the .db's? Does it need to be that way in data too, or just for the header?
If you're using the h suffix to define hexadecimal values, the first character must be a digit. Thus you have to put a 0 behind all values $A0 to $FF, and you might as well do it with $00-$9F too, for consistency.
So why isn't it written with '$' ?
It's a stylistic choice. I personally prefer $. And I think some assemblers (ZDS perhaps?) don't support $-style hex.
Title: Re: App Programming
Post by: ztrumpet on July 14, 2011, 09:35:12 pm
Alright. :)
Interesting.  Thanks for the info. :D