1*29602Ssam /* Acvtlb.c 1.1 86/07/20 */ 2*29602Ssam 3*29602Ssam 4*29602Ssam #include "../tahoealign/align.h" 5*29602Ssam cvtlb(infop) process_info *infop; 6*29602Ssam /* 7*29602Ssam /* Convert long to byte, checks overflow 8*29602Ssam /* 9*29602Ssam /****************************************/ 10*29602Ssam { 11*29602Ssam register long result; 12*29602Ssam 13*29602Ssam result = operand(infop,0)->data; 14*29602Ssam if (result < 0 ) negative_1 ; else negative_0; 15*29602Ssam if (result == 0 ) zero_1 ; else zero_0; 16*29602Ssam carry_1; 17*29602Ssam if (result > 0x7f || result <= -0x80) overflow_1; 18*29602Ssam else overflow_0; 19*29602Ssam write_back (infop, result, operand(infop,1) ); 20*29602Ssam } 21