Hi, Vassilis:
Vassilis posted:
"The processor architecture is quite strange and even writing machine language programs is non trivial."
Why, Vassilis, writing machine language programs is *never* trivial ! :-) At least for us, puny humans !
I've written machine language programs for quite a variety of CPUs, from the ZX-81 (aka Timex Sinclair 1000 in the US) onwards, and it was never 'trivial', specially if you had to assemble the code by hand, translating opcodes to hexadecimal and manually calculating the jump offsets, as was the case with the ZX-81 before the first rudimentary assemblers did appear.
I did also write a sizable number of 'machine language' routines for the HP-85, implementing a number of new BASIC keywords and frankly, though not exactly trivial, it wasn't that difficult either. The processor's architecture is not so much 'strange' as unique, with its large 8-byte CPU 'registers' and BCD arithmetic.
I remember distinctly it all was very exciting and enjoyable and you felt great when your newly assembled BASIC keyword would perform as expected (or else crash the machine altogether).
Some people went even further: a friend of mine did write a chess program for the HP-85 which made use of a number of chess-specific BASIC keywords written in assembler to generate all legal moves and search/evaluate the tree at assembly speeds. People at HP were amazed when we showed it to them, and used it at trade show demonstrations to help boost sales. And some HP-written assembly-language programs made incredibly amusing and addictive video games, I still fondly remember BATS and MAZE.
The assembly programming model was very similar to that of the HP-75C and HP-71B, you needed to define parse tables, text tables, polls tables, error messages tables, etc, then code your keywords, which usually made a large number of calls to operating system entry points in ROM (specially for parsing), so you didn't need to reinvent the wheel.
I still keep a number of HP-85 'machine language' listings, spefically written for didactic purposes, to be explained in a number of HP-85 programming courses I taught at the time.
Best regards from V.
Edited: 25 Nov 2003, 7:59 a.m.