comparison code_part1/OSTC_code_asm_part1/math.asm @ 361:88660a400338 64kByte Logbook

Updated 64K logbook to changeset 360.
author JeanDo
date Wed, 08 Jun 2011 01:37:14 +0200
parents cec312042b94
children 07f5b0baaa57
comparison
equal deleted inserted replaced
357:562f1bc79f3c 361:88660a400338
52 movwf sub_c+0 52 movwf sub_c+0
53 movf sub_b+1, W ; Get the Value to be Subbed 53 movf sub_b+1, W ; Get the Value to be Subbed
54 subwfb sub_a+1, W 54 subwfb sub_a+1, W
55 movwf sub_c+1 55 movwf sub_c+1
56 56
57 btfsc STATUS,C 57 btfss STATUS,N ; Negativ result ?
58 return ; result positve 58 return ; NO: result positive done.
59 59
60 bsf neg_flag ; result negative 60 bsf neg_flag ; MARK result negative
61 61
62 comf sub_c+1 ; 16bit sign change. 62 comf sub_c+1 ; 16bit sign change.
63 negf sub_c+0 63 negf sub_c+0
64 btfsc STATUS,C ; Carry to propagate ? 64 btfsc STATUS,C ; Carry to propagate ?
65 incf sub_c+1,F ; YES: do it. 65 incf sub_c+1,F ; YES: do it.