|wickensonline.co.uk Retrochallenge 2009 Summer Challenge Entry Conclusions|
Well, I haven't had time to make any final modifications, so my program is as it
stands now. You can view it in text mode or as a colourized pdf (courtesy
of the assembly-macro32 mode I wrote for jEdit. I knew it would come in handy
at some point!)
I thought I'd like programming in Macro-32 and this challenge has proven me
right. It reminds me of when I made the transition from C to Java. Java
surprised me because for the most part when I wrote a program and compiled it
the program worked first time. The highly-orthogonal nature of Macro-32 means
that most of the time my code assembled first time. Sometimes I got the wrong
addressing mode, but I never got an 'addressing mode not supported' problem. The
operation names seemed to be fairly intuitive after a while aswell.
The hardest problem I had to overcome was the comparitive lack of example
programs written in Macro-32. One google search I made brought up my website in
the first page of matches - I guess that's when you know you're going to be
largely on your own. The two examples I did use were the one on the '99 bottles
of beer' website (highly recommended viewing) and Jim Duff's excellent
website which contains numerous code examples for OpenVMS, a couple of which
are in Macro-32. I struggled to find any code examples for definining a
multi-parameter procedure. I got there in the end by figuring it out. Thanks
should also go to the Hoff who is the fount of all OpenVMS-related knowledge
and provided intelligent answers via IRC to my arcane VAX macro questions.
The following code is worth a mention:
; Convert long to string
; R2 contains long value to convert
; R3 contains number of digits in output
; R4 contains address to store leading separate numeric value
CVTLS: CVTLP R2,LONG_SIZE,PKD
The two instructions highlighted in bold convert a binary long value to a string
representation. This is a good example of the power of VAX Macro-32. The first
instruction, CVTLP converts a binary long into a packed decimal representation.
The second instruction CVTPS takes that packed decimal value and converts it to
a 'leading separate numeric' format which is a signed integer value in ASCII,
such as +1234 or -9876. This is pretty high level stuff for assembly language!
The VAX has once again performed flawlessly. Big thanks to the other competitors
for providing entertaining blogs.
1. One of my original ideas was to include terminal-based output to provide a
fast zooming display of the fractal (obviously at fairly low resolution) and
this is something I'd like to get working at some point. I'd probably need to
use a different generating function however given the sparseness of the
images generated using the 'chaotic swirls' algorithm.
2. I've yet to add command line parameters which would make the program much
more user friendly and also provide the possiblity of running the program in
3. The ASCII based PGM file format uses a lot of space, so ideally I'd like to
modify the program to generate the binary version of PGM.
I'm now going to rewrite the whole program in multi-threaded Scala. This is
sort of an anti-retrochallenge.
Thoughts for the 2010 winter retrochallenge are turning towards a hardware
oriented challenge. Probably incorporating a large number of seven-segment
displays and a Motorola 68000 Single Board Computer.
3. jEdit Text Editor
4. 99 Bottles of Beer
6. Hoffman Labs
7. The SCALA Programming Language