[TI ASM] Display text on the homescreen
Moderator: MaxCoderz Staff
[TI ASM] Display text on the homescreen
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 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
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 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
-
- Calc Master
- Posts: 1089
- Joined: Fri 17 Dec, 2004 9:53 am
yep
Indeed, do what blueskies said and it should work
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 to and it should work.
change
Code: Select all
ld (PenCol),hl
Code: Select all
ld (CurCol),hl
-
- Extreme Poster
- Posts: 479
- Joined: Fri 17 Dec, 2004 11:09 pm
- Contact:
That should be currow instead of curcol. Ti has never been really consistent. It'skms375 wrote:changetoCode: Select all
ld (PenCol),hl
and it should work.Code: Select all
ld (CurCol),hl
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.
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
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
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.
As for the errors with putsprite, it would be helpful if you were more specific.
-
- Calc Wizard
- Posts: 680
- Joined: Wed 22 Dec, 2004 5:37 am
- Location: West Palm Beach,FL
- Contact:
[TI ASM] Display text on the homescreen
Use this batch file.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.
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
Its not as convenient or nearly as reliable as MirageOS.