Difference between revisions of "Talk:83Plus:BCALLs:4B73"
From WikiTI
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
A is the byte NextParseByte was pointing to, unless the comparison between 965D and 965F carries, in which case a is returned as zero. This should be addressed in the output information for register A, but I don't know exactly what it's doing (which is why I left it blank originally). | A is the byte NextParseByte was pointing to, unless the comparison between 965D and 965F carries, in which case a is returned as zero. This should be addressed in the output information for register A, but I don't know exactly what it's doing (which is why I left it blank originally). | ||
+ | :Actually, that does not appear to be the case. The value returned is the data at the ''new'' pointer value. I believe that [[83Plus:RAM:965F]] holds the end of the program/equation being run, so the routine returns with carry set if you're at the end of the program. [[User:FloppusMaximus|FloppusMaximus]] 19:24, 27 Mar 2005 (PST) | ||
+ | |||
+ | Code is: | ||
+ | ld hl,(965D) \ | ||
+ | inc hl \ | ||
+ | ld (965D),hl \ | ||
+ | ld bc,(965D) \ | ||
+ | ld hl,(965F) \ | ||
+ | xor a \ | ||
+ | sbc hl,bc \ | ||
+ | ret c \ | ||
+ | ld a,(bc) \ | ||
+ | ret | ||
+ | |||
+ | ...This makes it looks like A) It's the new byte, not the old once, since it's read after (965D) is incremented, and B) That the value of A is only set if we're not at the end of the buffer, which should be noted in the output description. | ||
+ | --Dan |
Latest revision as of 19:30, 27 March 2005
A is the byte NextParseByte was pointing to, unless the comparison between 965D and 965F carries, in which case a is returned as zero. This should be addressed in the output information for register A, but I don't know exactly what it's doing (which is why I left it blank originally).
- Actually, that does not appear to be the case. The value returned is the data at the new pointer value. I believe that 83Plus:RAM:965F holds the end of the program/equation being run, so the routine returns with carry set if you're at the end of the program. FloppusMaximus 19:24, 27 Mar 2005 (PST)
Code is: ld hl,(965D) \ inc hl \ ld (965D),hl \ ld bc,(965D) \ ld hl,(965F) \ xor a \ sbc hl,bc \ ret c \ ld a,(bc) \ ret
...This makes it looks like A) It's the new byte, not the old once, since it's read after (965D) is incremented, and B) That the value of A is only set if we're not at the end of the buffer, which should be noted in the output description. --Dan