[TI83p-ASM] Come here to worship 83pa28d!
Moderator: MaxCoderz Staff
- driesguldolf
- Extreme Poster
- Posts: 395
- Joined: Thu 17 May, 2007 4:49 pm
- Location: $4080
- Contact:
[TI83p-ASM] Come here to worship 83pa28d!
When I started learning asm one of the first tutorials a read was 83pa28d, if you ask me it's even better then most schoolbooks!
But I found alot of errors in it, thats why I posted this topic (I tried to contact him (Sean McLaughlin) but I can't find a working mail address (I found 4 different ones :S, none of them worked...)
But I found alot of errors in it, thats why I posted this topic (I tried to contact him (Sean McLaughlin) but I can't find a working mail address (I found 4 different ones :S, none of them worked...)
Last edited by driesguldolf on Sat 19 May, 2007 3:26 pm, edited 1 time in total.
- driesguldolf
- Extreme Poster
- Posts: 395
- Joined: Thu 17 May, 2007 4:49 pm
- Location: $4080
- Contact:
Some errors I could find:
* Day 10 - More Registers: at the bottom of the document there's a link to the "Low-Level Key Input" lesson (day 22), but I think it should direct you to day 23 - Interrupts
* Day 22 - Low-Level Key Input: Two things here, You say that you need a delay of 2 "NOP" instructions to give the hardware time to react, but a little bit further in Program 22-3 (This is not a problem in Program 22-2 because of the loop) I don't see any nop's and the program perfectly works? The second thing is that there's no explanation of why you should reset the key port by sending $FF.
* Day 24 - Monochrome Graphics: There's a bug in the getpixel code wich causes, the "LD B, A" instruction should be placed right after "AND 7", because if the loop is executed it will have 128 iterations.
* Day 27 - String and Numerical Input: Some lines of code appears with grey background, other lines don't (They code isn't preceded by "Program Chapter-X", I don't know if this is normal).
* Small Font Character Map: The text is stretched if the browser-width is too large, I don't think this is ok.
* I haven't tested this yet (using v2.0) but on my system your "Day 1 - Introduction" doesn't work (I followed all the instructions exactly).
remember that this was intended to be a mail so there may be some errors...
* Day 10 - More Registers: at the bottom of the document there's a link to the "Low-Level Key Input" lesson (day 22), but I think it should direct you to day 23 - Interrupts
* Day 22 - Low-Level Key Input: Two things here, You say that you need a delay of 2 "NOP" instructions to give the hardware time to react, but a little bit further in Program 22-3 (This is not a problem in Program 22-2 because of the loop) I don't see any nop's and the program perfectly works? The second thing is that there's no explanation of why you should reset the key port by sending $FF.
* Day 24 - Monochrome Graphics: There's a bug in the getpixel code wich causes, the "LD B, A" instruction should be placed right after "AND 7", because if the loop is executed it will have 128 iterations.
* Day 27 - String and Numerical Input: Some lines of code appears with grey background, other lines don't (They code isn't preceded by "Program Chapter-X", I don't know if this is normal).
* Small Font Character Map: The text is stretched if the browser-width is too large, I don't think this is ok.
* I haven't tested this yet (using v2.0) but on my system your "Day 1 - Introduction" doesn't work (I followed all the instructions exactly).
remember that this was intended to be a mail so there may be some errors...
- benryves
- Maxcoderz Staff
- Posts: 3087
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
I cannot replicate his findings on the generation of the mode 2 ISR address (ie, his comment that "the last six bits are always %111111"). At least on my hardware the value is effectively random, and as such his technique to avoid having to create a large jump table doesn't work for me.
It's entirely possible that on his hardware his findings are indeed true. Just not on mine.
Looking quickly over your other points; in day 1 he uses ld (PenCol), hl \ bcall(_PutS) - penCol/penRow is used for the small font/graph buffer, and PutS writes the large font to the home screen (which is where the error is). That should be ld (curRow),hl instead.
No tutorial or guide is perfect. It is a significant jump in quality from AsmGuru. I prefer to use multiple documents and compare them as I go; in my case AsmGuru showed me a few assembly programs and how to use them, and CoBB's Z80 Guide showed me how they actually worked.
It's entirely possible that on his hardware his findings are indeed true. Just not on mine.
Looking quickly over your other points; in day 1 he uses ld (PenCol), hl \ bcall(_PutS) - penCol/penRow is used for the small font/graph buffer, and PutS writes the large font to the home screen (which is where the error is). That should be ld (curRow),hl instead.
No tutorial or guide is perfect. It is a significant jump in quality from AsmGuru. I prefer to use multiple documents and compare them as I go; in my case AsmGuru showed me a few assembly programs and how to use them, and CoBB's Z80 Guide showed me how they actually worked.
- Jim e
- Calc King
- Posts: 2457
- Joined: Sun 26 Dec, 2004 5:27 am
- Location: SXIOPO = Infinite lives for both players
- Contact:
It's likely his code's fault. I found that the value to direct the vector table definitely is controllable to an extent. I used in a,(1) unrolled in a massive loop, the vector table value was always the value from port 1.benryves wrote:I cannot replicate his findings on the generation of the mode 2 ISR address (ie, his comment that "the last six bits are always %111111"). At least on my hardware the value is effectively random, and as such his technique to avoid having to create a large jump table doesn't work for me.
It's entirely possible that on his hardware his findings are indeed true. Just not on mine.
You can't entirely blame it on lack of attentiveness, most hardware documentation didn't come about in an organized manner till recently. Everything was based on convention.
It was brought up on UTI that his work is GFDL'ed, so it could be put up on the wiki and corrections or out right rewrites could be done. It'd be a better solution than the constant bitching that keeps happening about the little errors.
- driesguldolf
- Extreme Poster
- Posts: 395
- Joined: Thu 17 May, 2007 4:49 pm
- Location: $4080
- Contact:
Don't missunderstand me, I ow a great deal to that guide (:worship:) but some errors are not small, really it took me 2 days to figure out the bug in the getpixel routine because I expected it to be correct... But also because of that bug I really understand the workings wich made me think twice about all his routines instead of just copy pasting 'emJim e wrote:It'd be a better solution than the constant bitching that keeps happening about the little errors.
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
Quite a bad mistake/typo:
http://dragonfire.unitedti.org/asmin28/ref/z80h.html#im
IM 2 takes 4 cc's? no way! it's 2 bytes!
and there is more logic in it than stated there:
IM x
opcode: 11101101 : 010mm110
where mm is:
00 for mode 0
10 for mode 1
11 for mode 2
(suggesting there is a mode between 0 and 1 having the opcode ED 4E, it pretends to be a NOP though)
http://dragonfire.unitedti.org/asmin28/ref/z80h.html#im
IM 2 takes 4 cc's? no way! it's 2 bytes!
and there is more logic in it than stated there:
IM x
opcode: 11101101 : 010mm110
where mm is:
00 for mode 0
10 for mode 1
11 for mode 2
(suggesting there is a mode between 0 and 1 having the opcode ED 4E, it pretends to be a NOP though)
Last edited by King Harold on Thu 24 May, 2007 9:30 am, edited 1 time in total.
- driesguldolf
- Extreme Poster
- Posts: 395
- Joined: Thu 17 May, 2007 4:49 pm
- Location: $4080
- Contact:
My guess is that the databus is in the high-impedance state, so it reads whatever charge is left from the previous value. An interrupt is accepted after an in a,(1), so the last value of the bus is the value of port 1. Have you tried this with other instructions? I'm guessing something like ld a,a would give the opcode value as vector table offset for instance.Jim e wrote:I found that the value to direct the vector table definitely is controllable to an extent. I used in a,(1) unrolled in a massive loop, the vector table value was always the value from port 1.
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
- Jim e
- Calc King
- Posts: 2457
- Joined: Sun 26 Dec, 2004 5:27 am
- Location: SXIOPO = Infinite lives for both players
- Contact:
Well, assembly is not a language for beginners, so yeah you're correct on that. But that would apply to pretty much any guide trying to teach assembly.threefingeredguy wrote:The option I would have chosen isn't on there:
A useless guide for beginners. Only helpful when you already know what it's teaching.
Yeah the result wasn't exactly what I thought it would be for other instructions. There's probably a logic to it, but I don't see a real benefit to investigate it further.Have you tried this with other instructions? I'm guessing something like ld a,a would give the opcode value as vector table offset for instance.
I wasn't really referring only to you. It happens a lot. You can only expect that since his guide popular.Don't missunderstand me, I ow a great deal to that guide (Worshipping) but some errors are not small, really it took me 2 days to figure out the bug in the getpixel routine because I expected it to be correct... But also because of that bug I really understand the workings wich made me think twice about all his routines instead of just copy pasting 'em Bird
- elfprince13
- Sir Posts-A-Lot
- Posts: 234
- Joined: Sun 11 Dec, 2005 2:21 am
- Contact:
Re: [TI83p-ASM] Come here to worship 83pa28d!
PM sigma on UnitedTIdriesguldolf wrote:When I started learning asm one of the first tutorials a read was 83pa28d, if you ask me it's even better then most schoolbooks!
But I found alot of errors in it, thats why I posted this topic (I tried to contact him (Sean McLaughlin) but I can't find a working mail address (I found 4 different ones :S, none of them worked...)
and I found it be a helpful guide aimed at people who like programming (as in not the "LOL MAKEZ ME FAST GAMEZ NAOW PLZKTHX" crowd), especially when you use it in conjunction with an existing knowledge of the internal workings of computers, a good understanding of computer logic, WikiTI, and CoBB's guide. if you don't have at least the first 2 you shouldn't be learning assembly language in the first place.
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
did someone see jp (hl) in the opcode list?
not me anyway
JP (HL)
opcode: E9h = 11101001b
t-states: probably 4 (1-byte instruction..)
flags: unaffected
Never conditional, can be prefixed to work with IX or IY.
ofcourse everyone already knew that, but maybe some people who only read asmIn28days didn't?
not me anyway
JP (HL)
opcode: E9h = 11101001b
t-states: probably 4 (1-byte instruction..)
flags: unaffected
Never conditional, can be prefixed to work with IX or IY.
ofcourse everyone already knew that, but maybe some people who only read asmIn28days didn't?