;A Program for the TI86 for password protecting your calc! (v3.0) ;by TI SoftWare 5/20/1998 ;Please visit our website at: ;http://www.geocities.com/siliconvalley/peaks/1062/ Thanx!!! ;By the way, the password is 'TISW' ;YES!!! -- No bugs!!!! ;The ON-pressed bug of previous versions, which was when ;you turned on the TI86 and entered the correct password after shutting it ;down from the home screen (NOT a shell), you would get ERROR 06 ;BREAK and the standard menu :( ;This bug no longer occurs since Calculator Guardian v3.0 now ;'clears' the ON-pressed 'flag'!!! #include "asm86.h" #include "ti86asm.inc" .org _asm_exec_ram ;*********Shell Description********** nop jp Start .dw $0000 .dw ShellDescription ShellDescription: .db "Calculator Guardian v3.0",0 ;********End Description************* Start: call _runindicoff ld a, $01 ;Many thanks to FangSoft for their shutdown out ($03), a ;routine from Blank Screen v.05 - TI86 ASM! HALT ld a, $0b out ($03), a jr Next Next: call _clrLCD ;clear the LCD screen set 3, (IY+5) ;change text to black-on-white ld de, $0003 ld (CURSOR_ROW), de ;set cursor at 0,0 - top left of screen ld hl, versioninfo ;display "CalcGuard 3.0" call _puts ld de, $0005 ld (CURSOR_ROW), de ;move the cursor to row 5, column 1 ld hl, author call _puts ;display "By TI Software" res 3, (IY+5) ;Change text back to white-on-black ld de, $0702 ld (CURSOR_ROW), de ;move cursor to the middle of the screen ld b,$04 ;we need only 4 key presses PWEnter: push bc call GET_KEY ;Get a keypress pop bc ;take bc off of stack cp K_NOKEY ;no key pressed, so... jr z, PWEnter ;try again! push af ;save the key that was pressed ld hl,asterisk call _puts ;display one asterisk djnz PWEnter ;repeat the loop until b is equal to 0 (zero) PWCheck: pop af cp K_3 jr nz, WrongPW3 pop af cp K_6 jr nz, WrongPW2 pop af cp K_RIGHTPAR jr nz, WrongPW1 pop af cp K_MINUS jr nz,Start jr FinishUp ;correct password - leave program!!! WrongPW3: ;reverse all pushes that were done! pop af WrongPW2: pop af WrongPW1: pop af jr Start FinishUp: call _clrLCD res 4,(iy+$09) ret ;String Constants ;------------------------ versioninfo: .db " CalcGuard 3.0 ",0 author: .db " By TISoftware '98 ",0 blanks: .db " ",0 asterisk: .db "*",0 .END END