Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/math.asm @ 577:e3ffc6d62a63
minor clean
author | heinrichsweikamp |
---|---|
date | Sun, 22 Apr 2012 21:32:04 +0200 |
parents | 44e9b961f156 |
children | c50296c3059e |
comparison
equal
deleted
inserted
replaced
576:ab2686087bce | 577:e3ffc6d62a63 |
---|---|
40 bcf STATUS,C | 40 bcf STATUS,C |
41 rrcf divA+1 | 41 rrcf divA+1 |
42 rrcf divA | 42 rrcf divA |
43 decfsz divB | 43 decfsz divB |
44 bra div16 | 44 bra div16 |
45 return | |
46 | |
47 sub32: ;xC:4=xC:4-sub_c:4 (Warning: sub_c+3 trashes sub_a+0!) | |
48 movf sub_c+0, W | |
49 subwf xC+0, F | |
50 | |
51 movf sub_c+1, W | |
52 BTFSS STATUS, C | |
53 incfsz sub_c+1, W | |
54 subwf xC+1, F | |
55 | |
56 movf sub_c+2, W | |
57 BTFSS STATUS, C | |
58 incfsz sub_c+2, W | |
59 subwf xC+2, F | |
60 | |
61 movf sub_c+3, W | |
62 BTFSS STATUS, C | |
63 incfsz sub_c+3, W | |
64 subwf xC+3, F | |
65 return | 45 return |
66 | 46 |
67 sub16: ; sub_c = sub_a - sub_b (with signed values) | 47 sub16: ; sub_c = sub_a - sub_b (with signed values) |
68 bcf neg_flag | 48 bcf neg_flag |
69 movf sub_b+0, W ; Get Value to be subtracted | 49 movf sub_b+0, W ; Get Value to be subtracted |