[TI ASM] Moving a bit of text around on screen

Got questions? Got answers? Go here for both.

Moderator: MaxCoderz Staff

Post Reply
That_One_Guy
New Member
Posts: 65
Joined: Sun 03 Apr, 2005 7:55 pm
Location: The seventh circle of Hell.
Contact:

[TI ASM] Moving a bit of text around on screen

Post by That_One_Guy »

I cant seem to figure out how to move a bit of text around. If someone could give me some code on moving an X with the arrow keys and clears the screen, I'd much appreciate it.
Truly great madness cannot be achieved without significant intelligence.

http://www.xanga.com/jakku_kun, rants by me.
koolmansam375
Extreme Poster
Posts: 479
Joined: Fri 17 Dec, 2004 11:09 pm
Contact:

Post by koolmansam375 »

basic or asm?
Image

Pongwars shall live!

blog is down atm. :-(
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

<edit>I thought it was a dumb question in asm already, never thought of the possibility that he meant Basic :D</edit>

Code: Select all

ScreenUpdate:
      bcall(_clrlcdfull) or another bcall that clears the homescreen without resetting currow en curcol
      ld hl,str
      bcall(_puts)
Loop:
      get keypress - don't know the code for that by heart :)
      cp leftkey
      jp z,left
      cp rightkey
      jp z,right
      etc...
      jp Loop

leftkey:
      ld a,(curcol)
      dec a
      ld (curcol),a
      jp ScreenUpdate

rightkey:
      ld a,(curcol)
      inc a
      ld (curcol),a
      jp ScreenUpdate

etc...
You should be able to fill in the gaps and get the errors out, if any (haven't tested this of course), or else I suggest you start working through some tutorials...
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
That_One_Guy
New Member
Posts: 65
Joined: Sun 03 Apr, 2005 7:55 pm
Location: The seventh circle of Hell.
Contact:

Post by That_One_Guy »

Heh, im extremely new to ASM, but yeah, i should be able to fix any errors. If not, i'll post here again. Thanks for the help!
Truly great madness cannot be achieved without significant intelligence.

http://www.xanga.com/jakku_kun, rants by me.
Patori
Maxcoderz Staff
Posts: 1479
Joined: Sat 18 Dec, 2004 3:51 am
Location: Toledo, Ohio, USA

Post by Patori »

Text... in a bit? a bit of text? Text cannot be a bit in length.... well maybe.... Yes or no, or something... :shock:
Currently coming up with a new signature idea... since my forum avatar changer was killed by an upgrade...
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

You're welcome :)
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

patori ... you know very well what he meant.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
koolmansam375
Extreme Poster
Posts: 479
Joined: Fri 17 Dec, 2004 11:09 pm
Contact:

Post by koolmansam375 »

Timendus wrote:<edit>I thought it was a dumb question in asm already, never thought of the possibility that he meant Basic :D</edit>
Yea, If youve read enough of 83pa28d (up to the text section) you should have enough knowledge to write this yourself (well it depends how fast you want the keypress detection to be :D).
Image

Pongwars shall live!

blog is down atm. :-(
That_One_Guy
New Member
Posts: 65
Joined: Sun 03 Apr, 2005 7:55 pm
Location: The seventh circle of Hell.
Contact:

Post by That_One_Guy »

Well, I did say i am extremely new to ASM. Thanks again for the help.
Truly great madness cannot be achieved without significant intelligence.

http://www.xanga.com/jakku_kun, rants by me.
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

You will always find help here, but trust me things will be a lot easier for you if you read the tutorial. It will provide you with a good basis for learning asm :).
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Nothing wrong with learning from example, I think most people of "my generation" (those who started with calc assembly over four years ago) learned it that way... In the good old days when ASMGuru was God ;)

But I very much agree that you gain a much better understanding of what you are actually doing in your software by reading through a few (good) tutorials. And that makes for better code.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

Well i learned from ASMGuru and examples too, mainly because i only have an 83 ... not an 83+.

But that is about to change :).
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
Post Reply