Difference between revisions of "83Plus:BCALLs:505C"

From WikiTI
Jump to: navigation, search
(corrections and clarifications)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Wikify}}
+
[[Category:83Plus:BCALLs:By Name|RunCatalog1Hook]]
_RunCatalog1Hook    EQU 505Ch  ;Undocumented 1.13
+
[[Category:83Plus:BCALLs:By Name:Hook|RunCatalog1Hook]]
    ;Checks the byte @ the address @ catalog1HookPtr.
+
[[Category:83Plus:BCALLs:By Address|505C - RunCatalog1Hook]]
    ;If the byte is 83, it runs the hook. If the byte
+
== Synopsis ==
    ;is different, it resets the catalog1 hook flag.
+
'''Unofficial Name:''' RunCatalog1Hook
    ;Inputs:     catalog1HookPtr      must be setup correctly
+
    ;Outputs:   HL          Int16  points to start of hook
+
    ;            F          Int8    F is 6A if not run
+
  
Michael Cimino
+
'''BCALL Address:''' 505C
 +
 
 +
Checks the first byte of the block for the [[83Plus:Hooks:9BB4|Catalog 1 Hook]].
 +
If the byte is 83, the hook is run; otherwise, the active flag for the hook is
 +
set to zero.
 +
 
 +
=== Inputs ===
 +
* Register values to pass to the catalog 1 hook.
 +
 
 +
=== Outputs ===
 +
*  If the hook is invalid, it is disabled, and all registers are preserved except F.
 +
** In this case, the zero flag is cleared if A = 0Ch, set otherwise.
 +
* If the hook is valid, it is called, and all register values upon exiting the hook are preserved and returned.
 +
 
 +
=== Destroys ===
 +
* F
 +
* As with all hooks, you must assume everything in RAM may be destroyed, but remember that any side effects are intentional.
 +
 
 +
== Comments ==
 +
This routine does not check that the hook is enabled. You must test this yourself, e.g.
 +
 
 +
    bit [[83Plus:Flags:36#Bit_3|catalog1HookActive,(iy+catalog1HookFlag)]]
 +
    jr z,SkipHook
 +
    B_CALL _Catalog1Hook
 +
SkipHook:
 +
 
 +
== Credits and Contributions ==
 +
*Michael Cimino

Latest revision as of 12:57, 28 March 2006

Synopsis

Unofficial Name: RunCatalog1Hook

BCALL Address: 505C

Checks the first byte of the block for the Catalog 1 Hook. If the byte is 83, the hook is run; otherwise, the active flag for the hook is set to zero.

Inputs

  • Register values to pass to the catalog 1 hook.

Outputs

  • If the hook is invalid, it is disabled, and all registers are preserved except F.
    • In this case, the zero flag is cleared if A = 0Ch, set otherwise.
  • If the hook is valid, it is called, and all register values upon exiting the hook are preserved and returned.

Destroys

  • F
  • As with all hooks, you must assume everything in RAM may be destroyed, but remember that any side effects are intentional.

Comments

This routine does not check that the hook is enabled. You must test this yourself, e.g.

    bit catalog1HookActive,(iy+catalog1HookFlag)
    jr z,SkipHook
    B_CALL _Catalog1Hook
SkipHook:

Credits and Contributions

  • Michael Cimino