0 Members and 1 Guest are viewing this topic.
Menu: res indicrun,(iy+indicflags) res apptextsave,(iy+appflags) ld hl,rawKeyHookPtr ld de,appBackUpScreen ld bc,4 ldir ld a,(flags+34h) ld (de),a ld hl,cmdShadow ld de,appBackUpScreen+5 ld bc,128 ldir 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) ld hl,appBackUpScreen+5 ld de,cmdShadow ld bc,128 ldir ld a,kQuit ; homescreen ld (cxCurApp),a ld hl,appBackUpScreen ld de,rawKeyHookPtr ld bc,4 ldir ld a,(hl) ld (flags+34h),a xor a bcall(_GetDialogNumOP1) ld a,9 bcall(_DispOP1a) xor a retdialogCallback: xor a retstructStart: .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 0sOptions: .db 7,"VECTORS"sItem1: .db 4,"abs("sItem2: .db 5,"norm("structEnd:
_keyHook_statKey: ld a,(menucurrent) cp mStat jr z,{+1@} cp mPrgmStat jp z,{+1@} ld a,kStat jp ReturnNZ @: call Menu jp ReturnZ
Menu: res indicRun,(iy+indicFlags) res appTextSave,(iy+appFlags) ld hl,rawKeyHookPtr ld de,appBackUpScreen ld bc,4 ldir ld a,(flags+34h) ld (de),a ld hl,cmdShadow ld de,appBackUpScreen+5 ld bc,128 ldir 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) ld hl,appBackUpScreen+5 ld de,cmdShadow ld bc,128 ldir ld hl,cmdShadow ld de,textShadow ld bc,128 ldir ld a,kQuit ; homescreen ld (cxCurApp),a ld hl,appBackUpScreen ld de,rawKeyHookPtr ld bc,4 ldir ld a,(hl) ld (flags+34h),a xor a bcall(_GetDialogNumOP1) ld a,9 bcall(_DispOP1A) ld a,kQuit retdialogCallback: ld a,kQuit ret