dc. DO CONV c. Converts chracter, hex, and decimal data. ,c. c. Reads FOR005 for either type of data, and outputs to FOR006 c. all three forms. Xc. c. Prompt == 'ch 0hex integer= c. c. Input == 'char c. 0hex Lc. decmal c. c. program terminates on 0 input xc. c.-end.of.info- @c. c. Feb 02, 1980 -- Mike Liveright -- SCI c. l byte input(10), numch, numbyt 41 format( 132a ) 4c. 100 continue  write(6,41) '$''ch 0hex integer= ' ` read( 5,41, end=900) input c. ( ipos = 1 ibase = 10 isign = 1 T num = input(1) c.  if( input(1).eq.'-' ) then isign = -1 ipos = ipos+1 H endif c.  numch = input(ipos) t if( numch.eq.'0' ) then  ibase = 16 < ipos = 2  else if( numch.eq.'''' ) then  num = input(2) h goto 300  else if( numch.lt.'0' 0 1 .or. (numch.gt.'9' .and. numch.lt.'A')  1 .or. (numch.gt.'F' .and. numch.lt.'a')  1 .or. (numch.gt.'f' ) ) then \ goto 300  endif $c.  num = 0 c. P200 continue  if( input(ipos).eq.' ' ) goto 300  idig = input(ipos)-'0' | if( idig.ge.32 ) idig = idig-32  if( idig.gt.9 ) idig = idig-7 D num = ibase*num+idig  ipos = ipos+1  goto 200 pc. 300 continue 8 if( num.eq.0 ) goto 900 c.  num = isign * num d numch = ' '  if( num.ge.'20'x .and. num .le. '7f'x ) numch = num , numhex = num.and.'0ffff'x  write(6,310) numch, num, num 310 format( ' ''',a,z9,i ) X goto 100 c. 900 continue  end