; ***************************** Instant GoTo ***************************** ; ; It displays a menu which allows you to jump to the label you want if [Alpha] + [X,T,O,N] are pressed beginGetkeyHook: .db 83h ; All hooks begin with .db 83h cp 1Bh ; we check if the OS called the hook because a key has been pressed ret nz ld a,b ; A = key cp skVars jr nz,notVarsKey ld hl,sizeHomeScreenHook+sizeInstantGoto + 2 ld bc,AppvarSize-sizeHomeScreenHook-sizeInstantGoto jr jumpToAppVar notVarsKey: cp skGraphvar ret nz ld hl,sizeHomeScreenHook + 2 ; addr after Homescreen Hook (2 = size bytes) ld bc,sizeInstantGoto jumpToAppVar: bit shiftAlpha, (iy+shiftFlags) jr z,quitGKHook+1 res shiftAlpha, (iy+shiftFlags) push bc push hl call _op1ToOp5 ; Saving the name of the program edited (for Instant Goto) call _zeroop1 ld a,AppVarObj ; We obtain the address of the code (in PH AppVar) ld (OP1),a ld a,'P' ld (OP1+1),a ld a,'H' ld (OP1+2),a call _ChkFindSym pop hl jr c,quitGKHook call _chkinram jr nz,quitGKHook add hl,de push hl call _op5toOp1 pop hl ld de,$D052C6+4000 pop bc ldir ld hl,$D052C6+4000 jp (hl) quitGKHook: pop bc and a ret endGetkeyHook: