Omnimaga

Omnimaga => Completed => Our Projects => Hot Dog's TI-83+ Z80 ASM for the Absolute Beginner => Topic started by: Hot_Dog on May 02, 2010, 02:49:57 pm

Title: Mistakes made in the ASM tutorials
Post by: Hot_Dog on May 02, 2010, 02:49:57 pm
Hi, guys,

Apparently the link to the ti83plus.inc file I gave you provides you a file that doesn't work with SPASM.  Here's a new file that works with SPASM.  Just make sure to change the file name in your code, or change the name of the file itself.

Also, in the example programs, TABS ARE REQUIRED.  In other words, if a line is indented, please indent it.  If it isn't indented, DON'T indent it.
Title: Re: Important Information about Hot Dog's Tutorial Number 4
Post by: DJ Omnimaga on May 03, 2010, 04:30:28 am
Will it work with TASM and others? If not, you may want to warn users of other IDEs and compilers about that, altough I guess your tutorial is probably mostly aimed towards Spasm users
Title: Re: Important Information about Hot Dog's Tutorial Number 4
Post by: Hot_Dog on May 03, 2010, 04:46:47 am
Quote
Will it work with TASM and others? If not, you may want to warn users of other IDEs and compilers about that, altough I guess your tutorial is probably mostly aimed towards Spasm users

Unfortunately, since I've only done ASM for less than a year (and have had terrible personal problems with TASM) I lack the knowledge to describe what works and what doesn't.  However, I do agree with you that I can at least warn people that the particular version of ti83plus.inc works particularly with spasm
Title: Re: Important Information about Hot Dog's Tutorial Number 4
Post by: DJ Omnimaga on May 03, 2010, 04:54:38 am
I might be too old skool XD

Back when I tried learning ASM (all 3 attempts), Spasm did not even exist. In fact, Spencer wasn't even Revsoft staff yet and RevSoft didn't exist altogether during my first attempt. Latenite, Brass and EarlyMorning, from MaxCoderz, were not even started yet either. TASM/devpac8x and the TI-83+ SDK was all we had to develop on calcs.
Title: Re: Important Information about Hot Dog's Tutorial Number 4
Post by: calcdude84se on May 03, 2010, 07:27:11 am
You poor, poor soul. :)
I've tried TASM and don't really care for it. Nowadays I use Brass. I may try SPASM once revsoft is back up and I can download it.
Title: Re: Important Information about Hot Dog's Tutorial Number 4
Post by: DJ Omnimaga on May 03, 2010, 01:20:17 pm
Yeah those old days were kinda hectic about starting up in ASM. So many people kept asking help about that "No END directive before EOF" error even when their code was right and had to add an additional linebreak after their code due to a TASM bug x.x.

It doesn't matter much anymore, though, cuz I pretty much gave up on ASM, seeing as the language is just not for me (altough I wonder if Hot Dog tutorial could give me another chance at it?), so I stuck with TI-BASIC for my entire 9 years in calc programming and recently ventured into Axe. That said, even if I knew ASM a bit, I got told by Iambian himself that making a RPG in ASM is a major hassle because of all the data and large size and that it is why so many ASM RPG projects died in the past. So not only ASM is not suitable for me but it's also not suitable for what kind of game I usually did x.x
Title: Re: Important Information about Hot Dog's Tutorial Number 4
Post by: Hot_Dog on May 03, 2010, 01:38:53 pm
Quote
It doesn't matter much anymore, though, cuz I pretty much gave up on ASM, seeing as the language is just not for me (altough I wonder if Hot Dog tutorial could give me another chance at it?), so I stuck with TI-BASIC for my entire 9 years in calc programming and recently ventured into Axe. That said, even if I knew ASM a bit, I got told by Iambian himself that making a RPG in ASM is a major hassle because of all the data and large size and that it is why so many ASM RPG projects died in the past. So not only ASM is not suitable for me but it's also not suitable for what kind of game I usually did x.x

I'm flattered  ;)

Anyways, if you were willing to make ASM rpgs if they were easy to do, maybe there's an engine somewhere?  Or if not, maybe you can use bits and pieces from projects--like tilemap routines--to create your own engine, and then "fill in the blanks," and then the rest is just data.  It won't be as good as making a fresh RPG, but it would still allow you to do more than a Ti-Basic RPG.  Actually, if I wasn't seriously considering giving up on calcs after S.A.D., I noticed the S.A.D. engine allowed easy transference to RPG so I was looking into creating one myself.

With all that said, I agree by a long shot that Ti-Basic RPGS are much easier to do.  I think that this is partially because you know you have limits in Ti-Basic, but when it comes to ASM, you have so much you can do that you find it hard to limit yourself.  I doubt that an ASM text-based RPG would be too much harder to write than a Ti-Basic text RPG.
Title: Re: Important Information about Hot Dog's Tutorial Number 4
Post by: DJ Omnimaga on May 03, 2010, 01:44:41 pm
Nah the tilemapper isn't a big issue. I heard the major issue was when it came to making the menu and adding all the text. Engine-wise, RPG making was apparently OK. It's just all the game-speficic stuff that was insane. Iambian, who worked on two RPGs so far (Final Fantasy 1 in 2003, which he never finished, and E:SoR, which is still in the works), even recommended me to either stick to TI-BASIC for a calc RPG or to use an hybrid of ASM programs (example, walking engine, fetching its data from BASIC stuff) and BASIC (and xLIB/Celtic) or simply stick to TI-BASIC altogether (since accessing BASIC variables in ASM is apparently tricky)
Title: Re: Mistakes made in the ASM tutorials
Post by: Hot_Dog on May 15, 2010, 07:51:59 pm
Mistake in Lesson 10: In binary, 7 = 00000111, not 00001111.  Also, 6 should equal 00000110, not 00001110.
Title: Re: Mistakes made in the ASM tutorials
Post by: Madskillz on May 15, 2010, 08:11:54 pm
Apparently 15 is the answer to everything huh?
Title: Re: Mistakes made in the ASM tutorials
Post by: Quigibo on May 15, 2010, 08:48:01 pm
Funny, I thought it was 42...
Title: Re: Mistakes made in the ASM tutorials
Post by: meishe91 on May 15, 2010, 09:15:35 pm
That would be the answer to the universe, life, AND everything :P
Title: Re: Mistakes made in the ASM tutorials
Post by: Raylin on May 15, 2010, 09:22:35 pm
I can has latest SPASM compatible ti83plus.inc file?
Title: Re: Mistakes made in the ASM tutorials
Post by: DJ Omnimaga on May 15, 2010, 10:32:31 pm
It's the one in the first post, attached at the bottom, I think.
Title: Re: Mistakes made in the ASM tutorials
Post by: Raylin on May 15, 2010, 10:35:52 pm
But, is that the latest? I know that the include file I have is about a year old.
Are there any new commands or B_CALL's that have been included?
Title: Re: Mistakes made in the ASM tutorials
Post by: calcdude84se on May 16, 2010, 08:04:22 am
I doubt it... The OS architecture has remained essentially the same throughout its versions.
The only possibly new bcalls (which may not be in any standard include file, not to mention the 84+ series is over a year old anyway) are 84+(SE) specific ones, which wouldn't be covered by Hot_Dog's tutorial for a long time.
Title: Re: Mistakes made in the ASM tutorials
Post by: Hot_Dog on June 23, 2010, 02:14:20 pm
In lesson 9, on page 12, I had the following text in bold:

Whenever you see a function that has a parameter
of a one-byte value, you can also use (HL) inside that parameter.


That was a mistake.  Instead of "one-byte value", it should be "one-byte register."
Title: Re: Mistakes made in the ASM tutorials
Post by: mapar007 on June 25, 2010, 05:41:16 am
I think you should say somewhere that IX and HL are always mutually exclusive. There is no instruction that can take HL and IX as its arguments.  (so you can't do add hl,ix)
Title: Re: Mistakes made in the ASM tutorials
Post by: Hot_Dog on June 25, 2010, 10:43:28 am
I think you should say somewhere that IX and HL are always mutually exclusive. There is no instruction that can take HL and IX as its arguments.  (so you can't do add hl,ix)

Certainly, although so far, I haven't told the reader what IX is  8)
Title: Re: Mistakes made in the ASM tutorials
Post by: calc84maniac on June 25, 2010, 11:06:50 am
I think you should say somewhere that IX and HL are always mutually exclusive. There is no instruction that can take HL and IX as its arguments.  (so you can't do add hl,ix)
Well, actually, the major exception (which I didn't realize for quite a while) was that the "ld h,(ix+n)", "ld l,(ix+n)", "ld (ix+n),h" and "ld (ix+n),l" instructions are actually quite valid.
Title: Re: Mistakes made in the ASM tutorials
Post by: tr1p1ea on June 25, 2010, 12:25:33 pm
Along with operations on ixl/ixh & iyl/iyh.
Title: Re: Mistakes made in the ASM tutorials
Post by: DJ Omnimaga on June 25, 2010, 05:37:52 pm
By the way, I haven't got time to check the tutorials yet, but are you planning to have a section specifically for stuff that is not compatible with the TI-Nspire, discouraging their usage unless absolutely needed (for speed, for example)?
Title: Re: Mistakes made in the ASM tutorials
Post by: ztrumpet on June 25, 2010, 05:40:35 pm
By the way, I haven't got time to check the tutorials yet, but are you planning to have a section specifically for stuff that is not compatible with the TI-Nspire, discouraging their usage unless absolutely needed (for speed, for example)?
Actually I don't think he's going to describe undocumented instructions (unless they are in an appendix). :)
Title: Re: Mistakes made in the ASM tutorials
Post by: DJ Omnimaga on June 25, 2010, 05:42:22 pm
Aaah ok. Well, if he ever do any doc on them, he should probably warn that those will not work on the Nspire.
Title: Re: Mistakes made in the ASM tutorials
Post by: Hot_Dog on June 25, 2010, 07:09:24 pm
Aaah ok. Well, if he ever do any doc on them, he should probably warn that those will not work on the Nspire.

I think I'll put them in an appendix.  Thanks, btw, I'll be sure to warn about Nspire compatability.
Title: Re: Mistakes made in the ASM tutorials
Post by: ralphdspam on March 06, 2011, 03:49:29 pm
Quote from: Lesson 6 Page 9
Main_Menu .equ 0
Settings_Menu .equ1
Players_Menu .equ 2
Names_Menu .equ 3
Main_Menu_Items .equ 4
Settings_Menu_Items .equ 3
Players_Menu_Items .equ Settings_Menu_Items
Names_Menu_Items .equ Player_Menu_Items
Should be:
Code: [Select]
Names_Menu_Items .equ Players_Menu_Items
(I think)
Title: Re: Mistakes made in the ASM tutorials
Post by: souvik1997 on March 06, 2011, 03:55:29 pm
Also, .org 40339 should be changed to .org $9D93, because RAM addresses are generally expressed in hexadecimal.
Title: Re: Mistakes made in the ASM tutorials
Post by: Hot_Dog on March 06, 2011, 04:14:18 pm
Quote from: Lesson 6 Page 9
Main_Menu .equ 0
Settings_Menu .equ1
Players_Menu .equ 2
Names_Menu .equ 3
Main_Menu_Items .equ 4
Settings_Menu_Items .equ 3
Players_Menu_Items .equ Settings_Menu_Items
Names_Menu_Items .equ Player_Menu_Items
Should be:
Code: [Select]
Names_Menu_Items .equ Players_Menu_Items
(I think)


Yeah, I think you're right

Title: Re: Mistakes made in the ASM tutorials
Post by: ralphdspam on March 06, 2011, 05:22:17 pm
Also, .org 40339 should be changed to .org $9D93, because RAM addresses are generally expressed in hexadecimal.
... You might want to see this
http://ourl.ca/9514
Title: Re: Mistakes made in the ASM tutorials
Post by: Hot_Dog on March 06, 2011, 05:24:41 pm
Also, .org 40339 should be changed to .org $9D93, because RAM addresses are generally expressed in hexadecimal.
Um... you might want to see this
http://ourl.ca/9514

Don't worry about it Ralphdspam.  The topic wasn't up at that time.
Title: Re: Mistakes made in the ASM tutorials
Post by: ralphdspam on March 06, 2011, 07:35:05 pm
Quote from: Lesson 7 Page 11
T-States: Byte Storage:
JR—12 if condition is true 2 Bytes
7 if condition is true 2 Bytes
JP – 10 no matter what
Which is it 12 or 7 if the condition is true?
Which one is it if it is false?
Title: Re: Mistakes made in the ASM tutorials
Post by: Hot_Dog on March 06, 2011, 10:01:55 pm
Oops: 7 T-States if condition is false
Title: Re: Mistakes made in the ASM tutorials
Post by: ralphdspam on March 08, 2011, 10:25:54 pm
Quote from: Lesson 8 Page 13
#include “ti83plus.inc”
.org 40339
.db t2ByteTok, tAsmCmp
B_CALL _ClrLCDFull
ld a, 1
cp 1 ; If A = 1
jr z, DisplayNumber1 ; A – 1 = 0. So, if A = 1, CP 1 will
; give A – 1 = 1 – 1 = 0, therefore the
; zero (Z) flag will be set
cp 2
ret z ; If A = 2, end the program
DisplayNumber1:
ld h, 0
ld l, a ; Remember that CP does not affect A. A still equals 1.
B_CALL _DispHL
B_CALL _getKey
B_CALL _ClrCLDFull
ret
I think should be B_CALL _ClrLCDFull
Title: Re: Mistakes made in the ASM tutorials
Post by: Hot_Dog on March 08, 2011, 10:37:20 pm
Yeah, you're right, and that one's weird because I usually test my programs
Title: Re: Mistakes made in the ASM tutorials
Post by: ralphdspam on March 08, 2011, 10:54:24 pm
Quote from: Lesson 8 Page 14
cp 27 ; If A = 1
I don't think it is the equivalent of "If A = 1".
Title: Re: Mistakes made in the ASM tutorials
Post by: Hot_Dog on March 08, 2011, 11:51:30 pm
Nope, it's not.  Keep em coming!
Title: Re: Mistakes made in the ASM tutorials
Post by: ralphdspam on March 12, 2011, 12:25:08 am
Quote from: Lesson 8 Page 14
Load_Player_Data:
ld b, (hl) ; In a perfect world, h contains the ram address to load from
inc h
ld c, (hl)
inc hl
ld d, (hl)
inc hl
ld e, (hl)
inc hl
ld a, (hl)
ret
Did you mean "inc hl"?

This too:
Quote from: Lesson 8 Page 16
Text:
.db “Hello World”, “This is my string,” 224, 65, 67, 67, 65, etc.

This one is really knit picky. :P
Title: Re: Mistakes made in the ASM tutorials
Post by: Hot_Dog on March 12, 2011, 12:38:24 am
I don't know what is wrong with the second one, but definitely inc hl instead of inc h.
Title: Re: Mistakes made in the ASM tutorials
Post by: ralphdspam on March 12, 2011, 12:41:29 am
For the second one, I thought it should be
.db "Hello World", "This is my string", 224, 65, 67, 67, 65, etc.

In the lesson, it was:
Quote
.db "Hello World", "This is my string," 224, 65, 67, 67, 65, etc.

I don't know. I am supposed to be the one learning. :P
Title: Re: Mistakes made in the ASM tutorials
Post by: Hot_Dog on March 12, 2011, 12:52:46 am
Oh, well you're correct there, the comma should be outside
Title: Re: Mistakes made in the ASM tutorials
Post by: Hot_Dog on March 12, 2011, 01:04:35 am
Sorry for the double post, but I've got to say this: thanks for catching the errors, ralphdspam, I like it for two reasons:

1. Readers will not have so many errors
2. It shows that you are understanding asm from reading these tutorials, which is what I was aiming for
Title: Re: Mistakes made in the ASM tutorials
Post by: ralphdspam on March 15, 2011, 11:13:31 pm
Quote from: Lesson 11 Page 3
B_CALL _VPutSN
Displays a string specified by HL. The string does not end in a
zero. Instead, the number of characters to display is stored in
register B.
Examples: LD HL, String
LD B, 11
B_CALL PutS
String:
.db “Hello World”

Is that supposed to be B_CALL _VPutSN?
I am kind of confused. ???

EDIT: I could not find this command in the new tutorials.  ???
Title: Re: Mistakes made in the ASM tutorials
Post by: Hot_Dog on March 16, 2011, 12:00:30 am
Quote from: Lesson 11 Page 3
B_CALL _VPutSN
Displays a string specified by HL. The string does not end in a
zero. Instead, the number of characters to display is stored in
register B.
Examples: LD HL, String
LD B, 11
B_CALL PutS
String:
.db “Hello World”

Is that supposed to be B_CALL _VPutSN?
I am kind of confused. ???

No need to be confused.  That is indeed another typo
Title: Re: Mistakes made in the ASM tutorials
Post by: ralphdspam on March 16, 2011, 12:31:01 am
Also, I think:
Quote from: Lesson 11 Page 13
B_CALL _ClrLCDFull
     ld d, MainMenuItem1X ; Stores the X position for the menu
     ld e, MainMenuItem1Y ; Stores the starting Y position for the menu
should be:
Code: [Select]
     B_CALL _ClrLCDFull
     ld d, MainMenuItem1X ; Stores the X position for the menu
     ld e, MainMenuItem1Y ; Stores the starting Y position for the menu

EDIT: This is not in the new tutorials. 
Title: Re: Mistakes made in the ASM tutorials
Post by: Hot_Dog on March 16, 2011, 12:33:55 am
Oh, I missed that tab, didn't I  :banghead:
Title: Re: Mistakes made in the ASM tutorials
Post by: TIfanx1999 on March 16, 2011, 02:52:29 am
I'm glad many of these errors are being caught. It means there will be less mistakes when I start reading through it (soon). :D So thank you for those who are/have found typos and errors. :)
Title: Re: Mistakes made in the ASM tutorials
Post by: ralphdspam on March 17, 2011, 12:01:05 am
Quote from: Lesson 11 Page 8
Let’s work on the routine to display the menu. I’ll give you the
code line by line, and explain it on the way. Create a new text file called
“ASMGorillasStartProgram.asm”, and include this in
“ASMGorillasMain.asm.”
Quote from: Lesson 13 Page 8
Finally, go to “ASMGorillasMenus.asm” and replace the top four
lines with the following line:

I think the file created in lesson 11 was supposed to be named "ASMGorillasMenus.asm".  ???

EDIT:
Wait, it's no wonder you're finding all these typos.  You're looking at the old lessons, and I know that because I canceled ASM Gorillas.
Title: Re: Mistakes made in the ASM tutorials
Post by: Hot_Dog on March 17, 2011, 12:14:08 am
Wait, it's no wonder you're finding all these typos.  You're looking at the old lessons, and I know that because I canceled ASM Gorillas.  

Go to this link, and you should find fewer mistakes:

http://www.omnimaga.org/index.php?action=downloads;cat=67

Title: Re: Mistakes made in the ASM tutorials
Post by: ralphdspam on March 17, 2011, 12:34:53 am
 O.O  :o
Oh, I didn't see that. 
Can you edit your first post on your lesson thread?  I hope no one else makes the same mistake. :P
Title: Re: Mistakes made in the ASM tutorials
Post by: Hot_Dog on March 17, 2011, 12:35:18 am
O.O  :o
Oh, I didn't see that. 
Can you edit your first post on your lesson thread?  I hope no one else makes the same mistake. :P

Yeah, I really need to do that.
Title: Re: Mistakes made in the ASM tutorials
Post by: ralphdspam on March 17, 2011, 12:37:15 am
BTW, which lesson should I start on now? (I was on lesson 13 before.)
Title: Re: Mistakes made in the ASM tutorials
Post by: Hot_Dog on March 17, 2011, 12:43:25 am
Start on lesson 11.

Hopefully you now have all the files you need, including the right ti83plus.inc ;)
Title: Re: Mistakes made in the ASM tutorials
Post by: ralphdspam on March 20, 2011, 11:33:56 pm
Ok.  Thank you, Hot_Dog for directing me to the correct tutorials.  :)
I edited all of my old posts with the correct lessons.  

The last three errors are no longer in your lessons because you do not have those lessons anymore. :P

I just want to thank you because your tutorials are really teaching me ASM.  :D
Title: Re: Mistakes made in the ASM tutorials
Post by: Hot_Dog on March 20, 2011, 11:40:10 pm
I just want to thank you because your tutorials are really teaching me ASM.  :D

I'm glad to hear that, and you're welcome!

So, what's your opinion on lesson #5?  That's the one I was a little bit skeptical about.  Did it help a lot, did you not understand it, perhaps a neutral opinion?
Title: Re: Mistakes made in the ASM tutorials
Post by: ralphdspam on March 21, 2011, 12:16:08 am
I understood lesson 5.  I guess that is a neutral opinion.  

Quote from:  Lesson 11 Page 9
.option BM_SHD = 2
.option bm_min_w = 8
#include “ti83plus.inc”
.org $9D93
.db t2ByteTok, tAsmCmp

should be:
Code: [Select]
.option BM_SHD = 2
.option bm_min_w = 96
#include “ti83plus.inc”
.org $9D93
.db t2ByteTok, tAsmCmp

Also:
Quote from: Lesson 13 Page 12
LD HL, Divide_By_4_23
LD DE, OP2 ;Division requires two numbers, so OP2 holds our second one.
LD BC, 9
LDIRB_CALL _FPDiv ;Multiply 1.5 by 3
ld hl, 0 ;Where we want to display the result on the screen
ld (penCol), hl
ld a, 11 ;Displays 10 digits
B_CALL _DispOP1A
B_CALL _getKey



Thanks to lesson 11, I can do this :P:
Title: Re: Mistakes made in the ASM tutorials
Post by: Hot_Dog on March 21, 2011, 11:55:37 am
You're on lesson 13?  Wow, you're a fast learner ;D
Title: Re: Mistakes made in the ASM tutorials
Post by: DJ Omnimaga on March 27, 2011, 05:30:15 pm
I'M glad to see more people can learn ASM with these tutorials. However, I lost again. >:(