So I started learning z80 a while ago, quit, and now I'm back at it. I'm chugging along through "Learn ASM in 28 days," and I'm wondering what are some good beginner level programs to start trying to make? I'm only at the advanced math section (and I know I'll have more questions about that by itself later haha), but I'd appreciate any suggestions. Thanks!
In my experience the best way to move forward is take someone else's existing code, disect it and modify it. Perhaps take an existing simple TIBasic program and recode for ASM ? Don't fall into the trap of attempting a massive project which will only serve to frustrate your endevours...
ti83head is exactly correct. Reading, understanding, and modifying existing code is a great way to get off the ground, as is attempting small, easy-to-complete projects that won't get you lost and frustrated. Deciding that your first project should be Mario or Zelda or Sim City 5 is a bad idea. Perhaps you could try things like something that will let you move a small sprite around the screen using the arrow keys? (See iPutSprite and iFastCopy for two routines you'd need to complete that).
What sort of games would you like to eventually write? It's probably worthwhile thinking of that and making small steps towards those things. No matter what, you'll likely need to know how to display sprites, which in itself is a bit complicated as it requires a good bit of bit manipulation, as well as working with direct input.

It can be nice to work with prewritten routines (like the ion routines Kerm mentions) to start with, but it's definitely worthwhile knowing how they work and how to write your own. It's also worthwhile learning how the LCD works.

From there, you have a ton of options, you might want to look into tilemaps, arrays, etc.
Ah, finding existing code does sounds like a good idea, thanks! And chickendude: I pretty much want to be able to write anything eventually, but yeah i'll start looking at some simple games with sprites and stuff. Thanks guys
I think most of what i learned was from seeing how other people did things and asking questions. I really wish i had tried writing my own routines earlier. When i started writing my own sprite routines, tilemappers, fastcopy routines, etc. i really started to understand a lot more and i think my code as a whole improved. Unfortunately i waited many many years before doing that...

Sometimes i like to see how someone did one thing (for example, display a sprite) and try to rewrite it a different way. Another thing i did when i was first learning assembly was trying to understand how someone did something (a tilemap routine, for example) and trying to reproduce that same code without looking at the original.

Also, learning how to work with bits is important, on our monochrome calcs each byte of the LCD corresponds to 8 pixels, 1 pixel per bit. On the one hand it's nice since it takes up less space, but on the other hand things get a bit complicated when what you want to draw isn't aligned to a byte. What if you want to draw 8 pixels 2 pixels away from the edge? You'll have to draw 5 pixels in the first byte and three pixels in the second byte. I'm not sure if i've said that clearly, but i think it's important to understand. You can get by only drawing aligned sprites (aligned sprites are sprites that have an X coordinate that is a multiple of 8: 0, 8, 16, 24, ... 88 ), lots of RPGs do tile-by-tile scrolling, but that's not what you usually want. You want to scroll pixel by pixel, not 8 pixels at a time Smile
chickendude wrote:
Sometimes i like to see how someone did one thing (for example, display a sprite) and try to rewrite it a different way. Another thing i did when i was first learning assembly was trying to understand how someone did something (a tilemap routine, for example) and trying to reproduce that same code without looking at the original.
One of the proudest moments of my early ASM programming career, in which I was struggling with the much-derided ASMGuru and writing statements like ld a,5000 was understanding Movax's Sprite Routine and managing to write my own replacement. It took me many hours to understand what the routine was doing, but when I finally did and wrote my own rather unoptimized replacement, I felt I had taken a big step. I definitely recommend challenging yourself in that way, although make sure you're sufficiently far in your ASM education that it's not a complete trainwreck of frustration.
  
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 1 of 1
» 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