>> You naughty _naughty_ programmer! That's not at all in the spirit of
>> the competition!
>> (Wish I'd thought of it.)
>
>shhhhhhhhhh! Now they'll try to plug up the look up table loophole.
>
>Y'know, if the rules don't SAY what it has to be, ...
The rules don't say you can't... but you do have to account for all
memory used, for code and data...
I've coded a version for pdp-11s, but since I have yet to test it
(though of course it will work first time :-) I'm not going to
post it yet...
It takes up 62 words (132 bytes), uses 4 words on stack and 9 words
of pure data space... when I've actually gotten a chance to try it,
I'll be able to report how many instructions it takes to do the
conversions (I suspect '1' is minimum and 3888 is maximum). I don't
know how to check on number of cycles, though...
The algorithm is pretty straightforward... converting to Roman is
the same as converting to decimal except that once you have the digit
for a given power-of-ten place, you convert *that*...
I wrote it before looking at the code which was posted, and I suspect
the algorithm is similar with the exception that I don't have a lookup
table for the digits...
Megan Gentry
Former RT-11 Developer
+--------------------------------+-------------------------------------+
| Megan Gentry, EMT/B, PP-ASEL | Internet (work): gentry!zk3.dec.com |
| Unix Support Engineering Group | (home): mbg!world.std.com |
| Compaq Computer Corporation | addresses need '_at_' in place of '!' |
| 110 Spitbrook Rd. ZK03-2/T43 | URL:
http://world.std.com/~mbg/ |
| Nashua, NH 03062 | "pdp-11 programmer - some assembler |
| (603) 884 1055 | required." - mbg |
+--------------------------------+-------------------------------------+
Received on Mon Apr 19 1999 - 15:26:42 BST