A83: Pword Program...
[Prev][Next][Index][Thread]
A83: Pword Program...
Check this program out:
(it looks good to me ;)
.nolist
#define equ .equ
#define EQU .equ
#include "ti83asm.inc"
.list
.org $9327
;start of porgram
call _cls ;clear screen
begin_code:
ld ix,password_flag ;check password flag(if set yet)
jp z,change_password
ld hl,text
call _cls
call _homeup
call _puts
ld hl,passcode_temp
ld b,8
start:
call getkey
ld a,b
jp z,done
jp start
getkey:
call _getkey
ld (hl),a
inc hl
dec b
ret
done:
ld de,passcode_temp
ld hl,passcode_real
sub hl,de
jp z,correct
jr off
correct:
ret
off:
call _off
jp begin_code
change_password:
ld hl,text
call _homeup
call _puts
ld hl,password_real
ld b,8
change_loop:
call getkey
ld a,b
jp z,done_changing
jp change_loop
done_changing:
call _cls
ld hl,done_text
call _homeup
call _puts
ret
passcode_flag:
.db $00,$FF,0
passcode_temp:
.db $00,$00,$00,$00,$00,$00,$00,$00,$00,$FF,0
passcode_real:
.db $00,$00,$00,$00,$00,$00,$00,$00,$00,$FF,0
text:
.db "Enter Password",0
done_text:
.db "Password Set",0
.end
End