Author Topic: Learning z80 ASM  (Read 9187 times)

0 Members and 1 Guest are viewing this topic.

Offline _Nicco_

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 173
  • Rating: +6/-0
    • View Profile
Learning z80 ASM
« on: February 18, 2013, 03:17:39 am »
Hey guys, I just bought a TI-84+SE from ebay and I would really like to learn z80 assembly.

I currently know of the 28 day tutorial thing but do you guys have any tips to get me started?

I think I can handle assembly since it wont be my first language and I think I'm a quick learner.

Also quick question.  Isn't assembly an interpreted language, so do you need to modify the text file before sending it to the calculator?  What I'm trying to say is that there is no compiler or something like that right?
They say that your signature is supposed to go here...

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: Learning z80 ASM
« Reply #1 on: February 18, 2013, 03:40:12 am »
ASM in 28 days is a nice starting point, you don't have to know anything in ASM before learning with it.

Also quick answer : assembly is a compiled language (assembled in fact), so you have to compile your *.z80 files into *.8xp files before sending them to your calc (everything's explained in ASM in 28 days) . An alternative is to use the on-calc assembler Mimas to edit and assemble your programs directly on-calc.

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Learning z80 ASM
« Reply #2 on: February 18, 2013, 03:55:12 am »
CoBB's tutorial is pretty good: http://sgate.emt.bme.hu/patai/publications/z80guide/

Other than that, here's what i wrote at Cemetech:
Some things that can be helpful to understand to be able to start writing fun games quickly:
-indirection
-what buffers are and why/how to use them
-direct input
-tilemapping
-how the LCD is mapped: 1 byte = 8 pixels. This complicates drawing individual pixels a bit but means your sprites will be much smaller in size.
-bit shifting commands, absolutely necessary once you want to start making games that scroll smoothly and also very useful for optimizing
-storing and accessing data in tables

Assembly uses an assembler, i use spasm. Essentially you just run the source file through spasm and it outputs a .8xp. The assembly mnemonics correspond directly with the z80s commands, the assembler just converts the mnemonics into assembly opcodes (hex) as well as making a lot of other things easier for you, for example calculating addresses so you don't need to count how many bytes there are to jump to the right address and lots more.

If you have any questions, please ask! I don't think it's as difficult as people think (it was my first language, after English) it just takes a little while to get used to thinking differently.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Learning z80 ASM
« Reply #3 on: February 18, 2013, 04:18:53 am »
Quote
it was my first language, after English
I had to learn English first XD
If you like my work: why not give me an internet?








Offline _Nicco_

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 173
  • Rating: +6/-0
    • View Profile
Re: Learning z80 ASM
« Reply #4 on: February 18, 2013, 08:43:08 pm »
Alright.  I was told by a couple people to use the DoorsCS sdk as my assembler.  Can someone help me out with that?

What do I need to run it?  I noticed that inside the tasm folder there was a .py file.  Does that mean that I need to install python to run this?  If I do which version is recommended?
They say that your signature is supposed to go here...

Offline Geekboy1011

  • The Oneironaut
  • Donator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2031
  • Rating: +119/-2
  • Dream that Awakening dream
    • View Profile
Re: Learning z80 ASM
« Reply #5 on: February 18, 2013, 08:52:22 pm »
Yea you will need python. Eaither version wotks thankfully so go with your preferance if your not coding python go with thr smaller one :p

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Learning z80 ASM
« Reply #6 on: February 20, 2013, 04:15:09 am »
(it was my first language, after English)

I thought it was the other way around?? O.O

Anyway I think both ASM and BASIC are incredibly hard if you get very used to the opposite and are the kind of person to have serious troubles adapting to changes that drastic. (Like any other change for that matter). Another problem was Asm in 28 days, because when it was written it didn't take into account that there are people who can only learn languages with examples of programs that actually do stuff and animated screenshots of the programs in action. The TI-BASIC section of the 83+ manual had a similar problem, but not as bad. This is why some people prefered ASMGuru approach, but sadly it's TI-82 STATS/83-only. Thankfully, Hot_Dog's ASM guide for the absolute beginner fixed that gap, though, along with Axe which acts as a bridge between BASIC and ASM sort-of.
« Last Edit: February 20, 2013, 04:23:25 am by DJ_O »

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Learning z80 ASM
« Reply #7 on: February 20, 2013, 06:48:56 am »
Yea ASM in 28 days assumes you already have some computer programming experience IIRC, and it's a lot more technical.

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: Learning z80 ASM
« Reply #8 on: February 20, 2013, 11:40:26 am »
Hot_Dog's tutorials was what finally nailed in certain concepts for me, like registers and flags. I know enough of the basics to understand assembly, at least.

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline _Nicco_

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 173
  • Rating: +6/-0
    • View Profile
Re: Learning z80 ASM
« Reply #9 on: February 20, 2013, 11:31:14 pm »
I do have some programming experience.  I'm trying out 28 days and if I get lost there then I'll also try Hot_Dog's.  I haven't learned basic so that Might be  + if what DJ_O says is true.
They say that your signature is supposed to go here...

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Learning z80 ASM
« Reply #10 on: February 21, 2013, 01:27:48 am »
Well I didn't say no programming BASIC at all, but rather that if you program it for several months intensively and get too used to it, then you might have problems if you are the kind of person to have troubles getting rid of certain habits.

Offline _Nicco_

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 173
  • Rating: +6/-0
    • View Profile
Re: Learning z80 ASM
« Reply #11 on: February 21, 2013, 01:41:22 am »
What's the difference between Spasm and Brass?

Is one better than the other or are they just two programs that work just as well?
They say that your signature is supposed to go here...

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Learning z80 ASM
« Reply #12 on: February 21, 2013, 04:21:07 am »
It depends of your preferences. Spasm used to be much more popular until Doors CS7 SDK (which uses Brass) arrived. Kerm have really tried hard to convince people to go with the latter so today more people use that one. You might want to wait until someone with more experience tells the pros *and* cons of each, though, to make your choice.

Some people still use TASM, though, since that's all we had from 1999 to 2006 (back when ASM was at its peak), but it's very rudimentary, buggy and it doesn't run on 64-bit OSes.

Offline Spyro543

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1189
  • Rating: +74/-3
    • View Profile
Re: Learning z80 ASM
« Reply #13 on: February 21, 2013, 09:09:14 am »
I tried to learn ASM too, but I found that SPASM doesn't work on my (64-bit) computer. Maybe I'll have better luck with Brass (where can I get it)?

Offline harold

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 226
  • Rating: +41/-3
    • View Profile
Re: Learning z80 ASM
« Reply #14 on: February 21, 2013, 09:15:25 am »
Blog about bitmath: bitmath.blogspot.nl
Check the haroldbot thread for the supported commands and syntax.
You can use haroldbot from this website.