10.07.2015 Views

CF2 API Reference (PDF) - Persistor Instruments Inc

CF2 API Reference (PDF) - Persistor Instruments Inc

CF2 API Reference (PDF) - Persistor Instruments Inc

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>BIOS FunctionsBIOSHandlerAddress -- Return a BIOS handlers actual addressDescription:Prototype:Inputs:Returns:Notes:The BIOSHandlerAddress macro invokes the _BIOSHandlerAddress function to returnvptr _BIOSHandlerAddress(short drvrid);drvrid is the driver table id of the function whose address you seek.Returns the address in the specified slot of the driver table.1. use the BIOSHandlerAddress macro instead of the function call2. see PICOHandlerAddress for similar operations with PicoDOS functions3. The drvrid argument to _BIOSHandlerAddress() is a non-obvious enumeration constantcorresponding to the relative location of the target <strong>API</strong> function in the BIOS function list in theheader. You're much better off using the BIOSHandlerAddress macro which lets you simplyspecify the name of the <strong>API</strong> function whose address you want to find.BIOSPatchInsert -- Insert a new handler in the BIOS tableDescription:Prototype:Inputs:Returns:Notes:The BIOSPatchInsert macro invokes the _BIOSPatchInsert function to let you patch specificBIOS <strong>API</strong> functions in the BIOS jump table.vptr _BIOSPatchInsert(short drvrid, vptr newf);drvrid is the driver table id of the function you wish to replace.newf is a volatile pointer to the new address for the given BIOS routine.Returns the former contents of the specified driver table slot for future reference or for"unpatching."1. The drvrid argument to _BIOSPatchInsert () is a non-obvious enumeration constantcorresponding to the relative location of the target <strong>API</strong> function in the BIOS function list found inthe header. You're much better off using the BIOSPatchInsert macro which lets you simplyspecify the name of the <strong>API</strong> function you want to patch.2. The nature of the BIOS jump table is described in the <strong>CF2</strong> Programmers Manual.BIOSReset -- Reset the <strong>Persistor</strong>Description:Prototype:This function forces a hardware reset which includes assertion of the external /RESET signal. Oncompletion, the <strong>CF2</strong> will take whatever reset action has been ordered by the PBM bootcommand. If the reset action goes beyond entering PBM, the BIOS will be completely reinitialized.If PicoDOS is invoked, PicoDOS will also be completely re-initialized.This is the cleanest way to terminate a running application if the BIOS or PicoDOS vectors havebeen altered or you want to guarantee the state of the hardware for the next program run.void BIOSReset(void);BIOSResetToPicoDOS -- Reset the <strong>Persistor</strong> and force to PicoDOSDescription:Prototype:This function resets the <strong>Persistor</strong> as described for the BIOSReset() function above, but forcesthe <strong>CF2</strong> to jump to 0xE10000 (PicoDOS) regardless of the boot settings.void BIOSResetToPicoDOS (void);PERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.6 of 84<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>7/19/2005

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!