+Spaced Cowboy Posted January 22 Share Posted January 22 I'm slowly getting the floating-point library for xtal up and running, fAdd, fSub, fDiv and fMul all work, and I'm at the point where I want to convert decimal <-> float format. I'd like to use zero-page for access speed, but I don't really fancy giving up the 16 or so misc buffer/state bytes to use for ascii->FP on a permanent basis. So, let's say there's some code where the user enters a string, and I want to convert it to a float. We've got past the use of CIO to get characters into the app, is the block of ZIOCB bytes just sitting there doing nothing, waiting for me to make use of it ? The memory-map books say "When a CIO operation is initiated, the information stored in the IOCB channel is moved here for use by the CIO routines. When the operation is finished, the updated information is returned to the user area", which seems to imply that they're only used during an actual I/O operation, and they're re-copied for every single IO op. So as long as I don't want to store data there permanently, they're fair game for temporary use within my own function call - as long as that function call doesn't call into CIO. True ? Or am I missing something ? Quote Link to comment Share on other sites More sharing options...
Rybags Posted January 22 Share Posted January 22 If your routines are foreground and never coincide with CIO access then you could use them. There's other z-page that can be used also though some other $00-$7F locations can vary depending on what OS is in use. If you're using the CIO ones then equally you could use the ones involved in line drawing and a few of the other screen related ones. Also some of the SIO related ones. 1 Quote Link to comment Share on other sites More sharing options...
+Spaced Cowboy Posted January 22 Author Share Posted January 22 Cool - that makes life easier. These routines should never involve any I/O, so I'm good to use them, I reckon. I've already co-opted $1C..$1F as general-purpose pointer vectors but those are currently unused at all - I'll have to look around for other possibilities Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.