Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

(jcwren) RE: YES! I do

by jcwren (Prior)
on Oct 29, 2000 at 08:12 UTC ( #38969=note: print w/replies, xml ) Need Help??


in reply to YES! I do
in thread Obfuscate my perl code

I can't vouch for the accuracy of Mel in the aforementioned story, but I can tell you that drum tuning was a *very* common practice. Other than Mel getting the sense switch backwards, all the tuning information is probable.

There are a couple of machines that have some really cool instructions. The old Data General Nova systems had an indexed fetch instruction that if the high bit was set, would use the contents of the fetched data as another index. If the high bit was set, this would repeat. It made finding the end of a linked list pretty trivial. It could also make a pretty effective endless loop. With the Nova 1200 system we... acquired... we taught it to play the "Daisy, Daisy, Give me your answer true" melody by tuning loops that made the core memory planes "sing". If I run across my 8K x 16 core memory plane, I'll take a picture and post it. Hand woven by oriental women.

Another interesting instruction was on the Control Data Corporation Cyber systems. At the request of the Atomic Energy Comission, an instruction was added that would return the number of bits set it a word (these were 60 bit words). This was used in some nuclear bomb simulation calcuations.

One free ++ to anyone who figures out what this code does, and explains why:
and al,00fh add al,090h daa adc al,040h daa
The actual instruction set is irrelevant, but that's x86 code.

--Chris

e-mail jcwren

Replies are listed 'Best First'.
RE: (2) YES! I do ($jcwren eq "old fart")
by ybiC (Prior) on Oct 29, 2000 at 18:46 UTC
    <big dopey grin>
    jcwren - you've saved us'all the hassle of core samples, ring counting and carbon-dating.   You must be older than me or even gasp merlyn.
    </big dopey grin>

    I'll admit to doing a bit of 8080a assm 100 years ago in college, but those synapses have looong since been flushed.   So no guesses from /me.
        cheers,
        Don
        striving for Perl Adept

RE: (jcwren) RE: YES! I do
by AgentM (Curate) on Oct 29, 2000 at 09:19 UTC
    i was always one for a challenge:

    perhaps this is a newbie asm question but I always thought al/ah were 8 bit registers- is this my old asm experience talking? could it be the "new" intel "standards". hmmmmm....well, I've seen stranger Mac asm, so, for the challenge, I'll assume 24 bit registers, I guess....

    I just followed my thoughts through- here they are:

    • and al,00fh: sets first 16 bits of al to 0, last 8 bits are left as they were
    • add al,090h: adds one gross (144=9*16) to al, which makes al now 09x where x is from the original set
    • daa: decimal adjust after addition: changes al to a packed decimal number stored in hex- results in 90+x as decimal packed into hex
    • adc al,040h: adds dest to src and carry flag, too: (90h+xh)+40h
    • daa: like (90+40)+x=130+x packed BCD

    hmmm, can this be right? probably not, oh well. I find it amusing that CISC processing leads to infinite obfuscation- much more than perl could ever achieve. (www.assemblymonks.org?)

    /me decides that perl is better than assembly.

    AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.
RE: (jcwren) RE: YES! I do
by extremely (Priest) on Oct 30, 2000 at 04:57 UTC
    You gots ta be an old dog to remember shitty hex dump hacks like that one... (oh god I'm getting old...) Its nice if you need it real small, otherwise you'd be better off with a nice lookup table, 300ish or 700+ bytes saved was a big win in the 64KB days....

    --
    $you = new YOU;
    honk() if $you->love(perl)

RE: (jcwren) RE: YES! I do
by Nitsuj (Hermit) on Oct 30, 2000 at 15:16 UTC
    There was a PDP11 instruction that copied it's own code (yeah, there are a lot of processors with this instruction). Anyways, they cut HUGE amounts of code in the Personal Rapid Transit Project using this instruction (as I alluded to in my other post, but they did some other crazy stuff too)!

    Just Another Perl Backpacker

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://38969]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2022-06-29 07:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (96 votes). Check out past polls.

    Notices?