Chipmaster wrote:
Another solution would be to load into a first, and then load into l at the end. It will screw up hl, but at that point it won't matter.


That's what I was saying Smile
Excellent. Great minds think alike then. Then again, so do ours... Wink
how would loading hl make the program smaller?
This way, you save two bytes. ld hl,nnnn is 3 bytes, whereas inc hl and dec hl are only 1 byte each.
alright i will try using the hl register. and with the other changes i knocked off 32 bytes of memory off of the program. Is there a good tutorial out there that explains string and numerical input other than 28 days because their explanation confused me. and did you stick the exit label under keypress so that you could use a jr making it use less space
That's precisely the reason. And no, there's no good tutorial. Just use the DCS routines. Smile
which one of the inc files is it under
None yet. But if you make your program a DCS6 program, you can use the GUI routines.
Yea, without the DCS GUI routines, string a numberical input is actually quite advanced in ASM. You have a to have a good knowledge of sprites, arrays, math, and other difficult things in asm. It's probably easiest if you search on ticalc for an input program source and use that until you have the skills to make your own. Or you could use Kerm's GUI routines. I bet they'd be perfect for this. Smile
okay. and i am also having problems with ionlargesprite. here is my code:


Code:

ld ix,building1
 ld a,(buildy)
 ld l,a
 ld a,(buildx)
 ld b,8
 ld c,2
 call ionlargesprite
 call ionfastcopy

building1:
 .db %1111001111
 .db %1111001111
 .db %1111111111
 .db %1111111111
 .db %1111111111
 .db %1111001111
 .db %1111001111
 .db %1111001111


the problem i am having is figuring out what to load into b and c. no matter what i try it can not align my picture correctly
First off, .db signifies a byte. You have 10 bits worth of data following each. That's just not going to work. With ionlargesprite, you load the width in bytes of your sprite in c. In your case you should make the width 2 bytes and pad with zeros.
In other words:

Code:

ld ix,building1
 ld a,(buildy)
 ld l,a
 ld a,(buildx)
 ld b,8
 ld c,2
 call ionlargesprite
 call ionfastcopy

building1:
 .db %11110011,%11000000
 .db %11110011,%11000000
 .db %11111111,%11000000
 .db %11111111,%11000000
 .db %11111111,%11000000
 .db %11110011,%11000000
 .db %11110011,%11000000
 .db %11110011,%11000000
And believe it or not, you have the correct values for b and c already. b=8 for 8 rows, and c=2 for 2 bytes across.
alright thanks for that. maybe now i can make some head way on the game i am creating
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 6 of 6
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement