OK, Daniel. You sucked me in.
x = (y + M) mod 256
where y is the number of bytes and M is the answer to Life, The Universe and Everything (i.e. 42).
Posted by Keith Pitty at February 4, 2004 10:14 AMOh so close but no cigar. Just a Longbeach menthol for the 42 aspect (that was the pleasant suprise).
Hint. I found it easier to express in code.
Posted by DB at February 4, 2004 10:49 AMOops. High school maths was a very long time ago ;) How about:
int x = (int) (y + 42)/256;
Posted by Keith Pitty at February 4, 2004 11:30 AMWell it took me two goes but I got…
int bit6function (int size)
{
return (int) (size + 42)/256;
}
They say I’m little slow, EH?
Now do it in ASM.
And when you're done there, you have to write it to an EPROM using a cigarette lighter and a piece of purple celophane...*THEN* you can go out with my sister.
Anyone else having a slow day? :)