diff options
| author | Astrid Smith | 2010-06-18 17:14:39 -0700 |
|---|---|---|
| committer | Astrid Smith | 2010-06-18 17:14:39 -0700 |
| commit | 96eb653b3114d2682cf6645ae3279b34f424d680 (patch) | |
| tree | 63f90f417e6772c16b057e2c787279ca42684b24 | |
| parent | 2bf3a98e76b633b1274360a21ce7c49ae9719b2b (diff) | |
Added parity-calculation routine
| -rw-r--r-- | flags.asm | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -85,6 +85,18 @@ FNPV_ok: andi.b #%00000100,d1 rts + ;; Calculate the P/V bit as Parity, for the byte in + ;; d1. Destroys d0,d1. +f_calc_parity: + andi.w #$ff,d1 + move.b lut_parity(pc,d1),d1 + move.w flag_byte(pc),d0 + and.b #%11110111,d0 + or.w #%0000100000000000,d0 + or.b d1,d0 + move.w d0,flag_byte-flag_storage(a3) + rts + ;; Normalize and return Sign bit (loaded into Z bit). ;; Destroys d1 f_norm_sign: @@ -126,10 +138,8 @@ f_tmp_src_w: dc.w 0 f_tmp_dst_w: dc.w 0 f_tmp_result_w: dc.w 0 -flag_n: dc.w 0 - ;; 000XNZVC - EVEN ; Compositing a word from two bytes ... + EVEN ; Compositing a word from two bytes f_host_sr: dc.b 0 f_host_ccr: dc.b 0 |
