A83: Re: Assembly-83 Digest V1 #842


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

A83: Re: Assembly-83 Digest V1 #842




> > But I still
> > don't know how to do a lot of things. How would I go about setting
> > this up?
> > Should I store the deck in an actual list/matrix? If so how do I
> > switch using
> > ASM?
>
> You definitely shouldn't use TI-OS variables for this.

No! No! Nooooo!!!!


>  There is an
> assembler directive (I cant rmember which one) that defines a certain
> number of bytes in one command.  You would want to use that.
>
> .dd  52 'Its something with .dX where X is another letter, not b or w

Well I guess you mean DS (yes in my assembler !!!no stupid dot!!!) or DEFS.
Value behind it defines nr. of bytes and some assemblers support another
value to indicate which value all those bytes have.


> Also, program writeback, I NEED this in my
> program, but I can't seem to figure it out. I don't like using

Every byte in your program you change will be automatically written back by
any shell (which is, you have to admit, the only fitting environment on
TI-calculator to write ASM programs in). So if you change data in your
program it will be automatically read back the next time. Very useful
indeed!


> > shells even though
> > they often have automatic program writeback as a standard feature.
> > Also if anyone
> > out there really wants to se this dream become a reality, I am
> > definitely looking
> > for hints to decrease file size.
>
> There are a lot of optimization hints at http://www.usmo.com/~joewing,
> Joe W's page
> A couple of things are replace your ld a,0's with xor a's nd other space
> savers

The big saver tips are:
- use JRs instead of JPs (although they are -most of the time- a little
slower).
- Instead of using CP 0 use AND A
- Instead of using BIT 0,A use RRA or RRCA
- Instead of using BIT 7,A : JP Z,nnnn use AND A : JP P,nnnn
- Use EX AF,AF' and EXX!!! Only 4 T-states while PUSH and POP are 11 and
10!!!
- If possible, try to cut back on text a little... it really takes a lot of
space.

And there are a lot of other savers. Main tips: 1. know your processor (that
is the Z80) to the bottom, and 2. just keep staring at your source for an
hour and you will highly likely bump into alot of optimizations...


> I do plan on squishing Casino, but it's still
> going to be huge. I am avoiding the use of background images where I
> can (ie only for the slot machine that really does need it).

Errm... hint: make your game for a shell like SOS or even better, ION.
Advantages of it are that
1. programs are 'squished' (that means they are in binary form; each byte
represents the corresponding code: an un'squished' program on the TI takes
at least two bytes for every byte), and
2. shells support program writeback (also very useful), and
3. the biggest advantage of all, the program is MOVED to the place from
where it has to run, instead of COPIED. When copied, to run a program of 4k
you need at least 4k of free memory. In a shell, you only need a few bytes
free. And last but not least
4. shells have nice looks, can run programs very easily (no
send(9prgmBLABLA), and most people instantly dump games NOT written for a
shell (I have to confess I am one of them).
5. ZASMLOAD is THE program to lock your calculator. Ever tried to run a
Basic-program with it? Since I have no ZASMLOAD anymore my calculator hasn't
crashed for... well, a very long time. Okay since I am developing a game the
crash-rate is increasing drastically.


> By the way, welcome back James.  Its been a while since I've done
> anything on this list either since my 83 got stolen.  Now I'm trying to
> learn God-awful 68K which makes Z80 look like BASIC.  Congradulations on
> TI adopting your tutorial

Yuk. Z80 is tha bomb!!! 30 years old but still up and running.
PS. can you show me some example of 68k code?


~Grauw


--
>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<
          email me: laurensh@geocities.com or ICQ: 10196372
             visit the Datax homepage at http://datax.cjb.net/
MSX fair Bussum / MSX Marathon homepage: http://msxfair.cjb.net/
>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<



Follow-Ups: References: