Page 1 of 2

[TI ASM] Display text on the homescreen

Posted: Sat 18 Dec, 2004 7:15 am
by kalan_vod
hi i get a problem when i display text on the homescreen.
it displays it correctly the first time then when i restart the game
or go into pause the text isnt displayed where i set it to be which is 0.
heres the code. any help will be appreciated :P ty

code:

Main_Menu:
b_call(_ClrLCDFull)
LD HL, 0
ld (PenCol),hl
ld hl,mmstr
b_call(_PutS)
KeyloopMM:
b_call(_GetKey)
cp k1 ;(1)
jr z,show
cp k2 ;(2)
jr z,quit
cp k3 ;(3)
jr z,quit
jr nz,keyloopmm

this is the string
mmstr:
.db " Phoenix Ripoff 1)Play 2)Info 3)Quit",0

like i said before it displays it fine at first then if i restart the game it displays it like half way down the screen
thanks
-kalan

Posted: Sat 18 Dec, 2004 7:50 am
by blueskies
correct me if I'm wrong, but doesn't _puts look for CURROW and CURCOL for it's coordinate? So loading $0000 into CURROW and calling _puts will put your text at (0,0).

yep

Posted: Sat 18 Dec, 2004 8:39 am
by the_unknown_one
Indeed, do what blueskies said and it should work

Posted: Sat 18 Dec, 2004 12:56 pm
by kms375
Indeed. You storing the location to the wrong place. PenCol is for the graph screen(which is used by VPutS). CurCol is for the Homescreen (which is used by PutS).

change

Code: Select all

 ld (PenCol),hl 
to

Code: Select all

 ld (CurCol),hl 
and it should work.

Posted: Sat 18 Dec, 2004 5:07 pm
by kalan_vod
cool thanks, i am new to asm hehe thanks

p.s. whats a good bat file to use to compile programs?
the code for the bat?
thanks
-kalan

Posted: Sat 18 Dec, 2004 6:38 pm
by koolmansam375
download Ion from ticalc. It comes with the batch file you should use. DevPac8x comes with an updated one for compiling 83+ programs.

Posted: Sun 19 Dec, 2004 8:42 pm
by kv83
I changed your topic title. This will make it more clear to everyone what your question is about, before opening the topic :)

Posted: Mon 20 Dec, 2004 9:17 pm
by Kalimero
kms375 wrote:change

Code: Select all

 ld (PenCol),hl 
to

Code: Select all

 ld (CurCol),hl 
and it should work.
That should be currow instead of curcol. Ti has never been really consistent. It's

currow
curcol

and

pencol
penrow

If you load HL into currow, L will go in currow and H in curcol.
If you load HL into pencol, L will go in pencol and H penrow.
Loading HL into curcol, will put L in curcol and H in the byte after that, which contains some other system data, you probably don't want to overwrite.

Posted: Mon 20 Dec, 2004 11:37 pm
by kalan_vod
ok when i use putsprite from ion it will compile and come up with like 88 errors and just wont work.
i think it may be the bat or wat? i load into ix and use the call maybe something i did wrong?
thax
-kalan

ps. whats the difference form jr z,show // jp z,show
and also using nz in jr nz,show // jp nz,show

Posted: Tue 21 Dec, 2004 2:17 am
by CalcKing
Take a look at this for the differences between jp and jr.

As for the errors with putsprite, it would be helpful if you were more specific. :)

Posted: Tue 21 Dec, 2004 2:24 am
by kalan_vod
as in if i call ionfastcopy or ant call from ion.inc
i get close to 100 errors and the errors point to ion.inc....:(
lolz i dont know helP? :shock:
thx
also so jp is faster and works with bigger numbers? :P

Posted: Tue 21 Dec, 2004 2:32 am
by CalcKing
I have experienced similar errors when assembling for Ion, though I can't remember exactly what I did to fix them. I can say that it is probably a problem with the conditionals for 83/83+ label definitions.

Posted: Tue 21 Dec, 2004 2:59 am
by kalan_vod
ok thx and also is there a way to make it were i could make a varible and be able to use it in the tios or a basic program :?: like i use a asm program to move around and then when it triggers an action it would save the x and y pos of the sprite?

hehe hope i made it clear :P
thx

Posted: Tue 21 Dec, 2004 9:19 am
by Kozak
You can store values in existing TI-OS variables like Ans, A, B....Z etc. I think it's in asmin28days aswell.

[TI ASM] Display text on the homescreen

Posted: Sat 01 Jan, 2005 5:32 pm
by lloydkirk1989
koolmansam375 wrote:download Ion from ticalc. It comes with the batch file you should use. DevPac8x comes with an updated one for compiling 83+ programs.
Use this batch file.

Code: Select all

@echo off
echo ==== Now assembling %1.z80 for the TI-83 Plus ====
tasm -80 -i -b %1.z80 %1.bin
if errorlevel 1 goto ERRORS
rem This is necessary because of a DevPac8x bug
devpac8x %1
echo ==== Job finished. Program saved as %1.8xp ====
goto DONE
~Note~ Why would anyone want to compile an 83+ game for Ion?????
Its not as convenient or nearly as reliable as MirageOS.