random zar atma ugulması

Başlatan mmtkr, 26 Mayıs 2022, 13:02:00

mmtkr

Alıntı yapılan: alisumer - 15 Haziran 2022, 15:03:22:o
LIST    P=16F877A
INCLUDE    "P16F877A.INC"
ORG 0x00
 
 
SAYAC1 EQU 0x20
SAYAC2 EQU 0x21
 
 
	BIR EQU 0x24
        IKI EQU 0x26
        UC EQU 0x27
        DORT EQU 0x28
	BES EQU 0x29
	ALTI EQU 0x30
 
	BIRb EQU 0x31
        IKIb EQU 0x32
        UCb EQU 0x33
        DORTb EQU 0x34
	BESb EQU 0x35
	ALTIb EQU 0x36
        SIFIR EQU 0x37
 
BANKSEL TRISB
CLRF TRISB
BANKSEL TRISA
MOVLW 0x06
MOVWF ADCON1
MOVLW 0xCF
MOVWF TRISA
BANKSEL PORTB
 
 
MOVLW B'11010001' 	
MOVWF BIR
 
MOVLW B'11010010' 	
MOVWF IKI
 
MOVLW b'11010011'	
MOVWF UC
 
MOVLW b'11010100'	
MOVWF DORT
 
MOVLW b'11010101'	
MOVWF BES
 
MOVLW b'11010110'	
MOVWF ALTI
 
MOVLW B'10110001' 	
MOVWF BIRb
 
MOVLW B'10110010' 	
MOVWF IKIb
 
MOVLW b'10110011'	
MOVWF UCb
 
MOVLW b'10110100'	
MOVWF DORTb
 
MOVLW b'10110101'	
MOVWF BESb
 
MOVLW b'10110110'	
MOVWF ALTIb
;********************************************************
ANA
 
CIFTBIRBIR
BTFSC PORTA,2
GOTO YAKBIRIKI
NOP
 
CIFTBIRIKI
BTFSC PORTA,2
GOTO YAKBIRUC
NOP
 
CIFTBIRUC
BTFSC PORTA,2
GOTO YAKBIRDORT
NOP
 
CIFTBIRDORT
BTFSC PORTA,2
GOTO YAKBIRBES
NOP
 
CIFTBIRBES
BTFSC PORTA,2
GOTO YAKBIRALTI
NOP
 
CIFTBIRALTI
BTFSC PORTA,2
GOTO YAKIKIIKI
NOP
 
CIFTIKIIKI
BTFSC PORTA,2
GOTO YAKIKIUC
NOP
 
CIFTIKIUC
BTFSC PORTA,2
GOTO YAKIKIDORT
NOP
 
CIFTIKIDORT
BTFSC PORTA,2
GOTO YAKIKIBES
NOP
 
CIFTIKIBES
BTFSC PORTA,2
GOTO YAKIKIALTI
NOP
 
CIFTIKIALTI
BTFSC PORTA,2
GOTO YAKUCUC
NOP
 
CIFTUCUC
BTFSC PORTA,2
GOTO YAKUCDORT
NOP
 
CIFTUCDORT
BTFSC PORTA,2
GOTO YAKUCBES
NOP
 
CIFTUCBES
BTFSC PORTA,2
GOTO YAKUCALTI
NOP
 
CIFTUCALTI
BTFSC PORTA,2
GOTO YAKDORTDORT
NOP
 
CIFTDORTDORT
BTFSC PORTA,2
GOTO YAKDORTBES
NOP
 
CIFTDORTBES
BTFSC PORTA,2
GOTO YAKDORTALTI
NOP
 
CIFTDORTALTI
BTFSC PORTA,2
GOTO YAKBESBES
NOP
 
CIFTBESBES
BTFSC PORTA,2
GOTO YAKBESALTI
NOP
 
CIFTBESALTI
BTFSC PORTA,2
GOTO YAKALTIALTI
NOP
 
CIFTALTIALTI
BTFSC PORTA,2
GOTO YAKBIRBIR
NOP
 
GOTO ANA
;*******************************************************************
 
 
 
YAKBIRBIR
MOVF BIR,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
MOVF BIRb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
 
YAKBIRIKI
MOVF BIR,0
MOVWF PORTB
CALL GECIKME
MOVF IKIb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
YAKBIRUC
MOVF BIR,0
MOVWF PORTB
CALL GECIKME
MOVF UCb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
YAKBIRDORT
MOVF BIR,0
MOVWF PORTB
CALL GECIKME
MOVF DORTb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
YAKBIRBES
MOVF BIR,0
MOVWF PORTB
CALL GECIKME
MOVF BESb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
YAKBIRALTI
MOVF BIR,0
MOVWF PORTB
CALL GECIKME
MOVF ALTIb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
YAKIKIIKI
MOVF IKI,0
MOVWF PORTB
CALL GECIKME
MOVF IKIb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
YAKIKIUC
MOVF IKI,0
MOVWF PORTB
CALL GECIKME
MOVF UCb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
YAKIKIDORT
MOVF IKI,0
MOVWF PORTB
CALL GECIKME
MOVF DORTb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
YAKIKIBES
MOVF IKI,0
MOVWF PORTB
CALL GECIKME
MOVF BESb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
YAKIKIALTI
MOVF IKI,0
MOVWF PORTB
CALL GECIKME
MOVF ALTIb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
YAKUCUC
MOVF UC,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
MOVF UCb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
YAKUCDORT
MOVF UC,0
MOVWF PORTB
CALL GECIKME
MOVF DORTb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
YAKUCBES
MOVF UC,0
MOVWF PORTB
CALL GECIKME
MOVF BESb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
YAKUCALTI
MOVF UC,0
MOVWF PORTB
CALL GECIKME
MOVF ALTIb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
YAKDORTDORT
MOVF DORT,0
MOVWF PORTB
CALL GECIKME
MOVF DORTb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
YAKDORTBES
MOVF DORT,0
MOVWF PORTB
CALL GECIKME
MOVF BESb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
YAKDORTALTI
MOVF DORT,0
MOVWF PORTB
CALL GECIKME
MOVF ALTIb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
YAKBESBES
MOVF BES,0
MOVWF PORTB
CALL GECIKME
MOVF BESb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
YAKBESALTI
MOVF BES,0
MOVWF PORTB
CALL GECIKME
MOVF ALTIb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
YAKALTIALTI
MOVF ALTI,0
MOVWF PORTB
CALL GECIKME
MOVF ALTIb,0
MOVWF PORTB
CALL GECIKME
CLRF PORTB
GOTO ANA
 
 
;*****************************************
 
GECIKME
 MOVLW h'FF'
 MOVWF SAYAC1
DONGU1
 MOVLW h'FF'
 MOVWF SAYAC2
DONGU2
 DECFSZ SAYAC2,F
 GOTO DONGU2
 DECFSZ SAYAC1,F
 GOTO DONGU1
 RETURN 
END
bu halini deneseydin neyse
deney setini ödünç vermezler hocam elinize sağlık

Powered by EzPortal