diff options
| author | Astrid Smith | 2010-06-21 14:54:22 -0700 |
|---|---|---|
| committer | Astrid Smith | 2010-06-21 14:54:22 -0700 |
| commit | 7099695e7a62af367be74909e08cba4b367d5b1c (patch) | |
| tree | f0d27a5f6aed6b671724b1944415de37ffc8ef1a /alu.asm | |
| parent | 5728b3249ba24a47b836053584f2b9e9eeab1453 (diff) | |
Parted out F_SUB_B to alu_sub.
Diffstat (limited to 'alu.asm')
| -rw-r--r-- | alu.asm | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -19,3 +19,21 @@ alu_sbc: move.w #$0202,(flag_byte-flag_storage)(a3) pop.l d2 rts + +alu_sub: + ;; SUB instruction + ;; SUB d1,d0 + ;; d1 - d0 -> d1 + ;; sets flags + + ;; XXX use lea and then d(an) if you have a spare register. + ;; preserve operands for flagging + + move.b d0,(f_tmp_src_b-flag_storage)(a3) + move.b d1,(f_tmp_dst_b-flag_storage)(a3) + move.b #1,(f_tmp_byte-flag_storage)(a3) + andi.b #%00000010,(flag_valid-flag_storage)(a3) + move.b #%00000010,(flag_byte-flag_storage)(a3) + sub d0,d1 + move sr,(f_host_sr-flag_storage)(a3) + rts |
