Morning Marcel, Wolfgang, Thanks for your replies.
> 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. Ok, A6,A1 was a typo, I meant A4 - apologies. On the other hand, my QDOS Companion (Pennell) has the load/save parameters as $32 to $ff and not $ff31 to $ffff as you state. I went on a doc hunt last night and Dickens has the negatives and my QDOS docs from Jochen also has negatives - so Pennell is wrong. Oh hum. Further to this, Dickens works out the actual address as (A6 + A4 + (D0.W OR FF00) AND FFEE) while Jochen's docs (in my version) simply has A6 + A4 + (D0.W AND FFFE) which looks like the correct verion - as only bit zero is cleared and not bits 0 and 1 as per Dickens. > Just look at the variable area as some kind of stack, with (A6,A4) > pointing to the *top* of it. No problems with this now that I have the correct op code values. > > > 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 with the LOAD/SAVE op code as far as I can see, they always take 6 bytes from the A1 stack and load back 6 bytes. There is no way that I can see (using the maths package) to load and save a word for example. If I wanted to yuse the A4 stack as a general purpose buffer for words and things, I can do it without the maths package - so it doesn't make sense (to me). However, Dickens gives an example of the Hyperbolic Sine of a number (SINH) and in it he saves and loads values. His op codes are -6 and -12 for save_1 and save_2 - so obviously you *have* to use multiples of -6 for your save locations to avoid overwriting other stuff. Not only that, but codes from -5 through to -1 will overwrite data at the top of your A4 stack. Cheers, Norman. _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm