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

0 Members and 3 Guests are viewing this topic.

Offline adamac16

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 141
  • Rating: +2/-0
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #270 on: November 09, 2010, 06:46:45 pm »
so... unless it says .org 40339 or .org $9D93, you continue on where you left off?

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 #271 on: November 09, 2010, 06:51:10 pm »
so... unless it says .org 40339 or .org $9D93, you continue on where you left off?

Exactly.  The .org 40339 or .org $9D93 means "begin a new program."  Otherwise, continue the program from the last page.  So the red boxes from pages 6 to 8 are one big program.

Offline adamac16

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 141
  • Rating: +2/-0
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #272 on: November 09, 2010, 06:53:54 pm »
gotcha. now i can continue the lesson. BTW: i tried to compile it, but it said something like "over 225" or something like that. ?

Offline adamac16

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 141
  • Rating: +2/-0
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #273 on: November 09, 2010, 07:03:10 pm »
here it is

Code: [Select]
#include "ti83plus.inc"

.org 40339

.db  t2ByteTok, tAsmCmp



Truck .equ 0

Car .equ 1

Motorcycle .equ 2

Slow_Speed .equ 0

Medium_Speed .equ 1

Fast_Speed .equ 2

Small_Size .equ 0

Medium_Size .equ 1

Big_Size .equ 2

White .equ 0

Light_Grey .equ 1

Dark_Grey .equ 2

Black .equ 3

-----------------------------------------------------------------------

Player1:

.db White,Light_Grey, Truck, Small_Size, Slow_Speed

Player2:

.db Black, Dark_Grey, Car, Medium_Size, Fast_Speed

Player3:

.db Light_Grey, Dark_Grey, Motorcycle, Large_Size, Slow_Speed

Player4:

.db Black, White, Motorcycle, Small_Size, Medium_Speed
-----------------------------------------------------------------------


cp 1

jr z, Load_Player1_Data

cp 2

jr z, Load_Player2_Data

cp 3

jr z, Load_Player3_Data

cp 4

jr z, Load_Player4_Data



Load_Player1_Data:

ld a, (Player1)

ld b, a

ld a, (Player1+1)

ld c, a

ld a, (Player1+2)

ld d, a

ld a, (Player1+3)

ld e, a

ld a, (Player1+4)

ret

Load_Player2_Data:

ld a, (Player2)

ld b, a

ld a, (Player2+1

ld c, a

ld a, (Player2+2)

ld d, a

ld a, (Player2+3)

ld e, a

ld a, (Player2+4)

ret

Load_Player3_Data

ld a, (Player3)

ld b, a

ld a, (Player3+1)

ld c, a

ld a, (Player3+2)

ld d, a

ld a, (Player3+3)

ld e, a

ld a, (Player3+4)

ret

Load_Player4_Data

ld a, (Player4)

ld b, a

ld a, (Player4+1)

ld c, a

ld a, (Player4+2)

ld d, a

ld a, (Player4+3)

ld e, a

ld a, (Player4+4)

ret



Player1:

.db White, Light_Grey, Truck, Small_Size, Slow_Speed

Player2:

.db Black, Dark_Grey, Car, Medium_Size, Fast_Speed

Player3:

.db Light_Grey, Dark_Grey, Motorcycle, Large_Size, Slow+_Speed

Player4:

.db Black, White, Motorcycle, Small_Size, Medium_Speed
« Last Edit: November 09, 2010, 07:14:05 pm by Hot_Dog »

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 #274 on: November 09, 2010, 07:15:44 pm »
Start off by changine Big_Size .equ 2 to Large_Size .equ 2.  That was a typo.

Then put parenthesis at the end of ld a, (Player2+1

Finally, look at the code box in your post and remove the lines I put between rows of dashes, such as ---------------------------------------------------
« Last Edit: November 09, 2010, 07:15:54 pm by Hot_Dog »

Offline adamac16

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 141
  • Rating: +2/-0
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #275 on: November 09, 2010, 07:17:48 pm »
i didnt put in those dashes

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 #276 on: November 09, 2010, 07:18:45 pm »
i didnt put in those dashes

I know.  I did to make the lines easy to find

Offline adamac16

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 141
  • Rating: +2/-0
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #277 on: November 09, 2010, 07:21:04 pm »
oh

Offline adamac16

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 141
  • Rating: +2/-0
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #278 on: November 09, 2010, 07:24:40 pm »
ok. now when there is a pause in the program (the perfect world), how many spaces should i put in it, 2 or 4?

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 #279 on: November 09, 2010, 07:26:35 pm »
Well, it's actually not something you're supposed to run, so it doesn't matter.  I forgot to say that it's just hypothetical.

Try not to double post in the future

Offline adamac16

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 141
  • Rating: +2/-0
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #280 on: November 09, 2010, 07:28:26 pm »
ok

so what about the others before and after the perfect world?

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 #281 on: November 09, 2010, 07:31:17 pm »
so what about the others before and after the perfect world?

As a rule of thumb, if you see a space, you can do as many as 1 space or as many as 20 spaces.  The number of spaces doesn't matter.

However, if there's no space, don't put in a space.

Here's two examples:

No space before Load_Player3_Data

For call Load_Player_Data, you could type in  call                Load_Player_data

Offline adamac16

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 141
  • Rating: +2/-0
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #282 on: November 09, 2010, 07:33:54 pm »
kk. ill post any other questions i have with the tutorials when need be.

Offline coolsnake

  • LV2 Member (Next: 40)
  • **
  • Posts: 36
  • Rating: +2/-0
    • View Profile
Re: Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner--Discussion
« Reply #283 on: November 14, 2010, 01:38:53 pm »
I have a question about page 10 from lesson 7.

If you check that A <= 90 shouldn't the ASM equivalent be CP 91 instead of CP 89?
Since you check for the C flag condition, if A were 90 or 89 it wouldn't be set.
Unpretty Integrals
This program gives you a graphical representation of the "fnint(" function, which allows you to calculate definite integrals. It is extremely similar to the functionality MathPrint provides, minus the extreme bloat that slows your calculator down to a crawl.

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 #284 on: November 14, 2010, 01:56:48 pm »
Assuming coolsnake's account of the tutorials are accurate, then it should indeed be "cp 91", like he said.
"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.