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

Re: New XYENC 1/13/09 release



Wally wrote:
>1. Why are underlines used instead of spaces?

A basic rule of the XYDEC program is that you can add whitespace (blanks,
tabs, CRLFs) willy-nilly to its XYENC encoded input file without affecting
the decode back to the original. The XYENC encoder doesn't itself actually
add whitespace, but the provision for allowing whitespace is what allows
the user to do so, and allows for XPL programs like QDF1.PM to do so, to
"format" the material and make it more readable, if and when that is
desired.

Ah, I see.
, so XYDEC must preserve exactly those blanks THAT WERE IN THE
ORIGINAL.

Yes.
>2. Why is ;*; encoded to something other than ;*; and,
>given that it is encoded, why to: ',*','^

Well firstly, you should understand that XYENC doesn't "understand" and
encode sequences like ";*;" -- it only encodes individual characters. So
it doesn't encode "the sequence" at all.

Okay.

in order to get the 3 byte version back during decode, XYENC has to
"mark" the characters in the encoded file that were originally 3 byte
encodings. This allows XYDEC to convert them back to 3 byte encodings
during decode.

Understood.

So XYENC has to translate "real" ":" and ";" input characters to
something
else.

Right. And thanks for the other (snipped) explanations. I follow you.
>3. Encoding U2 routines went flawlessly. But when I try to
>encode something very simple, I get a lot of apparent
>garbage in the .ENC file produced. E.g., this:

> 

> gave this:

> '01-20-2009 22:09:04
> ~~~Z~GH~209...
> '01-20-2009 22:09:04
> ~~~Z~GH~209~224~254~014~139~_~163~203Y~142
> ~F~159~X3~219~137~^6Y~232~128~@X~162~139~_~195~247~F~215
> ~M~F~@u~U~161~209~M',~F4Yu~M~142~F~159~X~198~F~156~K~A
> ~232~E~@~195~232x .......

In the encoding you provided, the first line is a time stamp, and is not
interesting to what we are discussiong. So I'll ignore that.

I don't know what tool was used to create the file that ostensibly
contained the "", but it appears that whatever tool it was
left a lot of garbage in the file, following the EOF mark. There are
programs which do that -- in fact, your XYCOMP program is one of them.

The tool I used was XyWrite 4.018
I had set Default 1A to = 1. Let me see if that changes things. No, as I suspected that only affects reading of files, not what gets stored.
The ~Z about 16 chracters into the second line shows where there was an
EOF (end-of-file, or "Ctrl-Z") mark in the original file after the
"", as one might expect. But it would appear that the file
didn't stop there. Whatever program your were using to create the file
containing "" apparently leaves (lotsa) garbage following the
EOF marker.
So I see, but why? I was running XYENC under Xywrite but I get the same
results by running it from an independent DOS prompt.

Am I using XYENC wrong? Here's what I do:
1. Create a test file (such as ) in Xy, naming it T (for "test).
2. Either shelling out from Xy, or at an independent DOS prompt, I do:

XYENC T T.ENC

then, in XyWrite (or whatever) I look at the produced file T.ENC.
So it may not be immediately apparent when
junk is even there. Which I presume is why you didn't see that there was
junk there, even though (I believe) there was junk there.
Not that LIST.COM or Notepad shows. Also, the DOS DIR of the file T shows
it as 15 bytes. But T.ENC is 65549 bytes.
Here's a listing of what apparently followed the  in your
source file.

Thanks, but I read too little Assembler (in only Z80 Assembler at that).


Harry Binswanger
hb@xxxxxxxx