B
buko
Guest
Maaari kahit sino-convert na ito asm Pic 16F84 code at ilagay ito sa C wika.; Binuo sa pamamagitan ng WinPicProg 1.91, (c) Nigel Goodwin 2002.
LIST P = 16F84, F = INHX8M
kasama ang "P16F84.inc"
__CONFIG 0x3FFF
Org 0x0000
MOVLW 0xFA
CALL Label_0001
MOVLW 0x80
CALL Label_0001
CLRF PORTA
ADDLW 0x7F
Opsiyon
MOVLW 0xFF
TRIS PORTB
TRIS PORTA
CLRF 0x20
BSF 0x20, 02
Label_0004 CALL Label_0002
CALL Label_0003
BSF 0x20, 02
BTFSC PORTB, 01
BCF 0x20, 02
Goto Label_0004
Label_0003 MOVWF 0x2A
CLRF 0x2B
COMF 0x2A, f
MOVLW 0x08
MOVWF 0x28
BSF PORTB, 00
MOVLW 0xFE
TRIS PORTB
BCF PORTB, 00
MOVF PORTB, W
RLF 0x2B, f
NOP
NOP
Label_0005 NOP
NOP
ANDLW 0xFE
BTFSC 0x2A, 07
IORLW 0x01
MOVWF PORTB
RLF 0x2A, f
DECFSZ 0x28, f
Goto Label_0005
NOP
NOP
NOP
NOP
NOP
NOP
BSF PORTB, 00
RETURN
Label_0002 MOVLW 0x09
MOVWF 0x28
BTFSC 0x20, 02
Goto Label_0006
Label_0007 BTFSS PORTA, 00
Goto Label_0007
Label_0008 BTFSC PORTA, 00
Goto Label_0008
MOVLW 0x05
CALL Label_0001
Label_0009 MOVLW 0x03
CALL Label_0001
NOP
NOP
BCF KALAGAYAN, C
BTFSS PORTA, 00
BSF KALAGAYAN, C
RLF 0x2A, f
DECFSZ 0x28, f
Goto Label_0009
RRF 0x2A, f
MOVF 0x2A, W
MOVWF 0x30
RETURN
Label_0006 BTFSS PORTA, 00
Goto Label_0006
Label_000A BTFSC PORTA, 00
Goto Label_000A
MOVLW 0x0D
CALL Label_0001
Label_000B MOVLW 0x0A
CALL Label_0001
NOP
NOP
BCF KALAGAYAN, C
BTFSS PORTA, 00
BSF KALAGAYAN, C
RLF 0x2A, f
DECFSZ 0x28, f
Goto Label_000B
RRF 0x2A, f
MOVF 0x2A, W
MOVWF 0x30
RETURN
Label_0001 MOVWF 0x29
Label_000C DECFSZ 0x29, f
Goto Label_000C
RETLW 0x00END
LIST P = 16F84, F = INHX8M
kasama ang "P16F84.inc"
__CONFIG 0x3FFF
Org 0x0000
MOVLW 0xFA
CALL Label_0001
MOVLW 0x80
CALL Label_0001
CLRF PORTA
ADDLW 0x7F
Opsiyon
MOVLW 0xFF
TRIS PORTB
TRIS PORTA
CLRF 0x20
BSF 0x20, 02
Label_0004 CALL Label_0002
CALL Label_0003
BSF 0x20, 02
BTFSC PORTB, 01
BCF 0x20, 02
Goto Label_0004
Label_0003 MOVWF 0x2A
CLRF 0x2B
COMF 0x2A, f
MOVLW 0x08
MOVWF 0x28
BSF PORTB, 00
MOVLW 0xFE
TRIS PORTB
BCF PORTB, 00
MOVF PORTB, W
RLF 0x2B, f
NOP
NOP
Label_0005 NOP
NOP
ANDLW 0xFE
BTFSC 0x2A, 07
IORLW 0x01
MOVWF PORTB
RLF 0x2A, f
DECFSZ 0x28, f
Goto Label_0005
NOP
NOP
NOP
NOP
NOP
NOP
BSF PORTB, 00
RETURN
Label_0002 MOVLW 0x09
MOVWF 0x28
BTFSC 0x20, 02
Goto Label_0006
Label_0007 BTFSS PORTA, 00
Goto Label_0007
Label_0008 BTFSC PORTA, 00
Goto Label_0008
MOVLW 0x05
CALL Label_0001
Label_0009 MOVLW 0x03
CALL Label_0001
NOP
NOP
BCF KALAGAYAN, C
BTFSS PORTA, 00
BSF KALAGAYAN, C
RLF 0x2A, f
DECFSZ 0x28, f
Goto Label_0009
RRF 0x2A, f
MOVF 0x2A, W
MOVWF 0x30
RETURN
Label_0006 BTFSS PORTA, 00
Goto Label_0006
Label_000A BTFSC PORTA, 00
Goto Label_000A
MOVLW 0x0D
CALL Label_0001
Label_000B MOVLW 0x0A
CALL Label_0001
NOP
NOP
BCF KALAGAYAN, C
BTFSS PORTA, 00
BSF KALAGAYAN, C
RLF 0x2A, f
DECFSZ 0x28, f
Goto Label_000B
RRF 0x2A, f
MOVF 0x2A, W
MOVWF 0x30
RETURN
Label_0001 MOVWF 0x29
Label_000C DECFSZ 0x29, f
Goto Label_000C
RETLW 0x00END