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

Re: XYENC/XYDEC programs - and a curiosity



Reply to note from wbass@xxxxxxxx Thu, 8 Jan 2009 00:01:15 -0700 (MST)

Wally:

This morning I wrote:
> I've taken your comments on the U2 frame. The revision below
> deletes the EOF char from input, and feeds stdin to XYENC.COM
> to bypass the date stamp.

Hmmm, well, it didn't take long to realize that the COPY/A method to
remove the EOF will *not* work across the board. In particular, it
doesn't work in the situation you alluded to earlier today:

> I'm really rather surprised at being able to introduce an EOF
> char in the middle of a S/G string this way, I must admit.

Yes, indeed, you can. In fact, if you want to get a lone 1Ah into a
S/G, you've got to start with a 3-byte char that contains 1A, for
example, a non-standard func @D -- one with 1A in the third byte,
instead of the usual 1B. Here's a routine that uses @D to parse 1A
into a S/G, and then, by way of verification, displays it on the
PRompt line (this code works in XyWrite 3 and 4):

~~~
~~>~~
~~'NO~>
~+~+~+~+~~>
~~'^

If you try to decode that with this morning's version of frame
XYENC*,XYDEC*, you'll see that it bombs. Robert has written a utility,
ZapEOF.EXE, that removes the terminal 1A from any file, including
binaries, which would be ideal here, but he hasn't gone public with
it, yet. However, since we're only concerned with the terminal 1A on
the ENCode side, another way to do it is simply to delete the terminal
"ÿ7EZ" in XyWrite, after the encoding is done. The following works; I
used it to encode the parsing routine above.

{{5xyenc*,xydec*}}_XYENCode|XYDECode_a_DF_block_
[CLD_rev.1/8/09-a]'^
~B~==1~>',*','^
'BXes_1'Q2'DX'DZ~~>',*','^
~>0~>',*','^
~~>'JM2.GetPath'Q2',*','^
~+"\"+~+"."~>',*','^
'DE'BXsad/nv_~in'Q2'BXwait'Q2',*','^
'BXernv_~out'Q2'BXwait'Q2',*','^
'BXdos/nv/x/z_/c_~com_._~out<~in'Q2',*','^
'BXwait'Q2',*','^
~~'BXexist_~out'Q2',*','^
~)~>~',*','^
~',*','^
'BXp'Q2~'GT:~M'DO'FF'DX~~>',*','^
'BXme_~out'Q2'BXwait'Q2',*','^
'BXernv_~out'Q2'BXwait'Q2',*','^
~)~="ENC"~>',*','^
~',*','^
~>0&~<>8~>'TG~',*','^
~',*','^
~~>'BXseba__'?Z'Q2',*','^
~)&~==~-2~>'RC'RC~',*','^
~',*','^
~',*','^
:~M~~>'JM2.ReJuMP'Q2',*','^
'DO'FF~~'^
~'YD~~'^
~~~B'^
'^

> This is, of course, is all XyWrite III+. I'd be curious if you
> get the same results with XyWrite IV.

All true in Xy4 as well.

--
Carl Distefano
cld@xxxxxxxx