Difference between revisions of "83:ROMCalls:4062"
From WikiTI
m (added link to port 0) |
|||
Line 14: | Line 14: | ||
== Details == | == Details == | ||
− | * out (00),C0 | + | * out ([[83:Ports:00|00]]),C0 |
* ld sp,FFFF | * ld sp,FFFF | ||
* load zero into 8000-FFFF,0000 | * load zero into 8000-FFFF,0000 |
Revision as of 14:24, 13 April 2005
Contents
Synopsis
Official Name: Initialize
Call Address: 4062
This routine resets all RAM and jumps to Mon.
Inputs
None.
Outputs
This routine does not return.
Details
- out (00),C0
- ld sp,FFFF
- load zero into 8000-FFFF,0000
- initialize RAM with default values
- setup default error handler (MonErrHand)
- save SP (FFFF?) at onSP
- display "Mem cleared"
- call HomeUp
- call CursorOn
- clear kbdScanCode by calling GetCSC
- call GetKey (read: wait for a key)
- call ClrScrn to remove the "Mem cleared" message on the first keypress.
- jump to MonForceKey to handle the keypress returned by the GetKey call and hand over control to Mon.