Path: ...!news.misty.com!goblin2!goblin1!goblin.stu.neva.ru!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Snit Newsgroups: alt.computer.workshop Subject: AZ Code Date: Thu, 27 Feb 2020 10:15:02 -0700 Lines: 89 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net S4DNjxKuhks/PXBg4i31YgdVK0ZPDcJov35eZP9Y6lB3fVTj6G Cancel-Lock: sha1:8faNRrMg7PqwuousiMP/Fb3kSgY= X-Mozilla-News-Host: news://news.individual.net:119 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 Content-Language: en-US Bytes: 4461 OK, looking at the encoding provided by Diesel... seems odd. Could be my lack of understanding in places, but clearly he also has some areas of confusion. ----- ENCODING IN THE AZ FORMAT EXPLAINED: Step 1. Determine the ASCII value of the character we intend to encode ----- Presumably this is just the first character. Then the second. Then the third. Until we get to the end. In simple language: • Repeat with theCharacter from 1 to count of characters in theText Maybe it is count -1 since he seems to look at two characters at a time (though he never really says that). But so far so good. ----- Step 2. Set A1 and A2 variables at the ascii value for A (On the IBM platform that value is 65) Set counter to 0. ----- This is odd. Why not just set A1 and A2 to 65 given how that is ALWAYS the ASCII value of "A". This is true not only of 7 bit ASCII, but also 8 bit (extended) ASCII. So to use our simple language it is just: • Set A1 to 65 • Set A2 to 65 • Set Counter to 0 So far so good. Ish. Why not just say that? ----- Step 3. Check to see if counter is equal to the ascii value obtained in Step 1. if so, convert A1 and A2, each to a character. Combine them in reverse order, as in A2 A1. This is our 2 byte encoded "AZ" format. Write this to the output file and return to Step 1. If the counter and the ascii value do not match, add 1 to A1. If A1 goes past the ascii value for Z (which is 90 on IBM), reset it to A (65 on IBM) and add 1 to A2. Add 1 to the counter and repeat Step 3. ------ This is where things get weird, at least to me. The Counter is set to the ASCII value of A, and then in the next round to the value of B. But with the A1 and A2 he is just rotating them 1 (similar to what I said with ROT-13 but only one character). And he has the wrap-around... so "A" becomes "B", "B" becomes "C".... "Z" becomes "A". But he has no such wrap around described for the counter... so after the first 26 additions to the Counter the value of Counter goes past the values of A-Z and would never match the ASCII value of a character. Seems the counter would have to be reset. And having the counter and comparing it to the value really adds very little except the occasional "bumping" of a character to rotate more than once. Oh, and does he ever say to look at the next character? He again talks about the ASCII value on "IBM", as if a "American Standard Code for Information Interchange" would be different on different systems when it is, by definition, a "standard". Seems amazingly odd a programmer would not know this... not putting Diesel down here but I am curious as to what he was thinking when he wrote that! Anyway, seems the counter needs to go back to the value of "A" (65) but he never says that. Again, maybe I am missing something. Diesel, can you explain? ----- As you can see, the AZ format is really not that hard to code for other programs such as OffLine Mail Readers and the like. ----- At least from what I can tell, and I might be wrong, you did not describe it correctly. -- Personal attacks from those who troll show their own insecurity. They cannot use reason to show the message to be wrong so they try to feel somehow superior by attacking the messenger. They cling to their attacks and ignore the message time and time again.