Кодовый замок

Курсовой проект - Компьютеры, программирование

Другие курсовые по предмету Компьютеры, программирование

mp;& (CURRENT_ADDR 8) & 255) == 1)STATUS,7STATUS,7_WORD MACRO PLABELIN,PWORDOUTLOW (PLABELIN)@B PWORDOUTPWORDOUTHIGH (PLABELIN)@B PWORDOUTPWORDOUT+1@BH = 32= 33H = 34= 35#VAR0 = 36= 37H = 38= 39H = 40= 41H = 42= 43H = 44#P9 = 45= 46KEYPASS#0=46,KEYPASS#1=47,KEYPASS#2=48= 49MKEY#0=49,MKEY#1=50,MKEY#2=51

_B#VR1 = 52= 53= 54

_I = 55

#DEFINE RAW1 PORTA,0

#DEFINE RAW2 PORTA,1

#DEFINE RAW3 PORTA,2

#DEFINE RAW4 PORTA,3

#DEFINE COL1 PORTA,4

#DEFINE COL2 PORTA,5

#DEFINE COL3 PORTC,0

#DEFINE LED1 PORTC,4

#DEFINE LED2 PORTC,5

#DEFINE LEDPOD PORTC,3

#DEFINE FLAG _B#VR1,0

0ANDSEC>30THEN_I,WPP00T@GTBSP#P9SEC,WPP030T@GTBSP#P9,FSTATUS,2BC@LL15_000075EQU$;IN[ZAM_676.BAS]HIGHLED2:DELAYMS100:LOWLED2:LOWLEDPOD:I=0STATUS,5_BANK=1TRISC,5STATUS,5_BANK=0PORTC,5100DL@MSSTATUS,5_BANK=1TRISC,5STATUS,5_BANK=0PORTC,5STATUS,5_BANK=1TRISC,3STATUS,5_BANK=0PORTC,3_I_000076EQU$;IN[ZAM_676.BAS]GOTOMAINMAIN_000077EQU$;IN[ZAM_676.BAS]ENDIF@LL15_000078EQU$;IN[ZAM_676.BAS]WENDBC@LL12@LL13_000080EQU$;IN[ZAM_676.BAS]HIGHLEDPODSTATUS,5_BANK=1TRISC,3STATUS,5_BANK=0PORTC,3_000081EQU$;IN[ZAM_676.BAS]IFFLAG1=0THEN_B#VR1,1BC@LL17_000082EQU$;IN[ZAM_676.BAS]IFKEYPASS[I]<>KEYANDMKEY[I]<>KEYTHEN_I,WKEYPASSFSRINDF,WPBP#VAR0PBP#VAR0,WKEY,WSTATUS,21SP#P9_I,WMKEYFSRINDF,WPBP#VAR0PBP#VAR0,WKEY,WSTATUS,21SP#P9,FSTATUS,2BC@LL19_000083EQU$;IN[ZAM_676.BAS]FLAG1=1_B#VR1,1_000084EQU$;IN[ZAM_676.BAS]ENDIF@LL19_000085EQU$;IN[ZAM_676.BAS]ENDIF@LL17_000086EQU$;IN[ZAM_676.BAS]KEY=0KEY_000087EQU$;IN[ZAM_676.BAS]HIGHLED2:DELAYMS100:LOWLED2STATUS,5_BANK=1TRISC,5STATUS,5_BANK=0PORTC,5100DL@MSSTATUS,5_BANK=1TRISC,5STATUS,5_BANK=0PORTC,5_000088EQU$;IN[ZAM_676.BAS]NEXTI_I,FSTATUS,2FR@LB11@LB12_000089EQU$;IN[ZAM_676.BAS]IFFLAG1=0THEN_B#VR1,1BC@LL21_000090EQU$;IN[ZAM_676.BAS]LOWLEDPODSTATUS,5_BANK=1TRISC,3STATUS,5_BANK=0PORTC,3_000091EQU$;IN[ZAM_676.BAS]HIGHLED1STATUS,5_BANK=1TRISC,4STATUS,5_BANK=0PORTC,4_000092EQU$;IN[ZAM_676.BAS]DELAYMS20007PP1H208DLY@W_000093EQU$;IN[ZAM_676.BAS]LOWLED1STATUS,5_BANK=1TRISC,4STATUS,5_BANK=0PORTC,4_000095EQU$;IN[ZAM_676.BAS]ENDIF@LL21_000096EQU$;IN[ZAM_676.BAS]LOWLEDPODSTATUS,5_BANK=1TRISC,3STATUS,5_BANK=0PORTC,3_000097EQU$;IN[ZAM_676.BAS]RETURN_000100EQU$;IN[ZAM_676.BAS]KEY=0KEY_000101EQU$;IN[ZAM_676.BAS]COL1=1PORTA,4_000102EQU$;IN[ZAM_676.BAS]IFRAW1=1THENPORTA,0BC@LL23_000103EQU$;IN[ZAM_676.BAS]DELAYMS100100DL@MS_000104EQU$;IN[ZAM_676.BAS]KEY=11KEY_000105EQU$;IN[ZAM_676.BAS]ENDIF@LL23_000106EQU$;IN[ZAM_676.BAS]IFRAW2=1THENPORTA,1BC@LL25_000107EQU$;IN[ZAM_676.BAS]DELAYMS100100DL@MS_000108EQU$;IN[ZAM_676.BAS]KEY=44KEY_000109EQU$;IN[ZAM_676.BAS]ENDIF@LL25_000110EQU$;IN[ZAM_676.BAS]IFRAW3=1THENPORTA,2BC@LL27_000111EQU$;IN[ZAM_676.BAS]DELAYMS100100DL@MS_000112EQU$;IN[ZAM_676.BAS]KEY=77KEY_000113EQU$;IN[ZAM_676.BAS]ENDIF@LL27_000114EQU$;IN[ZAM_676.BAS]IFRAW4=1THENPORTA,3BC@LL29_000115EQU$;IN[ZAM_676.BAS]DELAYMS100100DL@MS_000116EQU$;IN[ZAM_676.BAS]KEY=4242KEY_000117EQU$;IN[ZAM_676.BAS]ENDIF@LL29_000118EQU$;IN[ZAM_676.BAS]COL1=0PORTA,4_000119EQU$;IN[ZAM_676.BAS]COL2=1PORTA,5_000120EQU$;IN[ZAM_676.BAS]IFRAW1=1THENPORTA,0BC@LL31_000121EQU$;IN[ZAM_676.BAS]DELAYMS100100DL@MS_000122EQU$;IN[ZAM_676.BAS]KEY=22KEY_000123EQU$;IN[ZAM_676.BAS]ENDIF@LL31_000124EQU$;IN[ZAM_676.BAS]IFRAW2=1THENPORTA,1BC@LL33_000125EQU$;IN[ZAM_676.BAS]DELAYMS100100DL@MS_000126EQU$;IN[ZAM_676.BAS]KEY=55KEY_000127EQU$;IN[ZAM_676.BAS]ENDIF@LL33_000128EQU$;IN[ZAM_676.BAS]IFRAW3=1THENPORTA,2BC@LL35_000129EQU$;IN[ZAM_676.BAS]DELAYMS100100DL@MS_000130EQU$;IN[ZAM_676.BAS]KEY=88KEY_000131EQU$;IN[ZAM_676.BAS]ENDIF@LL35_000132EQU$;IN[ZAM_676.BAS]IFRAW4=1THENPORTA,3BC@LL37_000133EQU$;IN[ZAM_676.BAS]DELAYMS100100DL@MS_000134EQU$;IN[ZAM_676.BAS]KEY=1010KEY_000135EQU$;IN[ZAM_676.BAS]ENDIF@LL37_000136EQU$;IN[ZAM_676.BAS]COL2=0PORTA,5_000137EQU$;IN[ZAM_676.BAS]COL3=1PORTC,0_000138EQU$;IN[ZAM_676.BAS]IFRAW1=1THENPORTA,0BC@LL39_000139EQU$;IN[ZAM_676.BAS]DELAYMS100100DL@MS_000140EQU$;IN[ZAM_676.BAS]KEY=33KEY_000141EQU$;IN[ZAM_676.BAS]ENDIF@LL39_000142EQU$;IN[ZAM_676.BAS]IFRAW2=1THENPORTA,1BC@LL41_000143EQU$;IN[ZAM_676.BAS]DELAYMS100100DL@MS_000144EQU$;IN[ZAM_676.BAS]KEY=66KEY_000145EQU$;IN[ZAM_676.BAS]ENDIF@LL41_000146EQU$;IN[ZAM_676.BAS]IFRAW3=1THENPORTA,2BC@LL43_000147EQU$;IN[ZAM_676.BAS]DELAYMS100100DL@MS_000148EQU$;IN[ZAM_676.BAS]KEY=99KEY_000149EQU$;IN[ZAM_676.BAS]ENDIF@LL43_000150EQU$;IN[ZAM_676.BAS]IFRAW4=1THENPORTA,3BC@LL45_000151EQU$;IN[ZAM_676.BAS]DELAYMS200200DL@MS_000152EQU$;IN[ZAM_676.BAS]IFRAW4=1THENPORTA,3BC@LL47_000153EQU$;IN[ZAM_676.BAS]DELAYMS5001PP1H244DLY@W_000154EQU$;IN[ZAM_676.BAS]KEY=3535KEY_000155EQU$;IN[ZAM_676.BAS]ENDIF@LL47_000156EQU$;IN[ZAM_676.BAS]ENDIF@LL45_000157EQU$;IN[ZAM_676.BAS]COL3=0PORTC,0_000158EQU$;IN[ZAM_676.BAS]RETURN_EOFEQU$;ZAM_676.BAS@LB49PB@LB49">#DEFINE FLAG1 _B#VR1,1#CODE#START0PROTON#MAIN#START@GTB38@GTW40@GT391@ST3540,W38,W$ + 339,W37,W41235,W1I@NT@RD3,5155@RD@W3,5156,PP_RD154,W155,FI@NT@WR@WR@W3,5154156,PP_WREN85157170157156,PP_WR156,PP_WR$ - 1156,PP_WREN155,FI@NT@MS40@W39@P25539,F40,FI@NT338223DLUS@WDLY@P@US38@W2323738,F252$ + 437,F$ - 237,F38,F$ - 637,0$ + 137,1$ + 3$ + 1@NT3,7@NT23,53,6#MAIN#START_SOF EQU $ ; ZAM_676.PRP_EOF EQU $ ; ZAM_676.PRP_SOF EQU $ ; ZAM_676.BAS_000009 EQU $ ; IN [ZAM_676.BAS] ALL_DIGITAL = TRUE7CMCONSTATUS,5_BANK = 1ANSEL_000010 EQU $ ; IN [ZAM_676.BAS] INPUT PORTA.0: INPUT PORTA.1: INPUT PORTA.2: INPUT PORTA.3TRISA,0TRISA,1TRISA,2TRISA,3_000011 EQU $ ; IN [ZAM_676.BAS] OUTPUT PORTA.4: OUTPUT PORTA.5: OUTPUT PORTA.6: OUTPUT PORTCTRISA,4TRISA,5TRISA,6TRISC_000029 EQU $ ; IN [ZAM_676.BAS] KEY = 0STATUS,5_BANK = 0KEY_000030 EQU $ ; IN [ZAM_676.BAS] FLAG = 1_B#VR1,0_000031 EQU $ ; IN [ZAM_676.BAS] FLAG1 = 0_B#VR1,1_000032 EQU $ ; IN [ZAM_676.BAS] KEYPASS[0] = EREAD 00EE@RDPBP#VAR0PBP#VAR0,WKEYPASS#0_000033 EQU $ ; IN [ZAM_676.BAS] KEYPASS[1] = EREAD 11EE@RDPBP#VAR0PBP#VAR0,WKEYPASS#1_000034 EQU $ ; IN [ZAM_676.BAS] KEYPASS[2] = EREAD 22EE@RDPBP#VAR0PBP#VAR0,WKEYPASS#2_000035 EQU $ ; IN [ZAM_676.BAS] MKEY[0] =1: MKEY[1] =7: MKEY[2] =81MKEY#07MKEY#18MKEY#2_000038 EQU $ ; IN [ZAM_676.BAS] GOSUB KLAVAKLAVA_000039 EQU $ ; IN [ZAM_676.BAS] IF KEY = 35 THEN35KEY,WSTATUS,2BC@LL2_000040 EQU $ ; IN [ZAM_676.BAS] GOTO USTKEYUSTKEYBC@LL3@LL2_000041 EQU $ ; IN [ZAM_676.BAS] ELSE_000042 EQU $ ; IN [ZAM_676.BAS] FLAG = 1_B#VR1,0_000043 EQU $ ; IN [ZAM_676.BAS] GOSUB PROVERKAPROVERKA_000044 EQU $ ; IN [ZAM_676.BAS] ENDIF@LL3_000045 EQU $ ; IN [ZAM_676.BAS] GOTO MAINMAIN_000048 EQU $ ; IN [ZAM_676.BAS] HIGH LEDPOD: HIGH LED2:KEY=0STATUS,5_BANK = 1TRISC,3STATUS,5_BANK = 0PORTC,3STATUS,5_BANK = 1TRISC,5STATUS,5_BANK = 0PORTC,5KEY_000049 EQU $ ; IN [ZAM_676.BAS] DELAYMS 3000:LOW LED2:DELAYMS 1000: HIGH LED211PP1H184DLY@WSTATUS,5_BANK = 1TRISC,5STATUS,5_BANK = 0PORTC,53PP1H232DLY@WSTATUS,5_BANK = 1TRISC,5STATUS,5_BANK = 0PORTC,5_000050 EQU $ ; IN [ZAM_676.BAS] IF FLAG = 1 THEN_B#VR1,0BC@LL5_000051 EQU $ ; IN [ZAM_676.BAS] FOR I=0 TO 2_I@LB73_I,WSTATUS,0NX@LB8_000052 EQU $ ; IN [ZAM_676.BAS] WHILE KEY = 0@LL8KEY,FSTATUS,2BC@LL9_000053 EQU $ ; IN [ZAM_676.BAS] GOSUB KLAVAKLAVA_000054 EQU $ ; IN [ZAM_676.BAS] DELAYMS 200200DL@MS_000055 EQU $ ; IN [ZAM_676.BAS] WENDBC@LL8@LL9_000056 EQU $ ; IN [ZAM_676.BAS] EWRITE I ,[ KEY ]_I,WSTATUS,5_BANK = 1EEADRSTATUS,5_BANK = 0KEY,WEE@WR_000057 EQU $ ; IN [ZAM_676.BAS] LOW LED2: DELAYMS 100: HIGH LED2STATUS,5_BANK = 1TRISC,5STATUS,5_BANK = 0PORTC,5100DL