83Plus:BCALLs:4003: Difference between revisions

From WikiTI
Jump to navigationJump to search
Woozle (talk | contribs)
No edit summary
 
added missing info and more
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:83Plus:BCALLs:By Name:FP_Util|FontHook]] [[Category:83Plus:BCALLs:By Name|FontHook]] [[Category:83Plus:BCALLs:By Address|4003 - FontHook]]
[[Category:83Plus:BCALLs:By Name:Hook|FontHook]] [[Category:83Plus:BCALLs:By Name|FontHook]] [[Category:83Plus:BCALLs:By Address|4003 - FontHook]]
== Synopsis ==
== Synopsis ==
'''Official Name:''' FontHook
'''Official Name:''' FontHook
Line 5: Line 5:
'''BCALL Address:''' 4003
'''BCALL Address:''' 4003


Calls the routine currently set as the font hook.
Calls the routine currently set as the [[83Plus:Hooks:9B9C|font hook]].


=== Inputs ===
=== Inputs ===
* font hook set
* Register values to pass to the font hook


=== Outputs ===
=== Outputs ===
* return value of font hook
* If the hook is invalid, it is disabled, and all registers and flags are preserved.
* Otherwise, the hook is called, and all register values upon exiting the hook are preserved and returned.


=== Registers Destroyed ===
=== Destroyed ===
* ??
* All registers except (sometimes) HL and B
* 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:35#Bit_5|fontHookActive,(iy+fontHookFlag)]]
    jr z,SkipFontHook
    B_CALL _FontHook
SkipFontHook:

Latest revision as of 17:03, 21 September 2005

Synopsis

Official Name: FontHook

BCALL Address: 4003

Calls the routine currently set as the font hook.

Inputs

  • Register values to pass to the font hook

Outputs

  • If the hook is invalid, it is disabled, and all registers and flags are preserved.
  • Otherwise, the hook is called, and all register values upon exiting the hook are preserved and returned.

Destroyed

  • All registers except (sometimes) HL and B
  • 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 fontHookActive,(iy+fontHookFlag)
    jr z,SkipFontHook
    B_CALL _FontHook
SkipFontHook: