0 Members and 3 Guests are viewing this topic.
LD HL, $0006 LD (CurRow), HL LD HL, Sometext b_call _PutS
#INCLUDE "DWEDIT.INC"#IFDEF APP.org $4000#IFNDEF NOAPPHEADER;This is the application header definition area required for all apps. .db 080h,0Fh ;Field: Program length .db 00h,00h,00h,00h ;Length=0 (N/A for unsigned apps) .db 080h,012h ;Field: Program type #ifdef TI73 .db 01h, 02h ;type=Shareware, TI-73 #else .db 01h,04h ;Type= Shareware, TI-83Plus #endif .db 080h,021h ;Field: App ID .db 01h ;Id = 1 .db 080h,031h ;Field: App Build .db 01h ;Build = 1 .db 080h,048h ;Field: App Name .db "CalcHero" .db 080h,081h ;Field: App Pages .db 1 .db 080h,090h ;No default splash screen .db 03h,026h ,09h,04h, 04h,06fh,01bh,80h ;Field: Date stamp- 5/12/1999 .db 02h,0dh,040h ;Dummy encrypted TI date stamp signature .db 0a1h ,06bh ,099h ,0f6h ,059h ,0bch ,067h .db 0f5h ,085h ,09ch ,09h ,06ch ,0fh ,0b4h ,03h ,09bh ,0c9h .db 03h ,032h ,02ch ,0e0h ,03h ,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 80h,7Fh ;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#ENDIF#ENDIF
LD A, 46 ; Random number LD (ypos), A LD A, 27 ; another Random number LD (xpos), A LD B, 18 ; Length of sprite in Y direction LD DE, (ypos) LD IX, Sprite ; Label of the sprite CALL ShowspriteShowsprite: ; Show Sprite (XOR) CALL ClipSprXOR b_call _GrBufCpy retClipSprXOR: ; Show Sprite XOR LD A, %11111111 LD (clip_mask), A LD A, E OR A JP M, ClipTop SUB 64 RET NC NEG CP B JR NC, VertClipDone LD B, A JR VertClipDoneClipTop: LD A, B NEG SUB E RET NC PUSH AF ADD A, B LD E, 0 LD B, E LD C, A ADD IX, BC POP AF NEG LD B, AVertClipDone: LD C, 0 LD A, D CP -7 JR NC, ClipLeft CP 96 RET NC CP 89 JR C, HorizClipDoneClipRight: AND 7 LD C, A LD A, %11111111FindRightMask: ADD A, A DEC C JR NZ, FindRightMask LD (clip_mask), A LD A, D JR HorizClipDoneClipLeft: AND 7 LD C, A LD A, %11111111FindLeftMask: ADD A, A DEC C JR NZ, FindLeftMask CPL LD (clip_mask), A LD A, D ADD A, 96 LD C, 12HorizClipDone: LD H, 0 LD D, H LD L, E ADD HL, HL ADD HL, DE ADD HL, HL ADD HL, HL LD E, A SRL E SRL E SRL E ADD HL, DE LD DE, PlotSScreen ADD HL, DE LD D, 0 LD E, C SBC HL, DE AND 7 JR Z, _Aligned LD C, A LD DE, 11_RowLoop: PUSH BC LD B, C LD A, (clip_mask) AND (IX) LD C, 0_ShiftLoop: SRL A RR C DJNZ _ShiftLoop XOR (HL) LD (HL), A INC HL LD A, C XOR (HL) LD (HL), A ADD HL, DE INC IX POP BC DJNZ _RowLoop RET_Aligned: LD DE, 12_PutLoop: LD A, (IX) XOR (HL) LD (HL), A INC IX ADD HL, DE DJNZ _PutLoop RET
app_PutS: ld a,(hl) inc hl or a ret z b_call _PutC jr app_PutS
When you do a Bcall, the address you are giving on your app page will be pointing to random OS data instead. What most APP developers do is write their own _PutS routine like this:
Well, your app page is mapped in at addresses $4000-$7fff. When you do a Bcall, the OS page with the routine is temporarily put there, so the data pointed to by HL will no longer be your text. That's why it works if you read your text data and display each character manually, since the OS will not be trying to read data from your APP.
I start to get it...Though I still don't understand how your posted code can help.What do I do in order to show sprited/text the right way?I don't know what to do with the code you gave me, sorry :C
Instead of using: bcall _PutSuse: call app_PutSand include the calcmaniac84 routine in the source code, of course.
Quote from: Galandros on May 24, 2010, 02:53:28 pmInstead of using: bcall _PutSuse: call app_PutSand include the calcmaniac84 routine in the source code, of course.I'll try, thanks alot.Oh, where can I find that source code of calcmaniac?Been googling without result so far...Meh, I'll keep searching.
Replaced all the "b_call_PutS" with "call app_PutS" and included the small routine, but it's still messed up.It does show the text now, though its in large font, and no where near where I want it.Also, I can't applie it to sprites I'm probably doing something wrong, but what's the normal way to display sprites/small text in an app where I want when I want?Works when I use TASM to assemble and run it, but in an app its all still random junk on the screen, QQ.
LD BC, ______ ; _____ is the length of your string in characters, INCLUDING the zero at the end
Quote from: Hot_Dog on May 27, 2010, 01:43:10 pm LD BC, ______ ; _____ is the length of your string in characters, INCLUDING the zero at the endI'll try, but you mean I load the number in BC that contains the number of characters +1?So "Hello World!" would be LD BC, 13?