[Ti-ASM] My ASM Projects so far
Moderator: MaxCoderz Staff
[Ti-ASM] My ASM Projects so far
My projects site
Soooooo.... I've been learning ASM for a little over two weeks now and here's what I've written so far. Can anyone help me check if I got all the syntax right? I think sytax might be okay, but the programs aren't fully optimized.
If anyone helps, that'd be awesome! THANKS!
Soooooo.... I've been learning ASM for a little over two weeks now and here's what I've written so far. Can anyone help me check if I got all the syntax right? I think sytax might be okay, but the programs aren't fully optimized.
If anyone helps, that'd be awesome! THANKS!
![Image](http://kvince83.tengun.net/maxboard/shop/images/5yr-Trophy.gif)
![Image](http://kvince83.tengun.net/maxboard/shop/images/DS.gif)
![Image](http://kvince83.tengun.net/maxboard/shop/images/Petrock.gif)
- 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:
I think that maybe a Chess game might be a bit much for someone who is only just starting out with ASM. It would be a good idea to read through as many tutorials as you can and make a heap of little programs that do things such as displaying strings, working with arrays, simple graphics, sprites and the like. Once you have those things down making games will be a lot easier.
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
Don't worry, most of the ASM gurus are very harsh people (:P) but just learn from them and you will get better.
As for subroutines, I use pretty much the same D.I. routine in my programs. For my tilemapping programs, I use Dan E's tilemapper that he forgot he wrote. I also modified it to make a smooth scrolling one. Also, I cannibalized ion's putSprite and re-wrote it for masking purpose. Pretty soon I will follow tr1p1ea's lead and read external data from archived programs, but I will write that method myself according to his algorithm. Heh, it will probably be slower than his too. But the best thing to do in any game is to write a new engine for each one. That way you can apply the new things you've learned and hopefully make a smaller and faster program.
As for subroutines, I use pretty much the same D.I. routine in my programs. For my tilemapping programs, I use Dan E's tilemapper that he forgot he wrote. I also modified it to make a smooth scrolling one. Also, I cannibalized ion's putSprite and re-wrote it for masking purpose. Pretty soon I will follow tr1p1ea's lead and read external data from archived programs, but I will write that method myself according to his algorithm. Heh, it will probably be slower than his too. But the best thing to do in any game is to write a new engine for each one. That way you can apply the new things you've learned and hopefully make a smaller and faster program.
![Image](http://jim.revsoft.org/shop2.gif)
- 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:
You are far from a joke calcul831415, although i was a bit shocked by some parts of your code, i think its great that you are eager to learn ASM. There dont seem to be many people diving in lately.
You should have seen some of the things that i was trying to do when i started out ... sheesh! I am glad that no-one really saw any of my early code ... its embarassing
. The thing is though, almost everyone is guilty
.
The most IMPORTANT advice i can give you is to just start small. Trying to accomplish things which are too complex will only lead to frustration. Just chip away at it slowly, brick by brick. When you have all of the bricks ready ... then you can start building your monument.
You should have seen some of the things that i was trying to do when i started out ... sheesh! I am glad that no-one really saw any of my early code ... its embarassing
![Wink ;)](./images/smilies/grayscale_wink.gif)
![Very Happy :D](./images/smilies/grayscale_happy.gif)
The most IMPORTANT advice i can give you is to just start small. Trying to accomplish things which are too complex will only lead to frustration. Just chip away at it slowly, brick by brick. When you have all of the bricks ready ... then you can start building your monument.
-
- MCF Legend
- Posts: 1601
- Joined: Mon 20 Dec, 2004 8:45 am
- Location: Budapest, Absurdistan
- Contact:
I don't. Since my programs are all entirely different, only the most elementary routines can be reused: maths, input and possibly low-level data retrieval. The rest is too specific to copy elsewhere. And frankly, I don't really like when complete engines are reused, it feels like having the same program twice.calcul831415 wrote:so do most of you guys have these (sub)routines that you've made personally, and now use in almost every program? Like have guys developed your own engines?
![Sad :(](./images/smilies/grayscale_sad.gif)
Can somebody compile it for me (if it works, i remember how you guys were on my case last time) and email it back to me?
Thanks a bunch!!
![Image](http://kvince83.tengun.net/maxboard/shop/images/5yr-Trophy.gif)
![Image](http://kvince83.tengun.net/maxboard/shop/images/DS.gif)
![Image](http://kvince83.tengun.net/maxboard/shop/images/Petrock.gif)
-
- Calc Wizard
- Posts: 680
- Joined: Wed 22 Dec, 2004 5:37 am
- Location: West Palm Beach,FL
- Contact:
calcul83145: I wouldn't recommend programming any more in asm until you can actually compile it. Looking at some of your source code, it looks like your missing some important concepts. I would recommend getting a better grasp of asm in 28 days before moving on. On that note, ben ryves is working on latenite, a z80 editor with compiler built in. If you're looking for something a little less beta, Calc King put together a great little z80 dev kit for use with the context editor, which can be downloaded here.
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
First mistake I saw was the you didn't include the underscore in front of one of the clrlcdfull. You are loading a into turkeypos when I think you meant to do hl. Don't do gbufcopy until you've copied EVERYTHING to the screen, right now you will show up then the turkey will instead of both "instantly". Also, I would recommend using ion's fastCopy instead of the bcall. After calling Turkey up, the a register may have been messed up, so it may end up calling the next calls as well. I think penrow has no underscore and is all lowercase. I also don't think you can load into the l register directly, only with numbers and other registers, but I could be wrong about that. Also, you left in several words like "neg" or "getkey". However that looks like my first ASM program, right down to the cps following calls.
![Image](http://jim.revsoft.org/shop2.gif)
okay, so I finally compiled on my comp! Thanks guys!
anyways, the problems were that TASM got angry at me for using both ION and Ti83plus.inc so I got rid of the Ti83plus include file and defined what I needed that wasn't in IOn.inc
then I learned that you can't directly load into registers other than a. You have to do:
ld a,(variable)
ld b,a
to get the value at that address into b.
Then I made the corrections that Threefingeredguy mentioned above. I haven't gotten a chance to test it yet, but hopefully I'll be able to do that soon.
Now that I can finally compile, maybe I can start working on bigger projects.
@threefingeredguy: what did you mean"however that looks like my first ASM program, right down to the cps following calls"? is doing:
cp 2
call nz,label
a bad thing? Does it slow down the calc cuz you put something on the stack before making the call?
anyways, the problems were that TASM got angry at me for using both ION and Ti83plus.inc so I got rid of the Ti83plus include file and defined what I needed that wasn't in IOn.inc
then I learned that you can't directly load into registers other than a. You have to do:
ld a,(variable)
ld b,a
to get the value at that address into b.
Then I made the corrections that Threefingeredguy mentioned above. I haven't gotten a chance to test it yet, but hopefully I'll be able to do that soon.
Now that I can finally compile, maybe I can start working on bigger projects.
@threefingeredguy: what did you mean"however that looks like my first ASM program, right down to the cps following calls"? is doing:
cp 2
call nz,label
a bad thing? Does it slow down the calc cuz you put something on the stack before making the call?
![Image](http://kvince83.tengun.net/maxboard/shop/images/5yr-Trophy.gif)
![Image](http://kvince83.tengun.net/maxboard/shop/images/DS.gif)
![Image](http://kvince83.tengun.net/maxboard/shop/images/Petrock.gif)
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
I think it's better to use the real ti83plus.inc (so it's always up to date) and a tiny ion.inc that only contains the Ion functions. Whatever works for you, I guess.calcul831415 wrote:okay, so I finally compiled on my comp! Thanks guys!
anyways, the problems were that TASM got angry at me for using both ION and Ti83plus.inc so I got rid of the Ti83plus include file and defined what I needed that wasn't in IOn.inc
![Smile :)](./images/smilies/grayscale_smile.gif)
oh god! now I just hope I don't have compiling problems for the Ti-89 Titanium I got for b-day! I don't even know what I need.
Final code for 1st z80 ASM game. It really doesn't look like a turkey does it?
Final code for 1st z80 ASM game. It really doesn't look like a turkey does it?
![Image](http://kvince83.tengun.net/maxboard/shop/images/5yr-Trophy.gif)
![Image](http://kvince83.tengun.net/maxboard/shop/images/DS.gif)
![Image](http://kvince83.tengun.net/maxboard/shop/images/Petrock.gif)