Jump to content

ZIOCB as function workspace

Recommended Posts

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 ?

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...