80-Bus 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 Dis-assembled” 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 number-crunching programs could be expected

Summary

If you do a lot of number crunching, or have a real-time application that requires high-speed 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 HSA-88B. This is because the existing floating-point routines may not use the same floating-point format as the AMD9511, and also it is not an easy task to unravel the complexities of floating-point support packages.

If you have a dedicated application, then the HSA-88B makes the writing of a floating-point package a relatively simple operation. The main effort will be in producing the ASCII-to-floating-point, and the floating-point-to-ASCII conversion routines. But with the FIX and FLOAT commands available within the AMD9511, this shouldn’t be too onerous.

The revised price of the HSA-88B 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.

References:

1. Coonen,​J. “An Implementation Guide to a Proposed Standard for Floating-Point Arithmetic”, COMPUTER, Vol 13-1, January 1980, pp68-79

2. Stevenson,​D. “A Proposed Standard for Binary Floating-Point Arithmetic”, Computer, Vol 14-3, March 1981, pp51-62.

3. Dark,​Dr., “Doctor Dark’s Diary – Episode 16”, 80-BUS NEWS, 2-3, May-June 1983, pp54-56

4. Duncan,​R., “16-Bit Software Toolbox”, Dr Dobb’s Journal, No 83, Sept 1983 pp 120-122


Page 14 of 67