83Plus:BCALLs:4B82

From WikiTI
Revision as of 12:36, 6 November 2006 by FloppusMaximus (Talk | contribs)

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

Synopsis

Official Name: ResetStacks

Unofficial Name: CollapseStacks

BCALL Address: 4B82

Deletes all data from the operator and floating-point stacks, and removes all error handlers (except the standard system error handler.)

Inputs

  • None

Outputs

  • None

Destroys

  • HL

Comments

For obvious reasons, you should never call this routine if you intend to return to the OS (or any other program) afterwards. It should only be used when you intend to "reboot" the OS using a routine such as JForceCmdNoChar (which itself calls this routine.)

Full disassembly of this entry point on OS 2.41 is below:

ld hl,(OPBase)
ld (OPS),hl
ld hl,(FPBase)
ld (FPS),hl
ld hl,(onSP)
ld (errSP),hl
ret