83Plus:Hooks:9B94

From WikiTI
Revision as of 11:23, 10 July 2006 by Mmartin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Synopsis

Name: Graph Hook

Hook Pointer Block Address: 9B94

Hook Enable BCALL: 4FB7

Hook Disable BCALL: 4FBA

Hook Call BCALL: Unknown

Hook Active Flag: 3, (iy + 35h)

This hook allows you to recieve notifications about events related to the graph context, allowing you to change some events.

Using the Hook

Like most hooks, the value in A determines what you are being notified of.

  • A = 00h: We are switching to the graph context. Return flags are ignored.
  • A = 02h: The OS is about to draw the X/Y coordinates of both the free-moving cursor and also the trace cursor. Returning with zero reset will prevent drawing of the X/Y coordinates and the movement of the cursor. Side Note: You can draw the coordinates with the undocumented B_CALL PutXY.
  • A = 04h: The OS is about to accept user input again (it is done doing whatever processing it was doing.) Here you could draw any extra UI elements you want to appear atop the graph. Return flags seem to be ignored.
  • A = 05h: The OS is about to blink the free-moving cursor (not the trace cursor, if you want to change that, use the trace hook.) Returning with zero reset will cancel the blink (it'll stay at whatever state it's currently in.)
  • A = 06h: A key was pressed, passed in B. You can cancel the keypress if you return with the zero flag reset, otherwise return the keypress you want to occur in B.
  • A = 07h: The OS is about to draw the graph. This could just include presenting what's in plotSScreen, or actually doing the graphing procedure. Returning with zero reset will cause the OS not to draw the graph / present the graph buffer: you can then draw whatever you want. If you want to control what is actually drawn during a graphing procedure, check out the regraph hook.

Comments

Note: When you press graph to start the context, the OS fires this event after event 00h, with B being kGraph. I'm not sure why they do this, but if you cancel the keypress event 07h won't be fired.