Author Topic: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion  (Read 112743 times)

0 Members and 2 Guests are viewing this topic.

Offline matthias1992

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 408
  • Rating: +33/-5
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #180 on: July 08, 2010, 04:08:13 pm »
Have you read the tutorials from the beginning?  I'd recommend you do so if you haven't:  It's my goal that the lessons are easy to understand, and thus I can't really explain the difference, you should read about it.

However, I will say that HL is a number, such as a ram location.  (HL) is whatever is stored in RAM at that location.  (HL) can be used almost any place where you can use "One-Byte Register" as a parameter.  If this confuses you, I highly recommend you read from the beginning :)
I understand the difference between HL and (HL) (i did not read your tutorials from the beginning but i did read Sean Mclaughin's ams in 28 days) my question is what you mean with it. Or better said: what does HL have to do with the commands SRL and SLA? why is it involved. SRA and SLA are on-byte register commands so what does HL have to do with it?
Is (HL) (adress location) modified because you use these commands? or does it destroy HL?
MASM xxxxxxxxxx aborted | SADce ====:::::: 40% -Halted until further notice| XAOS =====::::: 50% -Units done| SKYBOX2D engine ========== 100% -Pre-alpha done. Need to  document it and extend |

~Those who dream by day are cognizant of much more than those who dream by night only. -Sir Edgar Allen Poe-

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #181 on: July 08, 2010, 04:52:41 pm »
Have you read the tutorials from the beginning?  I'd recommend you do so if you haven't:  It's my goal that the lessons are easy to understand, and thus I can't really explain the difference, you should read about it.

However, I will say that HL is a number, such as a ram location.  (HL) is whatever is stored in RAM at that location.  (HL) can be used almost any place where you can use "One-Byte Register" as a parameter.  If this confuses you, I highly recommend you read from the beginning :)
I understand the difference between HL and (HL) (i did not read your tutorials from the beginning but i did read Sean Mclaughin's ams in 28 days) my question is what you mean with it. Or better said: what does HL have to do with the commands SRL and SLA? why is it involved. SRA and SLA are on-byte register commands so what does HL have to do with it?
Is (HL) (adress location) modified because you use these commands? or does it destroy HL?

HL is the location in RAM.  For instance, in S.A.D, I say "this is where in RAM I want to store information about each building."  Then I can tell HL to focus on that location.  (HL) is what is stored inside of RAM at that location.  So when you use (HL), only the RAM is modified, not the location.

Offline SolusIpse

  • LV2 Member (Next: 40)
  • **
  • Posts: 35
  • Rating: +1/-0
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #182 on: July 08, 2010, 08:37:03 pm »
if you are familiar with C or similar languages, think of hl as holding a pointer and (hl) as dereferencing said pointer.  z80 calcs use 2 byte addresses so you need a register pair to hold the address.  The z80 designers probably decided it would be useful if you could directly manipulate the byte pointed to by the address in hl instead of having to load it into one of the registers prior to rotations, shifts, etc.

Note that in almost all cases I can think of, directly manipulating the contents at the address using (hl) as an argument is slower than using a register as an argument.  logical since registers are closer than RAM.  but, it could be useful if you have tied down for registers.

oh this will probably confuse but the ONLY time (hl) does NOT DEREFENCE is

Code: [Select]
jp (hl)
iirc, this actually tell you to jump to the address that register pair hl holds, or the address that would be stored at (hl) (I forget which, calc84maniac probably knows)

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #183 on: July 08, 2010, 08:40:05 pm »
It's the first one. For example, if HL=$CAFE, then jp (hl) will jump to $CAFE, regardless of (HL)
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline SolusIpse

  • LV2 Member (Next: 40)
  • **
  • Posts: 35
  • Rating: +1/-0
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #184 on: July 08, 2010, 08:51:14 pm »
which is why I always thought it was weird that the syntax is
Code: [Select]
jp (hl)and not
Code: [Select]
jp hl

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #185 on: July 09, 2010, 09:24:24 pm »
I removed the .pdf and .html files for lesson 4, and uploaded an updated doc.  I forgot that sharing ROMS was illegal, so I had to delete the link

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #186 on: July 09, 2010, 09:30:49 pm »
it had a rom link? :O
* DJ Omnimaga omnoms a Hot Dog

j/k don't worry too much about it :P
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #187 on: July 10, 2010, 02:00:07 am »
Lesson 13 is up.  It's mostly on ASM Gorillas.  It's a good lesson for the faint of heart  :P, but not for those who don't want to put in the practice.

Lesson 15 will be up next, followed by some screenshots to promote the example program ASM Gorillas  8)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #188 on: July 10, 2010, 02:38:57 pm »
nice :D
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #189 on: August 16, 2010, 03:13:53 am »
I couldn't get to sleep, so I made this screenshot to promote/advertise lesson 15, which will hopefully be coming this week.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #190 on: August 17, 2010, 09:40:19 am »
That looks pretty nice :D
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #191 on: August 17, 2010, 10:58:02 am »
That looks very nice.  Wonderful job! ;D

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #192 on: August 18, 2010, 11:42:28 am »
Lesson 15 is now up.  You won't learn to input names yet, because I realized that the lesson was starting to get too long.

Now I'll be doing lesson 17, which teaches you how to draw sprites!  For all you eager beavers, that might come as soon as next week.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #193 on: August 18, 2010, 02:30:50 pm »
Nice to hear. Btw are you planning to put a pdf of lesson 4 back up soon? I tend to prefer pdf format to doc for compatibility reasons.

Also I sometimes notice references to your tutorials on other forums or IRC when someone asks what's a good ASM tutorial, plus your tutorials are downloaded quite often, so it tells you did an amazing job on them so far. I hope you can finish them :)
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #194 on: August 18, 2010, 03:07:00 pm »
Quote
Also I sometimes notice references to your tutorials on other forums or IRC when someone asks what's a good ASM tutorial, plus your tutorials are downloaded quite often, so it tells you did an amazing job on them so far.

Dude, thanks for telling me that!  It was definitely my goal to make ASM easy to understand.

Unfortunately, though, the pdf for lesson 4 might not be up for some time.  It's low on my list of priorities :(