[EMAIL PROTECTED] wrote: > I was explaining the SAVE and LOAD op codes for RI_EXEC and RI_EXECB > where the top of stack floating point value is saved to a variables > area at (A6,A1.L) or a new TOS is created by loading back from said > area. The op codes for save are even in the range $32 to $FF and the > load op codes are odd in the same range. Save with $32 and load the > same value back with $33, save with $34 and load with $35 and so on.
Nope, that's where you differ with the documentation. First, the variable area is (A6,A4), typo I guess, and second, the opcodes $FF31 to $FFFF are for load/save, not $32 to $FF. Yes, the latter DO work, but it seems that's more an undocumented side-effect. Just look at the variable area as some kind of stack, with (A6,A4) pointing to the *top* of it. > Now I had assumed that I could save one FP using code $32 and > another using op code $34 and so on, but the source appears to > indicate that I will overwrite part of my $32 saved FP with part of > my $34 saved FP. Well, you can store other things in the variable area too, so it makes sense that you can address every individual word there. > Not only this, but I'm effectively wasting the $32 bytes at the > start of my buffer As said, it's supposed to be the other way round. But even if the offsets were positive, you could just move A4 by $32 bytes, no need to reserve empty space for the offset. Marcel _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
