Re: A83: Unsquish joke


[Prev][Next][Index][Thread]

Re: A83: Unsquish joke




[prgmZPUREASM] "xyzxyz"            ;ascii 78797a78797a

now you add 1*size bytes

[prgmZPUREASM] "xyzxyz??????"

you redistribute the bytes (one step at a time:) the uppercase letters are
ofcourse actually lowercase, but here they indicate what byte you read & what
byte you write.

[prgmZPUREASM] "xyzxyZ????Z?"
[prgmZPUREASM] "xyzxYz??Y?z?"
[prgmZPUREASM] "xyzXyzX?y?z?"
[prgmZPUREASM] "xyZxZzx?y?z?"
[prgmZPUREASM] "xYYxzzx?y?z?"
[prgmZPUREASM] "Xyyxzzx?y?z?"

Now you just read one byte, overwrite it and the following byte, and move
ahead two bytes.

[prgmZPUREASM] "78yxzzx?y?z?"          ;'x'
[prgmZPUREASM] "7879zzx?y?z?"          ;'y'
[prgmZPUREASM] "78797ax?y?z?"          ;'z'
[prgmZPUREASM] "78797a78y?z?"          ;'x'
[prgmZPUREASM] "78797a7879z?"          ;'y'
[prgmZPUREASM] "78797a78797a"          ;'z'

and you're done!

Linus
                                                           \\//
                                                          [o][O]
.-->                                           .-------mm--(__)--mm--------.
| Linus Akesson                                | http://fly.to/linus.world |
`---------------^-- ----- --- --  -- -  -   -  `---------ooO--Ooo----------'
                     Puns are bad, but poetry is verse.


On 06-Mar-99, Scott Dial (homosapian@geocities.com) wrote:

>Good idea... but, how would you get the put together afterwards???

>Example:
>[PGRM ASC] 123
>           * * *
>[PRGM HEX] 1A2B3C
>            * * *
>[BUFFER]   ABC

>But how would I peice them together? I would need 2*Size still unless I
>shifted all the memory down one byte every other byte?

>Linus Akesson wrote:
>> 
>> On 05-Mar-99, Scott Dial (homosapian@geocities.com) wrote:
>> 
>> >Yeah, I did that, but I didn't think that having to have space for
>> >2*size was very practical.
>> 
>> Ok, then allocate 1*size bytes at the end, distribute the bytes over the
>> whole area, writing to every other byte. (Start from the end and go towards
>> the first byte.) Then you can unsquish one byte at a time.
>> 
>> Linus
>>                                                            \\//
>>                                                           [o][O]
>> .-->                                          
.-------mm--(__)--mm--------.
>> | Linus Akesson                                | http://fly.to/linus.world
|
>> `---------------^-- ----- --- --  -- -  -   - 
`---------ooO--Ooo----------'
>>              Fer sail cheep, Windows spel chekcer, wurks grate

>-- 
>Scott "_Wrath_" Dial
>homosapian@geocities.com
>ICQ#3608935
>http://www.geocities.com/~homosapian/
>________________________________________________________
>NetZero - We believe in a FREE Internet.  Shouldn't you?
>Get your FREE Internet Access and Email at
>http://www.netzero.net/download.html





Follow-Ups: References: