83:ROMCalls:4062
From WikiTI
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.