beginMenuHook: .db 83h cp 4 jr nz,notFirstEvent bit editArchivedProgFlag, (IY+asm_Flag3) jr z,notFirstEvent push af push hl ld a,b cp mProgramHome ld a,$FF jr z,bridgeJR ld a,b cp 33 ld a,$FF jr z,bridgeJR pop hl pop af notFirstEvent: cp 3 jr nz,quitMenuHook ld a,(menuCurrent) cp mProgramHome jr nz,quitMenuHook ld a,(menuCurrent+1) cp mPrgm_Edit jr nz,quitMenuHook ld a,b cp cxPrgmEdit jr nz,quitMenuHook push bc push de call _releaseBuffer call _PPutAway call _zeroop1 ld a,AppVarObj ld (OP1),a ld a,'P' ld (OP1+1),a ld a,'H' ld (OP1+2),a call _chkfindsym jr c,AppVarIssue call _chkInRam jr nz,AppVarIssue ex de,hl pop de push hl ld hl,-9 add hl,de call _Mov9ToOp1 ld a,progObj ld (OP1),a call _Op1ToOp6 call _chkfindsym call _chkInRam pop ix jr z,InRam push ix call _ARC_UNARC pop de inc de inc de ld hl,OP6 ld bc,9 ldir set editArchivedProgFlag, (IY+asm_Flag3) InRam: pop bc quitMenuHook: cp a ret AppVarIssue: pop de pop bc jr quitMenuHook endMenuHook: .end