Hi everyone.I m a newbie in Assembly language. I m now trying to write a PIC16F873a program that calculate the number in fibonnaci array. I have aldready set up the code put the results come out didnt
like i thought. Here is my code:

Temp EQU 0x20
F1 EQU 0x21
F2 EQU 0x22
Result EQU 0x23

ORG 0x00
nop
goto main

ORG 0x08

main NOP
CLRF F1
CLRF F2
CLRF Temp
CLRF Result
CLRW

MOVLW 0x01
MOVWF F1

MOVLW 0xFF
MOVWF F2

MOVLW 0x04
MOVWF Temp
CLRW

Loop NOP
MOVF F1,0
ADDLW F2
MOVWF F1
SUBWF F2,1

MOVWF Result

GOTO Process

Process
DECFSZ Temp
GOTO Loop
GOTO Done

Done
END

Could anyone who good at this aspect show me my error.Thank a lot.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.