subroutine setpar(cha,mode) byte table(0:127) include 'vth.inc' logical*1 temp integer*2 mode byte cha common /dummy/ table ! ! this routine receives a character and returns ! it with its parity bit set properly, according ! to mode ! temp = table(cha) .eq. 1 cha = cha .and. '7f'x if (mode .eq. none) return if (mode .eq. ones) temp = .true. if (mode .eq. even) temp = .not. temp if (temp) cha = cha .or. '80'x return end block data common /dummy/ table byte table(0:127) data table / * 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0, * 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1, * 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1, * 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0, * 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1, * 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0, * 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0, * 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1/ end