diff options
| author | Duncan Smith | 2010-06-18 17:14:39 -0700 |
|---|---|---|
| committer | Duncan Smith | 2010-06-18 17:14:39 -0700 |
| commit | 998e8e05e0f738068d2c24b16f583a5e67ec0f8d (patch) | |
| tree | 761f9e5eb21e0b829655634c0287f493fb78b6d8 /flags.asm | |
| parent | 76fbf127f30950e247dc41acbec0b911bef1e8e8 (diff) | |
Added parity-calculation routine
Diffstat (limited to 'flags.asm')
| -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 |
