Thu May 09, 2013 10:17 pm
eeritual macro ; macro name is eeritual
movlw 0x55 ; instruction 1
movwf EECON2 ; instruction 2
movlw 0xAA ; instruction 3
movwf EECON2 ; instruction 4
endm
eeritual ; this macro call causes the
; assembler to insert
; instruction 1 … instruction 4
sum_of_3 macro arg1, arg2, arg3 ; WREG <- [arg1]+[arg2]+[arg3]
movf arg1,W,A
addwf arg2,W,A
addwf arg3,W,A
endm
sum_of_3 0x01, 0x02, 0x03 ; WREG <- [0x01] + [0x02] + [0x03]
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.