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

0 Members and 1 Guest are viewing this topic.

Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #90 on: May 13, 2010, 08:30:35 pm »
just printed them out! Thanks Hot Dog for these awesome tutorials! They are really helping me understand ASM!


Spoiler For funny life mathematics:
1. ROMANCE MATHEMATICS
Smart man + smart woman = romance
Smart man + dumb woman = affair
Dumb man + smart woman = marriage
Dumb man + dumb woman = pregnancy
2. OFFICE ARITHMETIC
Smart boss + smart employee = profit
Smart boss + dumb employee = production
Dumb boss + smart employee = promotion
Dumb boss + dumb employee = overtime
3. SHOPPING MATH
A man will pay $2 for a $1 item he needs.
A woman will pay $1 for a $2 item that she doesn't need.
4. GENERAL EQUATIONS & STATISTICS
A woman worries about the future until she gets a husband.
A man never worries about the future until he gets a wife.
A successful man is one who makes more money than his wife can spend.
A successful woman is one who can find such a man.
5. HAPPINESS
To be happy with a man, you must understand him a lot and love him a little.
To be happy with a woman, you must love her a lot and not try to understand her at all.
6. LONGEVITY
Married men live longer than single men do, but married men are a lot more willing to die.
7. PROPENSITY TO CHANGE
A woman marries a man expecting he will change, but he doesn't.
A man marries a woman expecting that she won't change, and she does.
8. DISCUSSION TECHNIQUE
A woman has the last word in any argument.
Anything a man says after that is the beginning of a new argument.

Girls = Time * Money (Girls are a combination of time and money)
Time = Money (Time is money)
Girls = Money squared (So, girls are money squared)
Money = sqrt(Evil) (Money is also the root of all evil)
Girls = sqrt(Evil) squared (So, girls are the root of all evil squared)
Girls = Evil (Thus, girls are evil)
*Girls=Evil credit goes to Compynerd255*

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 #91 on: May 13, 2010, 09:43:31 pm »
in lesson 9, i noticed that in your first example using _PutS, you left out the underscore.
Hurray for typos...

Agh, sooner or later, I'm going to make a typo as bad as the one the writer of "ASM 28 Days" made in the sprite routine 8)

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 #92 on: May 13, 2010, 09:49:47 pm »
in lesson 9, i noticed that in your first example using _PutS, you left out the underscore.
Hurray for typos...

Agh, sooner or later, I'm going to make a typo as bad as the one the writer of "ASM 28 Days" made in the sprite routine 8)
Can you explain?  Is there a compilation of all Asm in 28's typos?  I don't want to learn wrong. :)
Thanks for mentioning this! ;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 #93 on: May 14, 2010, 06:00:51 pm »
Good news, Raylin!  (Uh, and for everyone else too)  I planned the next few lessons, and it looks like I'll be talking about pictures in lesson #15 and sprites in lesson #17.

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: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #94 on: May 14, 2010, 08:30:08 pm »
Glad to see this is still going. When I feel more concentrated I might check the tutorials again. I might find some useful stuff there even if I don't do ASM, since I did when looking at WikiTI for Axe programming

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 #95 on: May 15, 2010, 01:43:57 pm »
Lesson Number 10 is up.

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 #96 on: May 15, 2010, 03:46:28 pm »
Nice. I see you have decided to introduce hexadecimal.
IIRC, all you can do with af is ex af,af'; push af; and pop af
"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 #97 on: May 15, 2010, 03:55:43 pm »
Quote
IIRC, all you can do with af is ex af,af'; push af; and pop af

That's right, although I'm probably going to talk only about push af and pop af.

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: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #98 on: May 15, 2010, 05:06:59 pm »
nice to see more updates ^^

It seems to be progressing quickly :)

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #99 on: May 15, 2010, 05:48:15 pm »
I know I'm beating a dead horse here, but in case anyone is curious when you actually do use the sp register, I posted a little summary.  I don't want to confuse anyone though, so no need to read this unless you have intermediate experience with assembly.  It would be cool to have a lesson with tricks like these if you get to the advanced lessons (I don't know how far you plan to go since its for absolute beginners)

Spoiler For Spoiler:
Lets say you have a buffer with a bunch of 16-bit numbers you need to read through.  You might have a loop that does this:
Code: [Select]
ld    hl,buffer

Loop:
ld    e,(hl)
inc   hl
ld    d,(hl)
inc   hl           ;In total 26 Clock Cycles
<do something with de>
jp    Loop
Its way faster to use the sp register.  Don't forget to have interrupts disabled.
Code: [Select]
ld    (saveSP),sp
ld    sp,buffer

Loop:
pop   de      ;In total 10 Clock Cycles
<do something with de>
jp    Loop

ld    sp,(saveSP)

Same goes for storing numbers, but you use push instead of pop.  The fastest way to clear the screen for instance is to load a zero into hl and then just push it 384 times when the sp register is on the graph buffer.  That's only 4,224 clock cycles with pushing vs. 16,107 using ldir, which is 21 clocks per byte.  Pushing is nearly 4 times faster in this case!

As you can see, the pattern here is that you usually use sp for speed critical processes becasue its generally a larger routine than the standard methods.  Although, sometimes it is actually smaller when you have all the other registers tied up and you are doing this as an alternative to using a free ram location to hold the pointer.
« Last Edit: May 15, 2010, 05:50:53 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #100 on: May 15, 2010, 07:39:07 pm »
Hot Dog, I found a mistake in Chapter 10. You say that 7 = 00001111, when it is really 00000111

Edit:
Also, you said that 6 = 00001110
« Last Edit: May 15, 2010, 07:49:19 pm by Hot_Dog »
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

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 #101 on: May 15, 2010, 07:49:39 pm »
Hot Dog, I found a mistake in Chapter 10. You say that 7 = 00001111, when it is really 00000111

Edit:
Also, you said that 6 = 00001110

Yeah, you're right.  Thanks for catching those

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 #102 on: May 16, 2010, 07:15:14 pm »
Quigibo, thanks!  That really shows why to use SP and it's pretty impressive.  Thank you! :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 #103 on: May 18, 2010, 05:11:58 pm »
Lesson 11 is up.

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: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #104 on: May 18, 2010, 05:19:56 pm »
Yay ^^