83Plus:BCALLs:4024
From WikiTI
Synopsis
Official Name: SendKPress
BCALL Address: 4024
Calls the system monitor but allows the programmer to push an initial key through cxMain. This is very much like Mon and MonForceKey.
Inputs
- A = initial key press to simulate
- AppAllowContext, (IY + APIFlg) = 1 to allow Mon to pass context keys, like kYequ to the cxMain routine.
- CurLock, (IY + curFlags) = 1 to lock the cursor off
Outputs
- none
Registers Destroyed
- Doesn't matter because it doesn't return
Comments
This routine is similar to MonForceKey, but the initial keypress is passed more-or-less directly to cxMain (whereas MonForceKey passes the keypress to the raw key hook, if enabled, and handles the various special keys.)
The system NEVER returns from this B_CALL. The programmer should find alternative methods of regaining control and exiting such as hooks, cxMain, etc.
Example
To simulate a key press by the user when first entering the system monitor:
;set up edit buffer ;... ld a,k8 B_CALL SendKeyPress ;should see the number 8 appear in the edit buffer