Difference between revisions of "83Plus:BCALLs:4B82"

From WikiTI
Jump to: navigation, search
 
(official name, a word of warning)
 
Line 1: Line 1:
[[Category:83Plus:BCALLs:By Name|CollapseStacks]]
+
[[Category:83Plus:BCALLs:By Name:Other|ResetStacks]] [[Category:83Plus:BCALLs:By Name|ResetStacks]] [[Category:83Plus:BCALLs:By Address|4B82 - ResetStacks]]
[[Category:83Plus:BCALLs:By Address|4B82 - CollapseStacks]]
+
 
== Synopsis ==
 
== Synopsis ==
 +
'''Official Name:''' ResetStacks
 +
 
'''Unofficial Name:''' CollapseStacks
 
'''Unofficial Name:''' CollapseStacks
  
 
'''BCALL Address:''' 4B82
 
'''BCALL Address:''' 4B82
  
Collapses the operator and floating-point stacks, freeing up temorary memory.
+
Deletes all data from the operator and floating-point stacks, and removes all error handlers (except the standard system error handler.)
  
 
=== Inputs ===
 
=== Inputs ===
Line 18: Line 19:
  
 
== Comments ==
 
== 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 [[83Plus:BCALLs:4027|JForceCmdNoChar]] (which itself calls this routine.)
 +
 
Full disassembly of this entry point on OS 2.41 is below:
 
Full disassembly of this entry point on OS 2.41 is below:
  

Latest revision as of 12:36, 6 November 2006

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