ld de,OP1 does not "put the name in OP1", it loads the address of OP1 into de
this entire block of code, in its entirety, is used to first load the name into op1 like this:
Code: Select all
ld de,OP1 ;destination
ld hl,matrixj ;source
ldi
ldi
ldi
ldi ;load 4 bytes from source to dest
that code does:
with the loop unrolled.
Note that OP1 and matrixj are both constant-pointers (OP1 is defined in ti83plus.inc, matrixj is the label of that name), and should be treated as such. (alternative they can be used as 16bit numbers, but that usually isn't relevant)
4 bytes are copied from the location matrixj to the location OP1
so OP1 holds .db MatObj, tVarMat, tMatJ, 0, unchanged, unchanged, unchanged, etc
rst rFindSym is the faster/smaller equivalent of the bcall of the same name yes. Try to use the the rst form whenever possible, not because I said so but because it's smaller (only 1 byte, whereas bcall is 3 bytes) and faster. (rst is never conditional though and there may be other reasons to use the bcall in some cases)
Not knowing what LDI does is a bit odd though, no offence, but maybe you should read
a tutorial
in regard to the edit: the code indeed first prepares for the symbol lookup (FindSym) - a pointer to the matrix will then be in DE, any direct operations on DE will
only affect DE (ok and PC too since all instructions do something with PC)
ever since DE is just a normal register, but when used indirectly it
may affect the matrix. ld (de),a for example will overwrite the first byte of the matrix with a value of register A. The system-routines for matrices expect DE to be a pointer to a matrix, but will mostly still work if it's not (at your peril).
The matrix itself looks like:
.db columns, rows
;row times:
;column times:
.tifloat value
see 83psysroutines.pdf for system-routines that work with floats..