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

From WikiTI
Jump to: navigation, search
 
m
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
[[Category:83Plus:BCALLs:By_Name:Dialog|DialogInit]] [[Category:83Plus:BCALLs:By_Name|DialogInit]] [[Category:83Plus:BCALLs:By_Address|4C06 - DialogInit]]
 
[[Category:83Plus:BCALLs:By_Name:Dialog|DialogInit]] [[Category:83Plus:BCALLs:By_Name|DialogInit]] [[Category:83Plus:BCALLs:By_Address|4C06 - DialogInit]]
 +
{{missinfo|destroys}}
 
== Synopsis ==
 
== Synopsis ==
 
'''Official Name:''' DialogInit
 
'''Official Name:''' DialogInit
Line 19: Line 20:
 
== Comments ==
 
== Comments ==
 
* Use [[83Plus:BCALLs:4C03|StartDialog]] to start Dialog
 
* Use [[83Plus:BCALLs:4C03|StartDialog]] to start Dialog
* Use with the other Dialog BCALLs.
+
* Use with the other [[:Category:83Plus:BCALLs:By_Name:Dialog|Dialog BCALLs.]]
* More info can be found [http://brandonw.net/calcstuff/dialogNotes.txt here].
+
* [[83Plus:OS:Dialog_context|Info on how to use the Dialog BCALLs]] .
 
* [http://brandonw.net/calcstuff/ddemo.zip example program]
 
* [http://brandonw.net/calcstuff/ddemo.zip 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:
 

Latest revision as of 19:16, 13 April 2008

This article is missing some information (namely destroys). You can help WikiTI by filling in the missing information.


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