83Plus:BCALLs:4C06
From WikiTI
Synopsis
Official Name: DialogInit
BCALL Address: 4C06
Initializes the dialog context at appData.
Inputs
- HL: is address of parser callback for any numbers entered.
- A: is page of parser callback for any numbers entered (must be non-zero).
- appData: menu structure.
Outputs
- Initializes the dialog context.
Destroys
- unknown
Comments
- Use StartDialog to start Dialog
- Use with the other Dialog BCALLs.
- More info can be found here.
- example program
Example
hookBackup equ appBackUpScreen _StartDialog equ 4C03h _DialogInit equ 4C06h _GetDialogNumOP1 equ 4C09h .org userMem-2 .db 0BBh,6Dh ld hl,rawKeyHookPtr ld de,hookBackup ld bc,4 ldir ld a,(flags+34h) ld (de),a ld a,(cxCurApp) push af ld a,58h ld (cxCurApp),a ld hl,structStart ld de,ramCode ld bc,structEnd-structStart ldir ld hl,dialogCallback in a,(6) bcall(_DialogInit) bcall(_runIndicOff) bcall(_StartDialog) bcall(_cursorOff) bcall(_clrLCDFull) res appCurWord,(iy+appFlags) bcall(_ClrTxtShd) ld hl,cmdShadow ld de,cmdShadow+1 ld (hl),' ' ld bc,127 ldir pop af ld (cxCurApp),a ld hl,hookBackup ld de,rawKeyHookPtr ld bc,4 ldir ld a,(hl) ld (flags+34h),a xor a bcall(_GetDialogNumOP1) ld hl,0 ld (penCol),hl ld a,9 bcall(_DispOP1a) dialogCallback: xor a ret structStart: .db 1 .db 1 .db 1 .dw sOptions-structStart .db 5 .db 1 .db 1 .dw sItem1-structStart .db 5 .db 1 .db 2 .dw sItem2-structStart .db 2 .db 3 .db 1 .dw sSelect-structStart .dw sOpt1-structStart .dw sOpt2-structStart .db 3 .db 1 .db 0 .dw sNum-structStart .db 4 .db 1 .db 1 .dw sDone-structStart .db 0 sOptions: .db 7,"OPTIONS" sItem1: .db 5,"Item1" sItem2: .db 5,"Item2" sSelect: .db 6,"Opts: " sOpt1: .db 4,"Opt1" sOpt2: .db 4,"Opt2" sNum: .db 4,"Num=" sDone: .db 4,"Done" structEnd: