80Bus News 
September–October 1983, Volume 2, Issue 5 



Page 14 of 67 




Presented with 24k of code of MBasic, it’s rather daunting to know where to begin, but armed with a copy of “Nascom Basic Disassembled” and Gemdebug, it is only a moment’s work to discover where the arithmetic routines are in Mbasic. (Both interpreters originate from Microsoft, and so there is a certain amount of commonality. Use the “W” command to locate the sequence 78,B7,C8,3A.) After this the fun began! I must emphasise that this is a crude ‘hack’, and is not supposed to be a sophisticated modification. The points where I patched my routines in, appear to be correct, but there may be some unexpected side effects, and, as mentioned above, possible exponent overflow is ignored. Also without the information I had already to hand, it would have been a much harder task.
Listing 1 shows the support routines I put together over one evening. The explicit test for zero in the format conversion routines turned out to be necessary, otherwise odd results like 1.0 + 1.0 = 2.125, and 1.0 – 1.0 = 0.5 appeared! The net effect on the benchmark timings can be seen in Fig 2, so a significant increase in the execution speed of numbercrunching programs could be expected
If you do a lot of number crunching, or have a realtime application that requires highspeed crunching, then this is a product you should consider. However you should bear in mind that unless you are prepared to do some work yourself, you are currently restricted to Hisoft Pascal for your programming language.
It is not a trivial task to modify existing compilers/interpreters to support the HSA88B. This is because the existing floatingpoint routines may not use the same floatingpoint format as the AMD9511, and also it is not an easy task to unravel the complexities of floatingpoint support packages.
If you have a dedicated application, then the HSA88B makes the writing of a floatingpoint package a relatively simple operation. The main effort will be in producing the ASCIItofloatingpoint, and the floatingpointtoASCII conversion routines. But with the FIX and FLOAT commands available within the AMD9511, this shouldn’t be too onerous.
The revised price of the HSA88B of £253+VAT seems a little high – especially if you are not interested in the Hisoft Pascal compiler – but perhaps this is to be expected of a low volume product.
If you want ‘more bang for your bucks’, then consider getting a version with a 4MHz Am9511A fitted, you’ll get a x2 increase in execution speed, for a lesser (x1.3?) increase in cost. The speed increase will only be in the arithmetic however, not in the supporting Z80 code.
One final observation: if you need higher precision and can manage without the derived functions (and Hisoft Pascal 5), I can see no reason why an Am9512 couldn’t be fitted in the board in place of the Am9511A.
1. COONEN,J. “An Implementation Guide to a Proposed Standard for FloatingPoint Arithmetic”, COMPUTER, Vol 131, January 1980, pp6879
2. STEVENSON,D. “A Proposed Standard for Binary FloatingPoint Arithmetic”, COMPUTER, Vol 143, March 1981, pp5162.
3, DARK,Dr., “Doctor Dark’s Diary – Episode 16”, 80BUS NEWS, 23, MayJune 1983, pp5456
4. DUNCAN,R., “16Bit Software Toolbox”, Dr Dobb’s Journal, No 83, Sept 1983 pp 120122



Page 14 of 67 



