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

0 Members and 2 Guests are viewing this topic.

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 #165 on: July 08, 2010, 12:41:07 pm »
Lesson 16 is up.  Now that everything is taken care of (meaning I have access to ASM Gorillas), I will be moving back to lesson 13.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • 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 #166 on: July 08, 2010, 12:54:09 pm »
I'Ll check this one out. Btw is it the one talking about some S.A.D techniques as you talked about on IRC earlier?

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 #167 on: July 08, 2010, 12:57:38 pm »
Btw is it the one talking about some S.A.D techniques as you talked about on IRC earlier?

It is. Not "game playing" techniques as much as coding techniques.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • 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 #168 on: July 08, 2010, 12:58:42 pm »
Yeah that's what I though. ^^

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 #169 on: July 08, 2010, 01:28:14 pm »
Awesome!  Thanks Hot Dog!  This is yet another installment in an awesome guide.  Thank you! ;D

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 #170 on: July 08, 2010, 02:56:31 pm »
Cool:
You already said in your 48 lines program that it could be optimized, would this be valid? I understand this uses DJNZ which I can not recall you mentioned in one of the earlier lessons (not that I have read them all) so this is no offense or something I just wonder IF this is valid code and if it is, would it be faster?
Code: [Select]

LD HL, PlotSScreen
LD A, %10101010
LD B, 120
Loop:
LD (hl), A
INc HL
DJNZ Loop
B_Call(_GrBufCpy)
B_Call(_getKey)
B_Call(_ClrLCDFull)
;I never display done...don't like it :P
« Last Edit: July 08, 2010, 02:58:27 pm by matthias1992 »
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 #171 on: July 08, 2010, 03:03:57 pm »
Cool:
You already said in your 48 lines program that it could be optimized, would this be valid? I understand this uses DJNZ which I can not recall you mentioned in one of the earlier lessons (not that I have read them all) so this is no offense or something I just wonder IF this is valid code and if it is, would it be faster?


No offense taken 8)  Yeah, that code would be faster.  I simply want people to understand how BIT, etc. works

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 #172 on: July 08, 2010, 03:07:07 pm »
Thats a relief :P

On the RL instruction you say it moves the carry into bit 0 and bit 7 into the carry. But what happens first? it can never happen at the same time since CPU's are sequentially processing data so is it in the order you mention or the converse?

EDIT: I think it should be 7 into carry and then carry into bit 0 because it is a rotation...

Once again, just saying...
« Last Edit: July 08, 2010, 03:09:03 pm by matthias1992 »
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 #173 on: July 08, 2010, 03:08:31 pm »

On the RL instruction you say it moves the carry into bit 0 and bit 7 into the carry. But what happens first? it can never happen at the same time since CPU's are sequentially processing data so is it in the order you mention or the converse?

I have no idea, but that's irrelivant

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 #174 on: July 08, 2010, 03:08:32 pm »
No, it is simultaneous, the operations are internal to the CPU and are performed at the same time. Or if not, there is a buffer somewhere.
At any rate, just pretend they happen at the same time :)
« Last Edit: July 08, 2010, 03:09:44 pm by calcdude84se »
"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 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 #175 on: July 08, 2010, 03:10:56 pm »
No, it is simultaneous, the operations are internal to the CPU and are performed at the same time.
I can't imagine that...The only truly parallel devices I have ever programmed are FPGA's because every block is dedicated to a specific task. But indeed hot_dog, it is irrelevant. I just remembered that it simply rotates so what happens first indeed does not matter.

thanks for the fast replies.
 
« Last Edit: July 08, 2010, 03:18:32 pm by matthias1992 »
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 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 #176 on: July 08, 2010, 03:12:54 pm »
^ Sorry, you replied before my edit for another possible scenario. :P
Yeah, it really doesn't matter, for all practical purposes the CPU could be a bunch of hamsters (or lobsters, rather :P)
"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 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 #177 on: July 08, 2010, 03:18:42 pm »
I just came up with another question, sorry for bothering but in the SRL and SLA functions you say "Register is (HL)" I am slightly confused about that. One thing is what does HL to do with these and the second is do you mean HL or (HL)?
Once again my apologies for annoying you, its my pleasure...  ;D
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 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 #178 on: July 08, 2010, 03:29:26 pm »
SRL, SLA, and others can't modify HL, only (HL), which is the data at the address given by 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 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 #179 on: July 08, 2010, 03:29:54 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 :)