;Configure LinkMan include "settings.inc" include "ti83plus.inc" include "equates.inc" SEGMENT Main GLOBALS ON EXTERN StartApp,VPutSApp,SoftKey,ExitApp,curChoice,VPutSAppCenter,fastCopy,IPutS,DispHexA,IGetKey,sLinkManAppVar EXTERN loadAppVar ConfigureLinkMan: call loadAppVar ld a,(appData) ld (curChoice),a ld hl,appData rst 20h ld a,ProgObj ld (OP1),a ld a,(OP1+1) or a jr nz,$F B_CALL FindAlphaUp $$: B_CALL OP1ToOP6 B_CALL ClrLCDFull B_CALL GrBufClr res plotLoc,(iy+plotFlags) set textWrite,(iy+sGrFlags) ld hl,sSoftKeyTable call SoftKey redrawConfig: ld hl,0 ld (penCol),hl ld a,(curChoice) or a call z,setTextInverse ld hl,sRespondNormally call VPutSApp res textInverse,(iy+textFlags) ld hl,7*256 ld (penCol),hl ld a,(curChoice) cp 1 call z,setTextInverse ld hl,sIgnoreAllCommunication call VPutSApp res textInverse,(iy+textFlags) ld hl,14*256 ld (penCol),hl ld a,(curChoice) cp 2 call z,setTextInverse ld hl,sRejectAllCommunication call VPutSApp res textInverse,(iy+textFlags) ld hl,21*256 ld (penCol),hl ld a,(curChoice) cp 3 call z,setTextInverse ld hl,sStealthMode call VPutSApp res textInverse,(iy+textFlags) ld hl,28*256 ld (penCol),hl ld a,(curChoice) cp 4 call z,setTextInverse ld hl,sRunProgram call VPutSApp res textInverse,(iy+textFlags) ld hl,35*256 ld (penCol),hl ld a,(curChoice) cp 5 call z,setTextInverse ld hl,sRunProgramInstead call VPutSApp res textInverse,(iy+textFlags) redrawProgramSelect: ld hl,plotSScreen+(12*45) ld bc,12*10 B_CALL MemClear ld a,(curChoice) cp 5 jr z,programSelect cp 4 jr nz,$F programSelect: ld hl,45*256+1 ld (penCol),hl ld a,Lleft B_CALL VPutMap ld a,90 ld (penCol),a ld a,Lconvert B_CALL VPutMap ld hl,OP6+1 ld a,(hl) or a jr nz,programExists ld hl,sNotFound programExists: call VPutSAppCenter $$: call fastCopy configKeyLoop: B_CALL GetKey cp kYequ jr z,saveConfig cp kGraph jr z,StartApp cp kClear jr z,StartApp cp kQuit jr z,ExitApp cp kUp jr z,configUp cp kDown jr z,configDown ld b,a ld a,(curChoice) cp 4 jr z,testMoreKeys cp 5 jr nz,configKeyLoop testMoreKeys: ld a,b cp kLeft jr z,configLeft cp kRight jr nz,configKeyLoop B_CALL OP6ToOP1 B_CALL FindAlphaUp B_CALL OP1ToOP6 jr redrawProgramSelect configLeft: B_CALL OP6ToOP1 B_CALL FindAlphaDn B_CALL OP1ToOP6 jr redrawProgramSelect saveConfig: ld hl,sLinkManAppVar rst 20h B_CALL ChkFindSym ld a,b or a jr z,$F B_CALL Arc_Unarc $$: ld hl,sLinkManAppVar rst 20h B_CALL ChkFindSym inc de inc de inc de inc de ld a,(curChoice) ld (de),a inc de ld hl,OP6+1 ld bc,8 ldir jr StartApp configUp: ld a,(curChoice) or a jr z,configKeyLoop dec a ld (curChoice),a jr redrawConfig configDown: ld a,(curChoice) cp 5 jr z,configKeyLoop inc a ld (curChoice),a jr redrawConfig setTextInverse: set textInverse,(iy+textFlags) ret sRespondNormally: DB "Respond normally",0 sIgnoreAllCommunication: DB "Ignore all communication",0 sRejectAllCommunication: DB "Reject all communication",0 sStealthMode: DB "Stealth mode",0 sRunProgram: DB "When activity, run program:",0 sRunProgramInstead: DB "Alternate remote program:",0 sSoftKeyTable: DB 6,"OK",0 DB 0 DB 0 DB 0 DB " ESC",0 sNotFound: DB "",0