/******************************************
* (C)Copyright by N.T.T 1993(unpublished) *
* All rights are reserved.                *
******************************************/
%i "../int_h/alu_8.h"
module alu8 {
    input       a<8> ;
    input       b<8> ;
    output      out<8> ;
    output      ov ;
    output      z ;
    alu_8      alu8 ;
    instrin     add ;
    instrin     sub ;
    instrin     and ;
    instrin     or ;
    instrin     xor ;
    instruct add par {
        out = alu8.do(0b1,0b0,0b0,0b0,0b1,0b0,a,b).out ;
        ov = alu8.ovf ;
    }
    instruct sub par {
        out = alu8.do(0b1,0b1,0b0,0b0,0b1,0b1,a,b).out ;
        ov = alu8.ovf ;
        z = alu8.eq ;
    }
    instruct and out = alu8.do(0b0,0b0,0b1,0b0,0b0,0b0,a,b).out ;
    instruct or out = alu8.do(0b0,0b0,0b0,0b1,0b0,0b0,a,b).out ;
    instruct xor out = alu8.do(0b0,0b0,0b0,0b0,0b1,0b0,a,b).out ;
}
