/* Bit manipulation routines for the Versaplot library */ /* Written by Gordon Hughes for Lattice Logic Limited */ /* October 1986 for VAX/ULTRIX */ iram_ (iword, kount, mask) int *iword, *kount, *mask; { /* if (count != 0) { */ /* if (count > 0 ) { */ /* NB: should be a rorl instruction */ /* word = word >> count; */ /* } else { */ /* count = - count; */ /* NB: should be a roll instruction */ /* word = word << count; */ /* } */ /* } */ /* Following code from VAX/VMS lib */ asm (" mnegl *8(ap),r1"); asm (" rotl r1,*4(ap),r0"); asm (" mcoml *12(ap),r1"); asm (" bicl2 r1,r0"); asm (" ret"); }