Switch to full style
PIC Assembly Articles
Post a reply

add sequence of decimal numbers

Sat May 11, 2013 10:43 pm

adds sequence of decimal numbers
Code:
#include <p18F8720.inc>

start movf 0x10
,; add the least significant byte
addwf 0x14
,; “daw ; adjust for valid BCD
movwf 0x20 
; save in the destination
movf 0x11 
; add the second to least significant byte
addwfc 0x15
,; “daw ; “
movwf 0x21 
; “
movf 0x12 
; add the second to most significant byte
addwfc 0x16 
; “daw ; “
movwf 0x22 
; “
movf 0x13 
; add the most significant byte
addwfc 0x17 
; “daw ; “
movwf 0x23 
;
end




Post a reply
  Related Posts  to : add sequence of decimal numbers
 conversion from binary to decimal numbers as string     -  
 Sequence Generator JPA     -  
 solving fibonacci sequence recursively     -  
 Implementing fibonacci sequence problem using iterations     -  
 convert hexadecimal to decimal     -  
 Scale double number using big decimal     -  
 convert binary number to decimal     -  
 add two 24-bit numbers (sum two numbers)     -  
 Invalid unicode sequence error ("u")     -  
 The harmonic mean of two numbers is given by:     -