brad@looking.UUCP (Brad Templeton) (11/10/84)
I was asked for a good programming problem to see what processor has the tightest code. We held such a test around here once, and I'll describe it and see who on the net wants to give it a try for their favourite microprocessor. PROBLEM: Write an assembler subroutine that prints small roman numerals. To be specific, the routine must take a roman numeral from 0-255 in the accumulator, and print it. Zero should result in the null string. Assume you have a routine called PRINT you can do a proper subroutine call to which prints the ascii character in the accumulator and alters no registers or flags. Make no assumptions about the code location or the location of internal data tables within the code - ie. don't try and say your code runs in zero-page or other such tricks. Execution time is not really important, but it shouldn't be grossly out of line. If you want to include the worst case execution time for your routine, you are encouraged to do so. Output may be in either case, but must all be in the same case. Your routine must enter and exit like a normal subroutine (ie. use the RTS or equivalent instruction) Mostly we want to see the results for small chips like 6502, z-80, 6800, 6809 and others. We wouldn't mind looking at results from larger chips like 8086, 68000, z-8000 or vax, but they would be a seperate contest. Next week, I will announce the size (I already know) of the best routine we have come up with so far. After that, I'll post the code. -- Brad Templeton, Looking Glass Software Ltd. - Waterloo, Ontario 519/884-7473