[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

CAlling a Binary File



CAlling a binary file in XyWrite is a big no-no. If you inadvertently
SAve it, the file is toast. Even if you REad instead of CAll, the
screen will often be skew-whiff (as Patricia liked to say) due to the
likely presence of control characters that were never meant to be
displayed in XyWrite. The on-screen result is a volatile, chaotic
mess. Still, if you're like me, you'll try to do it anyway.

Enter a new U2 routine, CAB, for CAll Binary file. CAB creates a
faithful yet inert rendition of any binary file for review in
XyWrite 4 or Nota Bene for Windows. It uses XYENC.COM's "B" option to
bypass encoding of most low- and high-order Ascii characters, with
further "cooking" of the encoded output. The original file is not
changed and stays out of harm's way. CAB works with any binary format
(.EXE, .COM, .PDF, .ZIP, .MSI, etc., etc.); it does a good job of
rendering the text portions of Word (.DOC) files (once you scroll
past the initial garbage).

Usage:
 CAB [d:\path\]binary_filename
or:
With cursor on filename in directory listing:
 CAB
XYENC.COM must be present in the directory that contains EDITOR.EXE.

CAB has been added to the XYENC.ZIP package, which can be downloaded
at http://users.datarealm.com/xywwweb/xyenc.zip.

Here is frame CAB. XYDECode it, DeFine it, and issue ADD2U2
to add it to U2.

'%--_XYENCode_start--
{{5cab}}_CAll_Binary_file_(safely_displayed_in_modified_XYENCo
de_format,_read-only)_[CLD_rev.2/6/13]'^~B~>0~>~>1&~<1~>~~>~~
>0~>'BXexist_~'Q2~)~>'BXes_1'Q2'DX~~~>~~>'JM2.GetPath'Q2~++"\BINARY.LST"~>'BXernv_~'Q2'BXwait'Q2'BXdos/
nv/x/z_/c_~\XYENC.COM_~_~_B'Q2~~<
LBa~>'BXexist_~'Q2~&~<3~>~
+1~>~'BXp'Q2~~~~>~~~~~>'BXfunc_#~<
PV03~>'Q2'BXca/100_~'Q2',*','^'DL~'DN~
~~~~+"__["+~+"]'^Legend'._""'?@""=Ascii-0__""
'?Z""=Ascii-26__""'?ddd""=Ascii-ddd'^"~>~~~~~+"-"~>~~:~M',*','^
',*',_Restore_blanks_and_CrLf'`s'^'BXch_"'-"_"'Q2'BXwait'Q2'BX
ch_"'`^";~["'Q2'BXwait'Q2',*','^',*',_Restore_low-order_Ascii_
1-25,27-31'^~~~~~~+"B"+~+"C~C
D~DE~EF~FG~GH~HI~IJ~JK~KL~LM~MN~NO~OP~PQ~QR~RS~ST~TU~UV~VW~WX~X
Y~Y[~[\~\]~]'-~^^~_"~>~~~>0~>~~~~~>
'BXch__'?~_~'Q2'BXwait'Q2~~',*','^'BX
sa'Q2'BXwait'Q2'BXab/nv'Q2~>0~>'BXfunc_#~'Q2
~'BXre/100_~'Q2~
~~~~~~>~
+"_"+~~>~~~~>~~~~B'^'^
'%--_XYENCode___end--

--
Carl Distefano
cld@xxxxxxxx