/* REXX -- HEXSHOW show as characters hex notation presented */ /* The primary purpose of HEXSHOW is to show characters */ /* corresponding to the HEX notation present in EDIT */ /*********************************************************************/ /* HEXSHOW Author: David McRitchie, created 1990/12/09 IS03 */ /* at "The REXX Macros Toolbox", DMcRitchie@hotmail.com */ /* Updated 1990/12/10 14:23 IS03, later updated to 72 col. */ /* Updated 1992/03/16 14:30 IS03 added missing comma */ /* Updated 1993/12/29 14:25 IS03 handle quote x'7D' in data*/ /*********************************************************************/ address "ISREDIT" "MACRO (TOK1)" NOTELINE = "INFOLINE" IF TOK1 = "DATALINE" THEN do;"CAPS OFF";NOTELINE="DATALINE";END; IF TOK1 = "DATALINE" THEN NOTELINE="DATALINE";ELSE NOTELINE="NOTELINE" "locate 0" notes = " -- HEXSHOW show all available hex notatation in char form" "LINE_BEFORE .ZFIRST = "||NOTELINE||" '"||TIME('N')||" -- HEXSHOW" , || " DISPLAY CHARACTER VALUES of NX lines'" "LINE_BEFORE .ZFIRST = "||NOTELINE||" ' designed for viewing zaps'" C256 = XRANGE('00'X,'FF'X); NX256 = TRANSLATE(C256,' ','0123456789ABCDEF'); /*NX256 all but hex*/ /* --- ONLYHEX = TRANSLATE(stringxx,' ',NX256) */ VAR036 = "VER 0123 C4C1,E5C9,C440 DAVID McRitchie F1F2F3F4 C4C1E5CC4" "f first p'=' 1 nx" test = 0 /* remove all test material(s) once we know it works*/ pRC = RC do while pRC = 0; pRC = 1 "(VAR036) = LINE .ZCSR" HOLDs = " "||VAR036|| " "; /*so that 1st col and last col can work*/ HOLDs = substr(HOLDs,1,80); HOLDs = TRANSLATE(HOLDs,' ',NX256); /*only hex digits for search*/ holdN = TRANSLATE(' '||VAR036||' ',' ',,' '); /*future noteline*/ i=1; /*initialize while variable to non-zero*/ do while (i \=0) i=verify(HOLDs,' '); if i \= 0 then , if substr(HOLDs,i+1,1) \= ' ' then do x2 = substr(HOLDs,i,2); jj=verify(x2,'ABCDEF0123456789') if jj \= 0 then x1 = ' ' else x1 = x2c(x2) xx = c2x(x1) tempN = substr(holdN,1,i-1)||' '||x1 || substr(holdN,I+2) holdN = tempN tempS = substr(HOLDs,1,i-1) || ' '||substr(HOLDs,i+2) HOLDs = tempS end else do tempS = substr(HOLDs,1,i-1)||' '||substr(HOLDs,i+1) HOLDs = tempS end i=verify(HOLDs,' '); end if length(HOLDs) > 72 then HOLDs = substr(HOLDs,1,72) notex = substr(holdN,2,length(HOLDs)) note = "ISREDIT LINE_BEFORE .ZCSR = "||INFOLINE "(NOTEX)" jj = verify(holdN,' ') if jj \= 0 then note "find next nx '='p 1" pRC = RC end