could you make text/document versions as well as the pdfs by any chance? :{O
I just finished reading the second lesson. That I was able to understand perfectly!! It was a great tutorial. With learn asm in 28 days I was like, what's register? Now I understand how it works. What I especially like about your tutorial is that it's really fun to read it. Adding those cartoons sure make me laugh :) great job and keep up the good work
Lol I just took a quick look at Lesson 3, and I wonder if for early BASIC programmers, Axe Parser couldn't act as some sort of bridge towards ASM? Some of the pointer stuff seems pretty similar to Axe. Of course, in lower level but still pointers/memory addresses
It might be good to specify how much RAM exactly in total the 83+ has, though.
In tutorial 2 you might want to give the right answer for computation 4
Hot_Dog, why is the .org statement given as a base-10 number? Wouldn't it be more effective just to use hex, since that's what will be used later anyway? Or do you plan to change it eventually?
Edit: I am, of course, referring to Lesson 4
By the way, H and L can be used as a pair. Since H = 0 and L = 6, HL =
06, meaning HL = 6. For the time being, don’t take this and run with it:
if H = 1 and L = 7, HL DOES NOT equal 17.
23
*Edit* actually I take that back, it would be 263. Just woke up, still half asleep. X_X
On my side of things, I've gotten a lot of errors when trying to compile your programs.
I haven't compile a program yet.
This error is the culprit:
ti83plus.inc:51: error: Can't recognize 'EQU' as an instruction or macro
Btw Hot_Dog I like your sig ;D
However, for some reasons, it reminded me that topic ;D (http://ourl.ca/3728)
I really like the tutorials Hot Dog! I've read them so far (1-5) and it's inspired me to give Asm another try. Yours are really well written and have taught me some stuff that confused me in Asm in 28. Awesome job! I can't wait to grab 6 off the printer!
I did not even know Lesson 5 was even posted at all. Unfortunately, though, I don't think I will be able to read the tutorial again until the next few months, because I cannot really concentrate well enough to tell if there is anything to improve on the tutorial, especially about ASM.
ld a, 250should you say that a is zero b/c 256==0 (mod 256) (or something like that)? because replacing that 250 w/a 253 would make a 3 after the add.
ld e, 6
add a, e ; Remember that a cannot be bigger than 255, so it resets to zero
For this:Quoteld a, 250should you say that a is zero b/c 256==0 (mod 256) (or something like that)? because replacing that 250 w/a 253 would make a 3 after the add.
ld e, 6
add a, e ; Remember that a cannot be bigger than 255, so it resets to zero
Other than that clarification (maybe) I found that lesson pretty good.
*braces himself for Chapter 9*
Awesome!
Will you talk about sprites in this one too?
Btw how many chapters do you think there will be in the final tutorial?
Wow a lot :O, but I think it's better this way than squishing everything in very few page and making it harder to understand in the process.
Lessons 7 and 8 were a little harder to follow, but I think this is necessary as they cover some pretty hard stuff. :)
Still, excellent guide! :D
One byte registers are ONLY A, B, C, D, E, H, and L.What about ixh, ixl, iyh, and iyl? Can't you use those also if need be?
One byte registers are ONLY A, B, C, D, E, H, and L.
What about ixh, ixl, iyh, and iyl? Can't you use those also if need be?
You can (but not on Nspire since TI fails). Otherwise we wouldn't even name them -- you don't see sph and spl.QuoteOne byte registers are ONLY A, B, C, D, E, H, and L.
What about ixh, ixl, iyh, and iyl? Can't you use those also if need be?
That's a good calc84maniac or Iambian question, since I'm busy for the rest of the day and can't look those up. As far as I know you can't use ixh, ixl, iyh and iyl in functions that require a 1-byte register
You can (but not on Nspire since TI fails). Otherwise we wouldn't even name them -- you don't see sph and spl.QuoteOne byte registers are ONLY A, B, C, D, E, H, and L.
What about ixh, ixl, iyh, and iyl? Can't you use those also if need be?
That's a good calc84maniac or Iambian question, since I'm busy for the rest of the day and can't look those up. As far as I know you can't use ixh, ixl, iyh and iyl in functions that require a 1-byte register
The Nspire's z80 emulation isn't completeAnd it isn't guaranteed it will ever be complete. I wouldn't even be surprised if in future TI-Nspire OS updates, it actually became worse.
you don't see sph and spl.Thanks for answering. :)
Lol, ztrumpet, you're getting too far ahead of yourself.Lol, I know. It's fun to learn, right. In fact, I thought of everything in Iambian's post except for #3.
in lesson 9, i noticed that in your first example using _PutS, you left out the underscore.
Hurray for typos...
Can you explain? Is there a compilation of all Asm in 28's typos? I don't want to learn wrong. :)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)
IIRC, all you can do with af is ex af,af'; push af; and pop af
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
Suggestion: Since there are many lessons, you should attack another zip file in the first post that contains every single lesson in one file, so newer members won't need to download each lessons one by one
Leaving the readers in expectation by saying that direct key input exists w/o saying anything else... How cruel of you. :P
Btw, even if I do not have plans to learn ASM in the future, since I am fine with what TI-BASIC/xLIB can do for certain games and Axe for others, I still plan to check your stuff for some references, to know how some stuff work and possibly creating my own small ASM routines for games or other stuff
I know ztrumpet is "going to kill me" if I decide not to write Appendix C 8)Probably... ;D (jk)
Will there be a lesson covering the differences between Apps and Programs? I think this would be useful in your guide. :)
Oh come on D: at least this Hot Dog doesn't use reverse polish sausage :PI know ztrumpet is "going to kill me" if I decide not to write Appendix C 8)Probably... ;D (jk)
ROFLMAOOh come on D: at least this Hot Dog doesn't use reverse polish sausage :PI know ztrumpet is "going to kill me" if I decide not to write Appendix C 8)Probably... ;D (jk)
LOL! That's hilarious! :PROFLMAOOh come on D: at least this Hot Dog doesn't use reverse polish sausage :PI know ztrumpet is "going to kill me" if I decide not to write Appendix C 8)Probably... ;D (jk)
I read over the first few tutorials, and kudos for trying to keep it informative and lighthearted. I gotta say though, I am quite concerned at your avoidance of hex, such as the confusing .org 40339 instead of the universally-accepted .org $9D93 or .org $9d95-2 or .org progstart or .org 9d95h-2. I also take issue with B_CALL_STUFF; I understand if you prefer that form, but you should at least mention that most people use b_call(_stuff) or bcall(_stuff). Miotatsu was having troubles assembling a program after reading your tutorials, though luckily he stopped by and gave me a shout, because he was using the standard include file that uses bcall(_stuff). I'll let you know if I have any further comments when I get to look through the tutorials more thoroughly.
Glad to hear it. :)I read over the first few tutorials, and kudos for trying to keep it informative and lighthearted. I gotta say though, I am quite concerned at your avoidance of hex, such as the confusing .org 40339 instead of the universally-accepted .org $9D93 or .org $9d95-2 or .org progstart or .org 9d95h-2. I also take issue with B_CALL_STUFF; I understand if you prefer that form, but you should at least mention that most people use b_call(_stuff) or bcall(_stuff). Miotatsu was having troubles assembling a program after reading your tutorials, though luckily he stopped by and gave me a shout, because he was using the standard include file that uses bcall(_stuff). I'll let you know if I have any further comments when I get to look through the tutorials more thoroughly.
Before I say anything, I really appreciate your comments.
Hexadecimal does come later. However, universally accepted does not necessarily mean "easy." I'm not defending myself as much as asking, "does it really make a difference?"Oh good, I only got as far as 4 so far. No, technically it doesn't make a difference, but I for one filled in a lot of my confusion by staring at existing z80 ASM programs, examining them, toying with them, and reassembling them. I'm afraid if you err to far from the accepted form, your loyal pupils may be confused looking at existing source.
I also understand my error with the wrong include file, and thank you for pointing out that it's an error I need to fix. However, in terms of B_CALL with parenthesis, I'm afraid I lack knowledge on other compilers, which is part of the reason why I say in the 4th tutorial that Spasm is the only compiler I will be refering to in the lessons. After all, there's many difference besides simply B_CALL with parenthesis.Definitely, and you're absolutely within your rights to use SPASM form. I think it might be helpful to acknowledge the standard form that is used with [Brass, TASM, and a few others].
I was using spasm, the include file that came with the recently released zip with tutorials 1-12 apparently likes bcall(_stuff) :p
Mhmm what do you mean by packed up? Are you moving soon or something? Glad to see there will be new lessons being posted soon, though :)
Wow, that long?
making sure that the program examples workThank you for doing this! I'm sure there's some stuff in Asm in 28 that's not right. :)
Yeah, there are a few errors in Asm in 28. However, I'm not sure where they are and I don't know of any compilation...
Can you please post the correct routine? I don't want to learn that wrong. ;DYeah, there are a few errors in Asm in 28. However, I'm not sure where they are and I don't know of any compilation...
The most famous one is the sprite routine in chapter 25
Quote from: Hot_Dog on Today at 14:30:21
Quote from: calcdude84se on Today at 14:26:38
Yeah, there are a few errors in Asm in 28. However, I'm not sure where they are and I don't know of any compilation...
The most famous one is the sprite routine in chapter 25
Can you please post the correct routine? I don't want to learn that wrong.
B_CALL _ClrLCDFull
ld
Aah ok :P
About the tutorial, I wonder if you planned to add a section on debugging (tips, tricks, such as making your program display some used values on the screen during program execution and other stuff)? This is one part that might be useful to some people
LESSON 16 NEXT WEEKYea! I can't wait! ;D
Aaah ok. Well, I meant more stuff such as how in BASIC, to check if I some code is executed at all, I'll add a pause or wait for keypress command before it or other smaller tricks that doesn't involve using debuggers.Aah ok :P
About the tutorial, I wonder if you planned to add a section on debugging (tips, tricks, such as making your program display some used values on the screen during program execution and other stuff)? This is one part that might be useful to some people
I've never work with debugging tools, so I wouldn't know anything about them. However, I've made my own debugging tools, so I might be able to make a brief comment on something like that. Chances are, if I know something valuable about debugging, people who read these lessons will realize what that "valuable something" is without me having to tell them. It's a rather interesting psychological phenomonen.
LESSON 16 NEXT WEEK
Aaah ok. Well, I meant more stuff such as how in BASIC, to check if I some code is executed at all, I'll add a pause or wait for keypress command before it or other smaller tricks that doesn't involve using debuggers.Aah ok :P
About the tutorial, I wonder if you planned to add a section on debugging (tips, tricks, such as making your program display some used values on the screen during program execution and other stuff)? This is one part that might be useful to some people
I've never work with debugging tools, so I wouldn't know anything about them. However, I've made my own debugging tools, so I might be able to make a brief comment on something like that. Chances are, if I know something valuable about debugging, people who read these lessons will realize what that "valuable something" is without me having to tell them. It's a rather interesting psychological phenomonen.
LESSON 16 NEXT WEEK
I apologize that lesson 16 is delayed till next week. Reworking the S.A.D. engine has been worth it (you'll get hotkeys sooner than you think, for example), but it has taken up a lot of my time.;D Yay! More SAD Progress is worth it. :)
Btw is it the one talking about some S.A.D techniques as you talked about on IRC earlier?
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
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?
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?
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.
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.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?
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 :)
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.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?
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 :)
Is (HL) (adress location) modified because you use these commands? or does it destroy HL?
jp (hl)
jp (hl)
and notjp hl
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.
Yeah this tutorial really helped me when i started dabbling in Asm a little bit ago :) Although i did find myself going back and forth between this one and Asm28days.
Ok ^^
One idea I had was that after I got more comfortable with Axe, I may check your tutorials to attempt understanding some ASM concepts again. Currently, I have troubles setting up tiDE due to an update bug which SirCmpwn needs to fix, but hopefully it may be setup at one point. I don't think I will write entire games in ASM, but it should give me more freedom and help me understand some things easier.
:'(
Also please do not delete the old lesson 13/14 yet, I am curious how many downloads this got total so far.
A couple things I noticed: You don't actually have to have different .asm files for each page. The defpage() macro is all that matters. Also, you can get the page number of a label by shifting it right by 16 (SPASM stores the label values as 24-bit)
Nice, I'll try to grab them all when you are finished
Hot_Dog, could you hit me up with a single zip file with everything? Thanks.
DelVar D4→R
8→C
Repeat 0
getKey→K
If Ans=26
1→D
Output(R,C,"_
C+D
Ans-16((Ans=17)-not(Ans→C
Output(R,Ans,"O
rand(2 \\rand or rand(# is a better way to do delay/pauses/slowdowns/etc. in TI-BASIC.
End
thanks man. I've got an easier question. I got past the sprite clipping issue i was running into, but how do you use delay in asm? I know in basic you can do for(A,1,1000):end and I could then do
while 1
getkey->Z
if z==24
then
for(A,1,1000):end
output(R,C," "
c-1->c
output(R,C,"O"
end
end
i want to be able to hit the right arrow, and my character/sprite continuously go right. any thoughts?
thanks guys! Sorry about the lack of completion on the previous example. I had just threw an example in there without the rows or columns set yet to show what I was getting at. I think oddly enough I understand asm better than basic at this point from learning hotdog's tutorials with little knowledge of basic.
thanks again!
Cool! By draft, do you mean that there will be another version released later?
I have a question:
According to this tutorial, there are supposed to be 5 Appendix, right?
Where's the other two?
Hi - I just recently begun your lessons, and I've run into trouble with the first sample problem (Where it displays 1+5)
It doesn't display anything, but quits normally when I press any key.
I have 2.53 OS - does that make a difference?
(I've attached the asm file because I'm probably doing something wrong in it)
Hi - I just recently begun your lessons, and I've run into trouble with the first sample problem (Where it displays 1+5)
It doesn't display anything, but quits normally when I press any key.
I have 2.53 OS - does that make a difference?
(I've attached the asm file because I'm probably doing something wrong in it)
.db t2ByteTok, tAsmCmp
ld a, 1
or.db t2ByteTok,tAsmCmp
ld a,1
or.db t2ByteTok , tAsmCmp
ld a, 1
(although the last example is pretty ridiculous)
;2nd Half Of User Equation Tokens
;----------------------------------
; "Y" EQUATIONS HAVE BIT 4 SET
;
tY1 equ 10h ;Y1
tY2 equ 11h ;Y2
tY3 equ 12h ;Y3
tY4 equ 13h ;Y4
tY5 equ 14h ;Y5
tY6 equ 15h ;Y6
tY7 equ 16h ;Y7
tY8 equ 17h ;Y8
tY9 equ 18h ;Y9
tY0 equ 19h ;Y0
;Param Equations Have Bit 5 Set
;-----------------------------------
tX1T equ 20h ;X1t
tY1T equ 21h ;Y1t
tX2T equ 22h ;X2t
tY2T equ 23h ;Y2t
tX3T equ 24h ;X3t
tY3T equ 25h ;Y3t
tX4T equ 26h ;X4t
tY4T equ 27h ;Y4t
tX5T equ 28h ;X5t
tY5T equ 29h ;Y5t
tX6T equ 2Ah ;X6t
tY6T equ 2Bh ;Y6t
;Polar Equations Have Bit 6 Set
;----------------------------------
tR1 equ 40h ;R1
tR2 equ 41h ;R2
tR3 equ 42h ;R3
tR4 equ 43h ;R4
tR5 equ 44h ;R5
tR6 equ 45h ;R6
;Recursion Equations Have Bit 7 Set
;----------------------------------
tun equ 80h ;Un
tvn equ 81h ;Vn
twn equ 82h ;Wn
;2nd Half Of User Picture Tokens
;------------------------------------
tPic1 equ 00h ;PIC1
tPic2 equ 01h ;PIC2
tPic3 equ 02h ;PIC3
tPic4 equ 03h ;PIC4
tPic5 equ 04h ;PIC5
tPic6 equ 05h ;PIC6
tPic7 equ 06h ;PIC7
tPic8 equ 07h ;PIC8
tPic9 equ 08h ;PIC9
tPic0 equ 09h ;PIC0
;2nd Half Of User Graph Database Tokens
;--------------------------------------
tGDB1 equ 00h ;GDB1
tGDB2 equ 01h ;GDB2
tGDB3 equ 02h ;GDB3
tGDB4 equ 03h ;GDB4
tGDB5 equ 04h ;GDB5
tGDB6 equ 05h ;GDB6
tGDB7 equ 06h ;GDB7
tGDB8 equ 07h ;GDB8
tGDB9 equ 08h ;GDB9
tGDB0 equ 09h ;GDB0
;2nd Half Of String Vars
;------------------------------
tStr1 equ 00h
tStr2 equ 01h
tStr3 equ 02h
tStr4 equ 03h
tStr5 equ 04h
tStr6 equ 05h
tStr7 equ 06h
tStr8 equ 07h
tStr9 equ 08h
tStr0 equ 09h
;2nd Half Of System Output Only Variables
;-----------------------------------------------------------------
;OPEN equ 00h
tRegEq equ 01h ;REGRESSION EQUATION
tStatN equ 02h ;STATISTICS N
tXMean equ 03h ;X MEAN
tSumX equ 04h ;SUM(X)
tSumXSqr equ 05h ;SUM(X^2)
tStdX equ 06h ;STANDARD DEV X
tStdPX equ 07h ;STANDARD DEV POP X
tMinX equ 08h ;Min X VALUE
tMaxX equ 09h ;Max X VALUE
tMinY equ 0Ah ;Min Y VALUE
tMaxY equ 0Bh ;Max Y VALUE
tYmean equ 0Ch ;Y MEAN
tSumY equ 0Dh ;SUM(Y)
tSumYSqr equ 0Eh ;SUM(Y^2)
tStdY equ 0Fh ;STANDARD DEV Y
tStdPY equ 10h ;STANDARD DEV POP Y
tSumXY equ 11h ;SUM(XY)
tCorr equ 12h ;CORRELATION
tMedX equ 13h ;MED(X)
tQ1 equ 14h ;1ST QUADRANT OF X
tQ3 equ 15h ;3RD QUADRANT OF X
tQuadA equ 16h ;1ST TERM OF QUAD POLY REG/ Y-INT
tQuadB equ 17h ;2ND TERM OF QUAD POLY REG/ SLOPE
tQuadC equ 18h ;3RD TERM OF QUAD POLY REG
tCubeD equ 19h ;4TH TERM OF CUBIC POLY REG
tQuartE equ 1Ah ;5TH TERM OF QUART POLY REG
tMedX1 equ 1Bh ;x1 FOR MED-MED
tMedX2 equ 1Ch ;x2 FOR MED-MED
tMedX3 equ 1Dh ;x3 FOR MED-MED
tMedY1 equ 1Eh ;y1 FOR MED-MED
tMedY2 equ 1Fh ;y2 FOR MED-MED
tMedY3 equ 20h ;y3 FOR MED-MED
tRecurn equ 21h ;RECURSION N
tStatP equ 22h
tStatZ equ 23h
tStatT equ 24h
tStatChi equ 25h
tStatF equ 26h
tStatDF equ 27h
tStatPhat equ 28h
tStatPhat1 equ 29h
tStatPhat2 equ 2Ah
tStatMeanX1 equ 2Bh
tStatStdX1 equ 2Ch
tStatN1 equ 2Dh
tStatMeanX2 equ 2Eh
tStatStdX2 equ 2Fh
tStatN2 equ 30h
tStatStdXP equ 31h
tStatLower equ 32h
tStatUpper equ 33h
tStat_s equ 34h
tLRSqr equ 35h ;r^2
tBRSqr equ 36h ;R^2
;These next tokens are only used to access the data
;they are display only and the user cannot access them at all
;------------------------------------------------------------
tF_DF equ 37h ;ANOFAV FACTOR DF
tF_SS equ 38h ;ANOFAV FACTOR SS
tF_MS equ 39h ;ANOFAV FACTOR MS
tE_DF equ 3Ah ;ANOFAV ERROR DF
tE_SS equ 3Bh ;ANOFAV ERROR SS
tE_MS equ 3Ch ;ANOFAV ERROR MS
;2nd Half Of System Input/Output Variables
;------------------------------------------------
; SYSTEM VARIABLE EQUATES
;
tuXscl equ 0
tuYscl equ 1
tXscl equ 2
tYscl equ 3
tRecuru0 equ 4 ;U 1ST INITIAL COND
tRecurv0 equ 5 ;V 1ST INITIAL COND
tun1 equ 6 ;U(N-1); NOT USED
tvn1 equ 7 ;V(N-1); NOT USED
tuRecuru0 equ 8 ;
tuRecurv0 equ 9 ;
tXmin equ 0Ah
tXmax equ 0Bh
tYmin equ 0Ch
tYmax equ 0Dh
tTmin equ 0Eh
tTmax equ 0Fh
tThetaMin equ 10h
tThetaMax equ 11h
tuXmin equ 12h
tuXmax equ 13h
tuYmin equ 14h
tuYmax equ 15h
tuThetMin equ 16h
tuThetMax equ 17h
tuTmin equ 18h
tuTmax equ 19h
tTblMin equ 1Ah
tPlotStart equ 1Bh
tuPlotStart equ 1Ch
tnMax equ 1Dh
tunMax equ 1Eh
tnMin equ 1Fh
tunMin equ 20h
tTblStep equ 21h
tTStep equ 22h
tThetaStep equ 23h
tuTStep equ 24h
tuThetStep equ 25h
tDeltaX equ 26h
tDeltaY equ 27h
tXFact equ 28h
tYFact equ 29h
tTblInput equ 2Ah
tFinN equ 2Bh
tFinI equ 2Ch
tFinPV equ 2Dh
tFinPMT equ 2Eh
tFinFV equ 2Fh
tFinPY equ 30h
tFinCY equ 31h
tRecurw0 equ 32h ;w0(1)
tuRecurw0 equ 33h
tPlotStep equ 34h
tuPlotStep equ 35h
tXres equ 36h
tuXres equ 37h
tRecuru02 equ 38h ;u0(2)
tuRecuru02 equ 39h
tRecurv02 equ 3Ch ;v0(2)
tuRecurv02 equ 3Dh
tRecurw02 equ 3Eh ;w0(2)
tuRecurw02 equ 3Fh
;2nd Byte Of t2ByteTok Tokens
;------------------------------
tFinNPV equ 00h
tFinIRR equ 01h
tFinBAL equ 02h
tFinPRN equ 03h
tFinINT equ 04h
tFinToNom equ 05h
tFinToEff equ 06h
tFinDBD equ 07h
tLCM equ 08h
tGCD equ 09h
tRandInt equ 0Ah
tRandBin equ 0Bh
tSubStrng equ 0Ch
tStdDev equ 0Dh
tVariance equ 0Eh
tInStrng equ 0Fh
tDNormal equ 10h
tInvNorm equ 11h
tDT equ 12h
tChI equ 13h
tDF equ 14h
tBINPDF equ 15h
tBINCDF equ 16h
tPOIPDF equ 17h
tPOICDF equ 18h
tGEOPDF equ 19h
tGEOCDF equ 1Ah
tNormalPDF equ 1Bh
tTPDF equ 1Ch
tChiPDF equ 1Dh
tFPDF equ 1Eh
tRandNorm equ 1Fh
tFinFPMT equ 20h
tFinFI equ 21h
tFinFPV equ 22h
tFinFN equ 23h
tFinFFV equ 24h
tConj equ 25h
tReal equ 26h
tImag equ 27h
tAngle equ 28h
tCumSum equ 29h
tExpr equ 2Ah
tLength equ 2Bh
tDeltaLst equ 2Ch
tRef equ 2Dh
tRRef equ 2Eh
tToRect equ 2Fh
tToPolar equ 30h
tConste equ 31h
tSinReg equ 32h
tLogistic equ 33h
tLinRegTTest equ 34h
tShadeNorm equ 35h
tShadeT equ 36h
tShadeChi equ 37h
tShadeF equ 38h
tMatToLst equ 39h
tLstToMat equ 3Ah
tZTest equ 3Bh
tTTest equ 3Ch
t2SampZTest equ 3Dh
t1PropZTest equ 3Eh
t2PropZTest equ 3Fh
tChiTest equ 40h
tZIntVal equ 41h
t2SampZInt equ 42h
t1PropZInt equ 43h
t2PropZInt equ 44h
tGraphStyle equ 45h
t2SampTTest equ 46h
t2SampFTest equ 47h
tTIntVal equ 48h
t2SampTInt equ 49h
tSetupLst equ 4Ah
tFinPMTend equ 4Bh
tFinPMTbeg equ 4Ch
tRealM equ 4Dh
tPolarM equ 4Eh
tRectM equ 4Fh
tExprOn equ 50h
tExprOff equ 51h
tClrAllLst equ 52h
tGetCalc equ 53h
tDelVar equ 54h
tEquToStrng equ 55h
tStrngToEqu equ 56h
tDelLast equ 57h
tSelect equ 58h
tANOVA equ 59h
tModBox equ 5Ah
tNormProb equ 5Bh
tMGT equ 64h ;VERTICAL SPLIT
tZFit equ 65h ;ZOOM FIT
tDiag_on equ 66h ;DIANOSTIC DISPLAY ON
tDiag_off equ 67h ;DIANOSTIC DISPLAY OFF
tOkEnd2v0 equ 67h ;end of 2byte tokens for version 0.
tArchive equ 68h ;archive
tUnarchive equ 69h ;unarchive
tasm equ 6Ah
tasmComp equ 6Bh ;asm compile
tasmPrgm equ 6Ch ;signifies a program is asm
tasmCmp equ 6Dh ;asm program is compiled
tLcapAAcute equ 6Eh
tLcapAGrave equ 6Fh
tLcapACaret equ 70h
tLcapADier equ 71h
tLaAcute equ 72h
tLaGrave equ 73h
tLaCaret equ 74h
tLaDier equ 75h
tLcapEAcute equ 76h
tLcapEGrave equ 77h
tLcapECaret equ 78h
tLcapEDier equ 79h
tLeAcute equ 7Ah
tLeGrave equ 7Bh
tLeCaret equ 7Ch
tLeDier equ 7Dh
tLcapIGrave equ 7Fh
tLcapICaret equ 80h
tLcapIDier equ 81h
tLiAcute equ 82h
tLiGrave equ 83h
tLiCaret equ 84h
tLiDier equ 85h
tLcapOAcute equ 86h
tLcapOGrave equ 87h
tLcapOCaret equ 88h
tLcapODier equ 89h
tLoAcute equ 8Ah
tLoGrave equ 8Bh
tLoCaret equ 8Ch
tLoDier equ 8Dh
tLcapUAcute equ 8Eh
tLcapUGrave equ 8Fh
tLcapUCaret equ 90h
tLcapUDier equ 91h
tLuAcute equ 92h
tLuGrave equ 93h
tLuCaret equ 94h
tLuDier equ 95h
tLcapCCed equ 96h
tLcCed equ 97h
tLcapNTilde equ 98h
tLnTilde equ 99h
tLaccent equ 9Ah
tLgrave equ 9Bh
tLdieresis equ 9Ch
tLquesDown equ 9Dh
tLexclamDown equ 9Eh
tLalpha equ 9Fh
tLbeta equ 0A0h
tLgamma equ 0A1h
tLcapDelta equ 0A2h
tLdelta equ 0A3h
tLepsilon equ 0A4h
tLlambda equ 0A5h
tLmu equ 0A6h
tLpi equ 0A7h
tLrho equ 0A8h
tLcapSigma equ 0A9h
tLphi equ 0ABh
tLcapOmega equ 0ACh
tLphat equ 0ADh
tLchi equ 0AEh
tLstatF equ 0AFh
tLa equ 0B0h
tLb equ 0B1h
tLc equ 0B2h
tLd equ 0B3h
tLsmalle equ 0B4h
tLf equ 0B5h
tLsmallg equ 0B6h
tLh equ 0B7h
tLi equ 0B8h
tLj equ 0B9h
tLk equ 0BAh
tLl equ 0BCh
tLm equ 0BDh
tLsmalln equ 0BEh
tLo equ 0BFh
tLp equ 0C0h
tLq equ 0C1h
tLsmallr equ 0C2h
tLs equ 0C3h
tLsmallt equ 0C4h
tLu equ 0C5h
tLv equ 0C6h
tLw equ 0C7h
tLx equ 0C8h
tLy equ 0C9h
tLz equ 0CAh
tLsigma equ 0CBh
tLtau equ 0CCh
tLcapIAcute equ 0CDh
tGarbagec equ 0CEh
LastToken equ 0CEh ;tLAST TOKEN IN THIS VERSION...
;Data Type Equates
;---------------------------------------------------------------------
RealObj equ 0
ListObj equ 1
MatObj equ 2
EquObj equ 3
StrngObj equ 4
ProgObj equ 5
ProtProgObj equ 6
PictObj equ 7
GDBObj equ 8
UnknownObj equ 9
UnknownEquObj equ 0Ah
NewEquObj equ 0Bh
CplxObj equ 0Ch
CListObj equ 0Dh
UndefObj equ 0Eh
WindowObj equ 0Fh
ZStoObj equ 10h
TblRngObj equ 11h
LCDObj equ 12h
BackupObj equ 13h
AppObj equ 14h ;application, only used in menus/link
AppVarObj equ 15h ;application variable
TempProgObj equ 16h ;program, home deletes when finished
GroupObj equ 17h ;group.
;I/O Equates
;---------------------------------------------------
D0D1_bits equ 03h
D0LD1L equ 03h
D0LD1H equ 01h
D0HD1L equ 02h
D0HD1H equ 00h
bport equ 0 ;4-bit link port (I/O)
;Device Codes
;-----------------------------------------------------------------
TI82DEV equ 82h
PC82DEV equ 02h
MAC82DEV equ 12h
TI83FDEV equ 73h
LINK83FDEV equ 23h
TI83DEV equ 83h
PC83DEV equ 03h
MAC83DEV equ 13h
TI85DEV equ 95h ;different than real 85 so me talk
PC85DEV equ 05h
MAC85DEV equ 15h
TI73DEV equ 74h ;device x3 is always an 83
PC73DEV equ 07h
MAC73DEV equ 17h
LINK73FDEV equ 23h
PC83FDEV equ 23h
;System Error Codes
;-----------------------------------------------------------
E_EDITF equ 7 ;allow re-entering application
E_EDIT equ 1<<E_EDITF
E_Mask equ 7Fh
E_Overflow equ 1+E_EDIT
E_DivBy0 equ 2+E_EDIT
E_SingularMat equ 3+E_EDIT
E_Domain equ 4+E_EDIT
E_Increment equ 5+E_EDIT
E_Break equ 6+E_EDIT
E_NonReal equ 7+E_EDIT
E_Syntax equ 8+E_EDIT
E_DataType equ 9+E_EDIT
E_Argument equ 10+E_EDIT
E_DimMismatch equ 11+E_EDIT
E_Dimension equ 12+E_EDIT
E_Undefined equ 13+E_EDIT
E_Memory equ 14+E_EDIT
E_Invalid equ 15+E_EDIT
E_IllegalNest equ 16+E_EDIT
E_Bound equ 17+E_EDIT
E_GraphRange equ 18+E_EDIT
E_Zoom equ 19+E_EDIT
E_Label equ 20
E_Stat equ 21
E_Solver equ 22+E_EDIT
E_Singularity equ 23+E_EDIT
E_SignChange equ 24+E_EDIT
E_Iterations equ 25+E_EDIT
E_BadGuess equ 26+E_EDIT
E_StatPlo equ 27
E_TolTooSmall equ 28+E_EDIT
E_Reserved equ 29+E_EDIT
E_Mode equ 30+E_EDIT
E_LnkErr equ 31+E_EDIT
E_LnkMemErr equ 32+E_EDIT
E_LnkTransErr equ 33+E_EDIT
E_LnkDupErr equ 34+E_EDIT
E_LnkMemFull equ 35+E_EDIT
E_Unknown equ 36+E_EDIT
E_Scale equ 37+E_EDIT
E_IdNotFound equ 38
E_NoMode equ 39+E_EDIT
E_Validation equ 40
E_Length equ 41+E_EDIT
E_Application equ 42+E_EDIT
E_AppErr1 equ 43+E_EDIT
E_AppErr2 equ 44+E_EDIT
E_ExpiredApp equ 45
E_BadAdd equ 46
E_Archived equ 47+E_EDIT
E_Version equ 48
E_ArchFull equ 49
E_Variable equ 50+E_EDIT
E_Duplicate equ 51+E_EDIT
HigErrNum equ 51
;Obsolete error numbers 34 ;first LINK error
E_LinkIOChkSum equ 34
E_LinkIOTimeOut equ 35
E_LinkIOBusy equ 36
E_LinkIOVer equ 37
;Equates To RAM Locations For Stat Vars
;----------------------------------------------------------------
FPLEN equ 9 ;Length of a floating-point number.
StatN equ statVars
XMean equ StatN + FPLEN
SumX equ XMean + FPLEN
SumXSqr equ SumX + FPLEN
StdX equ SumXSqr + FPLEN
StdPX equ StdX + FPLEN
MinX equ StdPX + FPLEN
MaxX equ MinX + FPLEN
MinY equ MaxX + FPLEN
MaxY equ MinY + FPLEN
YMean equ MaxY + FPLEN
SumY equ YMean + FPLEN
SumYSqr equ SumY + FPLEN
StdY equ SumYSqr + FPLEN
StdPY equ StdY + FPLEN
SumXY equ StdPY + FPLEN
Corr equ SumXY + FPLEN
MedX equ Corr + FPLEN
Q1 equ MedX + FPLEN
Q3 equ Q1 + FPLEN
QuadA equ Q3 + FPLEN
QuadB equ QuadA + FPLEN
QuadC equ QuadB + FPLEN
CubeD equ QuadC + FPLEN
QuartE equ CubeD + FPLEN
MedX1 equ QuartE + FPLEN
MedX2 equ MedX1 + FPLEN
MedX3 equ MedX2 + FPLEN
MedY1 equ MedX3 + FPLEN
MedY2 equ MedY1 + FPLEN
MedY3 equ MedY2 + FPLEN
PStat equ MedY3 + 2*FPLEN
ZStat equ PStat + FPLEN
TStat equ ZStat + FPLEN
ChiStat equ TStat + FPLEN
FStat equ ChiStat + FPLEN
DF equ FStat + FPLEN
Phat equ DF + FPLEN
Phat1 equ Phat + FPLEN
Phat2 equ Phat1 + FPLEN
MeanX1 equ Phat2 + FPLEN
StdX1 equ MeanX1 + FPLEN
StatN1 equ StdX1 + FPLEN
MeanX2 equ StatN1 + FPLEN
StdX2 equ MeanX2 + FPLEN
StatN2 equ StdX2 + FPLEN
StdXP2 equ StatN2 + FPLEN
SLower equ StdXP2 + FPLEN
SUpper equ SLower + FPLEN
SStat equ SUpper + FPLEN
F_DF equ anovaf_vars
F_SS equ F_DF + FPLEN
F_MS equ F_SS + FPLEN
E_DF equ F_MS + FPLEN
E_SS equ E_DF + FPLEN
E_MS equ E_SS + FPLEN
Great tutorial! I'm finally being able to work with asm. Still I wonder: does the program we get work on a TI-84+?
Incidentally, can we transform this cool ASM programs into calc apps?
Ok. I've just begun lesson 6 so I didn't know. Thanks.
just finished all the lessons, I'm starting on Appendix C now. ;) thanks Hot_Dog! what would you recommend as a first ASM project that I can do just based on the stuff in you lessons plus some help on Omni?
i need help. in lesson 8 (the colors program), is the program continuous or does it require a new notepad file if it doesnt say "continued on next page"?
Yeah... still i'm so into asm that I want to learn it all in a row... I know is not healthy...
so... unless it says .org 40339 or .org $9D93, you continue on where you left off?
#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
i didnt put in those dashes
so what about the others before and after the perfect world?
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.
Just a reminder: I've had a lot of people copying and pasting example programs. If you do that, DO NOT COPY AND PASTE THE LINE #include "ti83plus.inc" You will get an error if you do not retype it yourself.
Just a reminder: I've had a lot of people copying and pasting example programs. If you do that, DO NOT COPY AND PASTE THE LINE #include "ti83plus.inc" You will get an error if you do not retype it yourself.Why does it cause an error? Is it because you use a different unicode character?
Just a reminder: I've had a lot of people copying and pasting example programs. If you do that, DO NOT COPY AND PASTE THE LINE #include "ti83plus.inc" You will get an error if you do not retype it yourself.Why does it cause an error? Is it because you use a different unicode character?
Ah ok. I had issues with quotes before in VB classes. The keyboards typed the french quotes that looks like << and >> instead of ". Windows 98 even changed " to << automatically. It made Visual Basic 6.0 programming a major pain until they found a way to fix it.
C:\Documents and Settings\*\Desktop\TI stuff\ASM_programming\ti83plus.inc:316
7: warning: redefinition of 'TPOLARG'
C:\Documents and Settings\*\Desktop\TI stuff\ASM_programming\ti83plus.inc:316
7: warning: previous definition of 'TPOLARG' was here
C:\Documents and Settings\*\Desktop\TI stuff\ASM_programming\ti83plus.inc:316
8: warning: redefinition of 'TRECTG'
C:\Documents and Settings\*\Desktop\TI stuff\ASM_programming\ti83plus.inc:316
8: warning: previous definition of 'TRECTG' was here
C:\Documents and Settings\*\Desktop\TI stuff\ASM_programming\ti83plus.inc:316
9: warning: redefinition of 'TCOORDON'
C:\Documents and Settings\*\Desktop\TI stuff\ASM_programming\ti83plus.inc:316
9: warning: previous definition of 'TCOORDON' was here
C:\Documents and Settings\*\Desktop\TI stuff\ASM_programming\ti83plus.inc:317
0: warning: redefinition of 'TCOORDOFF'
C:\Documents and Settings\*\Desktop\TI stuff\ASM_programming\ti83plus.inc:317
0: warning: previous definition of 'TCOORDOFF' was here
C:\Documents and Settings\*\Desktop\TI stuff\ASM_programming\ti83plus.inc:317
1: warning: redefinition of 'TDRAWLINE'
C:\Documents and Settings\*\Desktop\TI stuff\ASM_programming\ti83plus.inc:317
1: warning: previous definition of 'TDRAWLINE' was here
First of all, I want to thank Hot_Dog for making this tutorial. It's been very helpful so far, and it's increased my interest in joining this community.
Hot_Dog, I havent replied to this yet, but:
WOW on this tutorial, it finally took me on ASM!
And I gotta thank you for Appendix A. That's something 28D never covered :D
And was there going to be an Appendix B?
Addicting is correct...Once I finally understood 28 days I couldn't stop reading about it!I can't even stop now, when I dont understand 28D fully xD
And I gotta thank you for Appendix A. That's something 28D never covered :D
And was there going to be an Appendix B?
Ugh, I really need to update the first thread. Go to here:
http://www.omnimaga.org/index.php?action=downloads;sa=view;down=594