Password - ;Brent Matthews;LAB 8 Wednesday;data...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ;Brent Matthews ;LAB 8, Wednesday ;March 23, 2011 ; ;data intialization SET EQU 1 CLEAR EQU START EQU $8800 LEDS EQU $1004 PORTG EQU $6200 DPORTG EQU $6202 INITSCAN EQU %11110111 INITSTACK EQU $DFFF INITDG EQU %00001111 CORRECT EQU %11111111 ;LEDs will display this is password correct INCORRECT EQU %10101010 ;LEDs will display this if password incorrect PASSWORD FCB 1,2,3,4 ;password is 1234 ENDPASS CURRENT RMB 2 EFLAG RMB 1 ScanPattern RMB 1 THISKEY RMB 1 THISROW RMB 1 CURRENTKEY RMB 1 ROWNUM RMB 1 COLUMNNUM RMB 1 KEY RMB 1 K ;program begin ; ORG START LDAA #CLEAR STAA EFLAG LDAA #INITDG STAA DPORTG LDS #INITSTACK ;Load stack pointer LDX #PASSWORD ;store the password in the stack STX CURRENT ;wait for button press ; NOPRESS JSR KEYSCAN CMPB #CLEAR BEQ NOPRESS ;if key is not pressed, go back to NOPRESS STAB KEY ;wait for button release ; PRESS JSR KEYSCAN LDAA #CLEAR STAA LEDS ;loads clear signal into LEDs CMPB #CLEAR BNE PRESS ;if button not released, go to PRESS ;sends error to LEDs if password incorrect...
View Full Document

This note was uploaded on 09/20/2011 for the course ECE 271 taught by Professor Eason,r during the Spring '08 term at University of Maine Orono .

Page1 / 3

Password - ;Brent Matthews;LAB 8 Wednesday;data...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online