Microsoft KB Archive/47564: Difference between revisions
From BetaArchive Wiki
(importing KB archive) |
m (Text replacement - "&" to "&") |
||
Line 41: | Line 41: | ||
bResult% = 0 | bResult% = 0 | ||
ToolBox "i" | ToolBox "i" | ||
TrapNo% = & | TrapNo% = &HA85D | ||
bitOffset& | bitOffset& = 3 | ||
bytePtr& | bytePtr& = VARPTR(a%) | ||
ToolBox "B", TrapNo%, (bytePtr& | ToolBox "B", TrapNo%, (bytePtr&), (BitOffset&), bResult% | ||
IF bResult% THEN ... | IF bResult% THEN ... | ||
</pre> | </pre> |
Latest revision as of 14:14, 21 July 2020
Article ID: 47564
Article Last Modified on 11/21/2006
This article was previously published under Q47564
SUMMARY
On Page 507 in the "Microsoft QuickBASIC for Apple Macintosh: Language Reference," the example for the BitTst ROM Toolbox call incorrectly calls the routine with a "P" call type rather than a "B" call type as specified in the Calltype on Page 506. You will get an "Invalid function call" using the example as shown on Page 506.
Note that you must also always invoke the ToolBox "i" statement (to initialize) before you can begin to use the ToolBox statement.
The following is the correct example:
a% = 0 bResult% = 0 ToolBox "i" TrapNo% = &HA85D bitOffset& = 3 bytePtr& = VARPTR(a%) ToolBox "B", TrapNo%, (bytePtr&), (BitOffset&), bResult% IF bResult% THEN ...
Additional query words: MQuickB
Keywords: KB47564