The NuOS Project Distant Software The NuOS Project is an attempt to build a new operating system on top of ProDOS. This is meant to be one of the peices. SliceMeister is being made available now because it could be vary useful even as a standalone tool. In this package there is a very simple demonstration of what it can do. I am not including the source because I figure that most of you are like me: if I know what the source is, I'll screw around with it. I don't want this to happen. SliceMeister should work on any Apple II or compatible which can run ProDOS and contains an AppleMouse card or equivalent. Everything in it is done the 'official' way, using only the firmware, real entry points, etc... To include SliceMeister in anything you write, simply credit Distant Software and SliceMeister. It is copyright 1991 Edwin H. Watkeys III, but you can use it for anything you want, provided you contact me before any product costing more than $20 is released (including shareware). I can be reached at the following addresses: America Online: edwatkeys Internet (and AppleLink): distant@pro-sol.cts.com US Mail: Distant Software PO Box 53 Springhouse, PA 19477 Please tell me what you think, and what you would like to see. S L I C E M E I S T E R SliceMeister is a LNK file which contains a set of tools greatly easing the use of mouse and VBL interrupts. This may not make sense now, but all of these calls, except for initslice and killslice can be made from withing SliceMeister tasks. The demo, although it is simple, shouls you how to use the tools. If you have any questions, mail me. The Calls: initslicer -- turns on SliceMeister initslicer will do the following when called: allocate a ProDOS interrupt handler, find a mouse card and turn on transparent mode with VBLs active. Also, this routine sets up some pointers for the domouse routine, so you should call this before any domouse. Please note that initslicer will start the whole ball rolling; if you don't have a task 'installed' at that time, you're in trouble (unless interrupts are disabled). The tick counter is initialized at zero. Enter initslicer with anything. It will return with interrupts activated, and the carry bit will reflect any error condition (set = error). In the event of an error in initslicer, SliceMeister will do nothing to your system. If an error DOES occur, it is probably because you have too many interrupt handlers, there is no mouse, or your system is really messed up. SEE killslicer, settask, inittick, domouse domouse -- execute a mouse command domouse, when called, will attempt to call the Pascal 1.1 mouse drivers. The call is specified by Y, which contains the offset to the pointer in the $cx00 ROM space. Any return codes are that of the called mouse routine. The accumulator is passed on to the mouse routine; X and Y are loaded with the proper values ($Cx and $x0). SEE getminfo findmouse -- find lowest slot containing a mouse card findmouse, when called (with anything) will search from slot one to seven for a mouse card (looking for the Pascal ID bytes). If a mouse card is found, it is returned in the accumulator with the carry clear. If there is no mouse, the accumulator will be set to zero, and the carry will be set. findmouse is called by initslicer. SEE initslicer, getminfo killslicer -- turns off SliceMeister killmouse will turn off the mouse (mode $00) and de-allocate the ProDOS interrupt handler. Nothing is left of SliceMeister at this point, but initslicer can be called again to re-connect it. Call killmouse with anything; the carry will be clear on return. SEE initslicer inittick -- reset the tick counter to zero inittick will set the tick counter to zero, allowing applications to easily time activities with a resolution of one sixtieth of a second. The tick counter consists of four bytes, which means that very long periods of time can be counted (years). SEE gettick, initslicer gettick -- return a pointer to ticks elapsed gettick will return to bytes on the stack (pull the low, and then the high) which point to the four tick bytes. This is to ensure that SliceMeister can mature without worring about where memory is used in zero page. SEE inittick settask -- select an address as SliceMeister task settask should be called with the LSB of the task in the accumulator, and the MSB in X. Interrupts are disabled when the new values are entered, so there is no need to do an SEI. Please note that this routine must be called before initslicer, because the first interrupt will crash the system in a big way. Tasks may do anything they want, but should take less then one sixtieth of a second. If you are counting cycles, count them at 1 Mhz unless it is specifically intended for a faster clock speed, and it better be pretty damned important at that, because this is for the Apple II, not the IIGS. In other words, go through the trouble to make sure that the system can complete the task in one sixtieth of a second (check ID bytes, as questions, etc...). SEE gettask, initslicer gettask -- return address of current task gettask will return the address of the current task the same way you gave it in settask. I can't think of why you'd need this, but I put it in for completeness. DO NOT DO ANY 'TRICKY' STUFF WITH THIS. Also, do not mess with the interrupt related areas of the ProDOS global page. SliceMeister is going to go through some major renovations before it's done. SEE initslicer, settask getminfo -- return mouse status getminfo returns the mouse status byte in the accumulator, the low byte of the x co-ordinate in X and the low byte of the y co-ordinate in Y. The mouse clamped on initialization to range from 0 to 79 and 0 to 23, which coincides with certain things... If you need more 'area,' call findmouse and access the screen holes correctly (do not assume slot four!). This does not call ReadMouse; the ProDOS interrupt handler does that. This simply reads the values in after inhibiting interrupts. SEE domouse