So I've been playing around this program for a while. I haven't made much progress toward adding another button. But I had an idea to make it "discreet", of course removing the prompt messages was the easy part, however when you still write the password you get the indication on the screen that you are writing it.
https://imgur.com/tsDzUWK
Even if Pwordtext is " ",0
I was talking with a friend who does knows some stuff and we went through some materials to understand some basics what is the .db and how does the "bcall" etc. We managed to play with the password length and some other variables. But couldn't manage to find a way to remove the "cubes in picture" when you are writing the password.
Could anyone drop a pointer where to look if we missed or confirm our hypothesis that its just how the calculator works and nothing can be done about it.
Appreciated, thank you.
Full Code I linked below
Code:
#include "ti83plus.inc"
#define bcall(label) RST 28h \ .dw label
#define KEYLOC appbackupscreen ;The location of your hook code
#define ADDOFFSET KEYLOC-KeyHook ;Needed - when addressing variables, add 'ADDOFFSET' to ensure they come out right!
.org $9D93
.db $BB,$6D
bcall(_runindicoff)
ld hl,Splash
ld de,PlotsScreen
ld bc,768
ldir
bcall(_grbufcpy)
InstKeyLoop:
bcall(_getcsc)
or a
jr z,InstKeyLoop
cp sk1
jr z,Install
cp sk2
jr z,Uninstall
cp sk3
jr z,ExitProg
jr InstKeyLoop
Install:
bcall(_clrlcdfull)
bcall(_homeup)
bcall(_newline)
ld hl,SetTxt
bcall(_puts)
bcall(_newline)
ld hl,PWordText
bcall(_puts)
ld a,10
ld (curcol),a
ld b,4 ;4 characters in the password (PIN)
ld de,PassWord
SetPWordLoop:
bcall(_getcsc)
or a
jr z,SetPWordLoop
ld (de),a
inc de
ld a,LboxIcon
bcall(_putc)
dec b
ld a,b
or a
jr nz,SetPWordLoop
ld ix,LockedKeys
ld hl,BlockTxt
push hl
call SetKeysToBlock
call SetKeysToBlock
call SetKeysToBlock
pop hl
ld hl,KeyHook
ld bc,End_KeyHook-KeyHook
ld de,KEYLOC
ldir
ld hl,KEYLOC
in a,(6)
bcall($4F66)
ExitProg_Pause:
ld hl,Press_Key
bcall(_newline)
bcall(_puts)
EndInstallLoop:
bcall(_getcsc)
or a
jr z,EndInstallLoop
jr ExitProg
Uninstall:
bcall(4F6Fh)
bcall(_clrlcdfull)
bcall(_homeup)
ld hl,Uninst
bcall(_puts)
jr ExitProg_Pause
ExitProg:
call ClearTextShadow
bcall(_grbufclr)
bcall(_clrlcdfull)
bcall(_homeup)
ret
SetTxt:
.db "Set",0
BlockTxt:
.db "Memory?",0
.db "Programs?",0
.db "Apps?",0
YesNoMenu:
bcall(_getcsc)
or a
jr z,YesNoMenu
ret
SetKeysToBlock:
pop bc
bcall(_newline)
pop hl
bcall(_puts)
push hl
call YesNoMenu
cp skEnter
jr z,NoBlockOpt
xor a
ld (ix+0),a
jr NotBlocked
NoBlockOpt:
ld hl,LockedTxt
bcall(_puts)
NotBlocked:
inc ix
push bc
ret
LockedTxt:
.db " *",0
Press_Key:
.db "Press a key",Lellipsis,0
Uninst:
.db "Uninstalled",0
;--==[ KEYHOOK CODE ]==--
KeyHook:
add a,e
push af
KeyHooked:
ld bc,3 ;3 possible 'blocked keys'.
ld hl,LockedKeys+ADDOFFSET
cpir
jr nz,NotLockedKey
;--==[ I have picked up a 'blocked' key - time to run the password program! ]==--
bcall(_runindicoff)
bcall(_clrlcdfull)
xor a
ld (curcol),a
ld a,7
ld (currow),a
ld hl,PWordText+ADDOFFSET
bcall(_puts)
ld a,7
ld (currow),a
ld a,10
ld (curcol),a
xor a
ld (BadPWordV+ADDOFFSET),a
ld de,Password+ADDOFFSET
ld b,4 ;4 characters in the password (PIN)
PWordKeyLoop:
bcall(_getcsc)
or a
jr z,PWordKeyLoop
cp skClear
jr z,BadPWord
ld c,a
ld a,(de)
inc de
cp c
jr z,PWordIsFine
ld a,1
ld (BadPWordV+ADDOFFSET),a
PWordIsFine:
ld a,LboxIcon
bcall(_putc)
dec b
ld a,b
or a
jr nz,PWordKeyLoop
ld a,(BadPWordV+ADDOFFSET)
or a
jr z,CorrectPWord
;--==[ Error in P/Word ]==--
BadPWord:
bcall(_clrlcdfull)
bcall(_homeup)
LockedKey:
call ClearTextShadow+ADDOFFSET
bcall(_runindicon)
pop af
xor a
ret
CorrectPWord:
bcall(_clrlcdfull)
bcall(_homeup)
call ClearTextShadow+ADDOFFSET
NotLockedKey:
bcall(_runindicon)
pop af
ret
Password:
.db sk1,sk2,sk3,sk4
LockedKeys: .db kMem,kPrgm,kAppsMenu
PWordText:
.db "Password:",LlBrack,LDotIcon,LDotIcon,LDotIcon,LDotIcon,"]",0
BadPWordV:
.db 0
ClearTextShadow:
ld hl,textShadow
ld bc,16*8
ld a,lSpace
bcall(_memset)
bcall(_homeup)
ret
End_KeyHook:
;--==[ END OF KEYHOOK]==--
;--==[ Main program screen ]==--
Splash:
.db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
.db $80,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$01
.db $BF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$F9
.db $A0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$09
.db $AF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$ED
.db $AF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$ED
.db $AF,$FF,$FF,$04,$13,$A0,$41,$CC,$FF,$FF,$FF,$ED
.db $AF,$FF,$FE,$7C,$F1,$B9,$CC,$CC,$FF,$FF,$FF,$ED
.db $AF,$FF,$FE,$7C,$F0,$B9,$CC,$E1,$FF,$FF,$FF,$ED
.db $AF,$FF,$FE,$0C,$14,$39,$CC,$E1,$FF,$FF,$FF,$ED
.db $AF,$FF,$FF,$04,$F6,$39,$C1,$F3,$FF,$FF,$FF,$ED
.db $AF,$FF,$FF,$E4,$F7,$39,$C9,$F3,$FF,$FF,$FF,$ED
.db $AF,$FF,$FF,$E4,$F7,$B9,$CC,$F3,$FF,$FF,$FF,$ED
.db $AF,$FF,$FE,$0C,$17,$B9,$CE,$73,$FF,$FF,$FF,$ED
.db $AF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$ED
.db $AF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$ED
.db $A0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0D
.db $A0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0D
.db $A0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0D
.db $A0,$00,$00,$00,$00,$00,$00,$00,$00,$3C,$00,$0D
.db $A0,$80,$04,$00,$00,$50,$00,$00,$01,$C3,$80,$0D
.db $A1,$80,$04,$00,$40,$50,$00,$00,$02,$3C,$40,$0D
.db $A0,$80,$05,$C7,$EF,$50,$00,$00,$0C,$FF,$30,$0D
.db $A0,$80,$05,$28,$41,$50,$00,$00,$11,$E1,$88,$0D
.db $A0,$83,$05,$26,$47,$50,$00,$00,$13,$80,$4C,$0D
.db $A0,$80,$05,$21,$49,$50,$00,$00,$27,$00,$24,$0D
.db $A0,$80,$05,$2E,$6F,$50,$00,$00,$4E,$00,$12,$0D
.db $A0,$00,$00,$00,$00,$00,$00,$00,$4C,$00,$13,$0D
.db $A0,$00,$00,$00,$00,$00,$00,$00,$5C,$00,$0B,$0D
.db $A1,$80,$07,$80,$00,$00,$00,$00,$58,$00,$0B,$0D
.db $A2,$40,$04,$40,$00,$00,$00,$00,$58,$00,$0B,$0D
.db $A0,$40,$04,$4C,$FC,$64,$4C,$00,$FF,$FF,$FF,$0D
.db $A0,$80,$07,$92,$92,$92,$92,$00,$80,$00,$01,$8D
.db $A0,$83,$04,$9E,$92,$92,$9E,$00,$80,$00,$01,$8D
.db $A1,$00,$04,$50,$92,$92,$90,$00,$80,$00,$01,$8D
.db $A3,$C0,$04,$4E,$92,$61,$0E,$00,$80,$08,$01,$8D
.db $A0,$00,$00,$00,$00,$00,$00,$00,$80,$14,$01,$8D
.db $A0,$00,$00,$00,$00,$00,$00,$00,$80,$14,$01,$8D
.db $A1,$80,$07,$C1,$00,$00,$00,$00,$80,$14,$01,$8D
.db $A2,$40,$04,$00,$40,$00,$00,$00,$80,$08,$01,$8D
.db $A0,$40,$04,$15,$E0,$00,$00,$00,$80,$1C,$01,$8D
.db $A0,$80,$07,$C9,$40,$00,$00,$00,$80,$14,$01,$8D
.db $A0,$43,$04,$09,$40,$00,$00,$00,$80,$14,$01,$8D
.db $A2,$40,$04,$09,$40,$00,$00,$00,$80,$1C,$01,$8D
.db $A1,$80,$07,$D5,$60,$00,$00,$00,$80,$00,$01,$8D
.db $A0,$00,$00,$00,$00,$00,$00,$00,$80,$00,$01,$8D
.db $A0,$00,$00,$00,$00,$00,$00,$00,$FF,$FF,$FF,$8D
.db $A0,$00,$00,$00,$00,$00,$00,$00,$7F,$FF,$FF,$8D
.db $A0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0D
.db $A0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0D
.db $A0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0D
.db $AF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$ED
.db $AF,$FF,$FF,$FF,$7E,$CF,$DF,$F9,$DD,$9F,$FF,$ED
.db $AF,$FF,$FF,$FF,$7D,$77,$DF,$FE,$AA,$EF,$FF,$ED
.db $AF,$FF,$FF,$99,$66,$EC,$D5,$9D,$AA,$DF,$FF,$ED
.db $AF,$FF,$FF,$75,$5D,$75,$55,$BB,$AA,$EF,$FF,$ED
.db $AF,$FF,$FF,$99,$66,$CC,$D9,$38,$DD,$9F,$FF,$ED
.db $AF,$FF,$FF,$FF,$FF,$FD,$FF,$FF,$FF,$FF,$FF,$ED
.db $AF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$ED
.db $A0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0D
.db $BF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FD
.db $9F,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FD
.db $80,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$01
.db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
.end