Re: A83: Some questions...


[Prev][Next][Index][Thread]

Re: A83: Some questions...




Well Jonathan, welcome to the cool world of ASM programming!

I've been with the program for only 2 years, but I know a whole lot, and 
would be more than happy to help on any questions!

Now, let's see...

> Is there a PIC->ASM image translator?

Not that I know of.  I wanna make one, but I'm doing finals this week.  
Check ticalc.org (you have ben there, right?).  WHile there, check the 
sources dir (ASM source code) to help you in learning the lang.

> How do you work with sprites, and what exactly are they?

Well, sprites are little pics that you save off the screen, then load 
back onto the screen @ any pos.  Kinda like moving pieces on a board 
game.  It's what almost every graphical program uses (it's a technique).  
There's some good asm journals by Ahmed El-Hewl @ ti-philes.com on 
that.(Asm journal 6?).  Check it out.  I have more info on my comp, but 
wy web page doesn't have it on it yet...  If you want me to, I can send 
you some, if not all of my text files on ASM.  I have a FULL 3-ring 
binder of stuff!

> I also have a game in progress that uses a mission structure, with
> text-based "briefings."  How would you draw the text on the graph
> screen, and can the text wrap around by itself?

Well, you'd use _vputs.  Umm, to find out more of that, head to ti.com & 
llok up 83-asm info and they'll have all this documentation labled things 
like "TI-83 Display","Basic TI-83 Design Information" etc...  As I said, 
I have all of this, and I'd be more than glad to send you the dir.

> Can you use lists in ASM?  Or should I use variables instead of 
> lists?

Yes you can, but I haven't gotten it to work myself, so if anyone out 
there has info, please send some to me & Jonathan!

> Also, is there a way to do "save games" in ASM?  I have an 
> implementation in Basic where all variables are stored to lists, and
> lists are renamed. (I use L1-L6 in the program and rename them when
> saving)  Is there a better way?  How can you save the "free space"
> variables, e.g. 8265h - 8500h, as it is my understanding that they are
> deleted after the program quits.  In the same variables, are they
> limited to numbers, or can you use strings?

Well, this is where it gets a tad bit more complicated.  First of all, 
you could store the asm FS vars (8265h-8500h) into real vars (A-Z, & 
theta) by a little routine that I could go into explanation later (I'm 
running out of time now).
As far as game saving goes, there's many ways to do it.  Save info in 
lists, make a new program, protect it, and throw all your stuff in there 
(I just recently learned how to do that (C;*), save it to REAL vars, or 
find some RAM spot that isn't going to be editied sometime soon, like the 
_asmflagsN RAM spots or somwething...

> Can you compare strings? (I mean, can you say cp a,b) and have a and b
> be strings.

Umm, I don't even know how to do  strings in ASM, if it's possible at all.

> Is there a way to pass variables between labels in a program?  For
> example, suppose that I want to create a subroutine for printing text
> to the graph screen.  Can I use a generalized subroutine, and have the
> routine draw any string I want?

absolutely.  Think of al vars (or 'registers') as global.

> Finally, is there a way to do like If...Then...Else...End statements? 
>  And I've read some of the ASM journals, what is the big deal with the
> register a and z?  It seems like everything has to be loaded into a to
> be executed, and the results of cp is always in z.

Well, for starters, say you wanna do this:

If C=5:Goto 5L

In ASM:

ld 	a,c
cp	5
jp	z,5L

Does:
loads whatever's in register c (they're NOT REAL vars like what TI-Basic 
uses.  I just threw that in to try to get the point accross) to register 
a (which is the main acc register that hold all the important info and is 
basically the most popular reg).  Then, is uses cp, which subtracts the # 
specified (in this case, 5) from a (the acc).  Then jp (kinda like a 
Goto) jumps to lbl 5L if whatever cp returns is zero (z).  Z isn't a 
register, it stands for Zero.  Ther's NZ, C, and others.

> As most people will see, I'm really new to assembly.
> Thanx for the help.

No prob.  I'll go into more explanation tonite, but now I really hafta go.

Good Luck!  ASM is the best, most powerful lang of all time...

		-Dimitri


> 
> Quote of the day:
> 
>      The strongest bulwark of authority is uniformity;
>      the least divergence from it is the greatest crime.
>                                   - Emma Goldman
> 
Uhh, yeah!  'Dyou get it?  ^^^


Follow-Ups: References: