0 Members and 1 Guest are viewing this topic.
#INCLUDE "DWEDIT.INC".org $4000 .db $80,$0F ;Field: Program length .db $00,$00,$00,$00 ;Length=0 (N/A for unsigned apps) .db $80,$12 ;Field: Program type .db $01,$04 ;Type= Shareware, TI-83Plus .db $80,$21 ;Field: App ID .db $01 ;Id = 1 .db $80,$31 ;Field: App Build .db $01 ;Build = 1 .db $80,$48 ;Field: App Name .db "MyNameXX" ;Name must be 8 characters .db $80,$81 ;Field: App Pages .db $02 ;App Pages = 2 <-------------- Simply changing this won't do. .db $80,$90 ;No default splash screen .db $03,$26,$09,$04,$04,$6f,$1b,$80 ;Field: Date stamp- 5/12/1999 .db $02,$0d,$40 ;Dummy encrypted TI date stamp signature .db $a1,$6b,$99,$f6,$59,$bc,$67 .db $f5,$85,$9c,$09,$6c,$0f,$b4,$03,$9b,$c9 .db $03,$32,$2c,$e0,$03,$20,$e3,$2c,$f4,$2d .db $73,$b4,$27,$c4,$a0,$72,$54,$b9,$ea,$7c .db $3b,$aa,$16,$f6,$77,$83,$7a,$ee,$1a,$d4 .db $42,$4c,$6b,$8b,$13,$1f,$bb,$93,$8b,$fc .db $19,$1c,$3c,$ec,$4d,$e5,$75 .db $80,$7F ;Field: Program Image length .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
Wow, that's complex. Thanks for enlightening us/me. That's more knowledge than I ever knew about multi page apps. Thanks Hot Dog!
b_call _RunIndicOff b_call _GrBufClr rest of lines
Suppose you have a label on your second page called Access_Sprite_Data, and you need to call it from your first page. Remember, your first page is called page 0, and your second page is called page 1. The data to tell the calculator about this label should be typed in after your JP statement. However, make sure that this page data starts on a byte that is a multiple of 3--and I would not be the best person to help you with that. If it does not start on a byte that is a multiple of 3, add some .db 0 statements until the data is. We're going to pretend that the data starts on byte 132, which is a multiple of 3.
;Branch table example.org $4000;Header goes here.org $4080 jp Start nop;We're now at $4084, and here will be the branch table;Let's suppose you have a routine called PutSprite on the third page_PutSprite .equ ($-$4000)/3 .dw PutSprite .db 2;And a routine FetchData on the second page_FetchData .equ ($-$4000)/3 .dw FetchData .db 2Start:;At the end of the branch table, your code can start;When you need to run PutSprite, use b_call(_PutSprite);Same for FetchData, for which you use b_call(_FetchData)
LabelOnPage2_Jump .equ ($-$4000)/3 ; LabelOnPage2_Jump is the nickname for LabelOnPage2 .dw LabelOnPage2 ; Name of the label on the other page .db 1 ; 0=page1 and 1=page2 right?
LabelOnPage2_Jump .equ 1*3
nopnopLabelOnPage2:...rest of things
Im curious as to what happens if you have a second page with only data and no actual code?
Hm... How is the assembly source structured and what assembler are you using? That can influence how labels are handled.
JumpToLabelPage2 = $ - $4000 .dw $4000 ; <-- if its the first line of the page, it'd be this. How do I know the offset of labels further down the programm? .db 1;Why is there big empty space down here? Mods?