The Link > Past & Future

DOS credit calculator programs (c) Brian Stewart, 1983-2004



Introduction

The 'History' section of this page, just below, gives details of some of the history behind the programs.  The 'Future Developments and News' section, below that, considers the future and provides news about developments to the package etc.

History

I worked on consumer credit legislation for a long time ... twice ... starting around 1979 until about 1986, and then again from 1990 to 2002.

I'd always had an interest in computers, learning some Fortran IV (using punch cards) and BASIC using a teletype terminal while at school (that would have been the late 1960's and early 70's).  When small microcomputers for home use started to become available (I can remember names like Apple IIs, Commodore Pets, UK101s, Video Genies etc), I stumped up for a British model, the 'Atom' made by Acorn Computers in Cambridge, and started to experiment with writing programs in Atom BASIC and 6502 Assembler.

At work, Regulations requiring APRs to be shown in credit advertisements, quotations and agreements were coming into force in 1985.  We needed some method of checking the figures quickly and we needed to know how to do the calculations ourselves so we could explain it to others.

At the time, we had the options of asking colleagues in our economics division (who had the only computer) to do the calculation for us, or filling in a form and posting it to the Government Actuary, generally getting the result back a week or two later.  As for understanding how to do the calculations, all we could tell people was the principle of how to apply the formulae in the Regulations, and that they would need to use an iterative method - we only had a rather obscure mathematical paper containing a computer listing in Fortran, written in the '70s by some boffins at the DTI.

As I fancied my chances as a 'computer whizz' (well, I owned as many computers as the Government Department I was working for - ie one), I thought I'd have a bash at writing my own program for APR calculation from scratch and, stretching the resources of my Atom and my recollection of maths to it's limits, came up with a working, but rather primitive, algorithm and listing.  This was subsequently refined, adding better methods of iteration until I finally, after buying myself a 'Teach yourself ...' book on calculus because I'd completely forgotten it all, came up with the formulae for Newton's method now used in the programs available here.

At work, this was subsequently translated to the language for the HP-41C programmable calculator we had decided to use - and, incidentally, it's because this only accepted 7-character program names that the APR program/method is called 'Trurate' rather than something like 'True Rate'.

BBC BASIC

I've stayed loyal to the Acorn range of computers, moving on to BBC Micros (the Model 'B' and Master 512), an Archimedes 310 and, currently, a RISC PC.

The BBC Micro series of computers were all based on the 6502 microprocessor and used their own version of BASIC called BBC BASIC which was a rather more fancy dialect than standard 'Dartmouth' BASIC because it had looping structures, named procedure and function calls, local variables and a built in 6502 assembler.  Most models had an interface called the 'Tube' which could be used to connect 'second processors' - essential a second computer (often also using a 6502) which used the BBC Micro's keyboard, screen, disc drives and ports.  Second processors were usually faster, had access to more memory and, to some extent processed in parallel with the BBC Micro's main processor.  The last model of BBC Micro, The BBC Master, had an additional internal Tube interface.

At some point I upgraded to an Acorn Master 512 which was, as far as I can remember, Acorn's first dabble in the IBM/DOS compatible field.  This was a Master 128 with an additional circuit board - carrying an 80186 processor (yes, a one-86, which no one seems to have heard of), a BIOS and a 'massive' 512K of RAM  - which plugged into the Master's internal Tube.  In effect this was a PC on a single 3"x3" circuit board and came with modified versions of DOSPlus, Digital Research's early multi-user rival to MS-DOS, and GEM, a graphical user interface pre-dating Windows.  It provided approximate DOS 3.21 compatibility (although there were some memory and peripheral differences) and there was a PD version of BBC BASIC for it, known as Master 512 BASIC, which operated in 'true' second processor fashion, directly accessing the Master's hardware and machine operating system (MOS) over the Tube.  More importantly, it would run a commercial PC-compatible version of BBC BASIC, called BBC BASIC(86) by the same author as 512 BASIC, available from a firm called M-TEC (now defunct).  This emulated most aspects of the BBC Micro on a PC and provided an opportunity to port and develop software written on the Beeb to what was by now becoming a 'standard' DOS environment.

When you get access to a new machine/language/facility and you like to mess around with programming, you need something (hopefully a bit more elaborate than a 'Hello World!' program) to try it out on.  For me, even though I wasn't working on credit at the time, an APR calculator was the obvious choice - to the extent that, when I got some new speech hardware on my old BBC Micro, the first thing I produced was a speaking APR calculator - sad no?  So, when I got a DOS-compatible system I had a go at a program and the package was born out of a mish-mash of new code for the PC environment and some general stuff (things like menu, input and display routines) originally created in BBC BASIC 2 on the 'Model B'.

Colleagues working on consumer credit at the time were still using an old Amstrad CP-464 and APR programs I'd written for that while I was working there.  When they eventually upgraded to a PC, they approached me about a program that would run on it and I mentioned (make that 'boasted') that I already had something they could use.  I let them have a copy and, in time, word got out to Trading Standards Officers that they had it, and I let them give copies to TSDs too.  They also approached me about commissioning some rebate programs, but that didn't pan out (much later, I upgraded the package to include them, so they eventually got them for free anyway).  In time, I moved back to working on credit and, basically, I've continued to maintain and upgrade the package in my own time and distribute it to TSDs, CABx etc. ever since.

Development Environment

The code which finally made its way into the package was written on a rag-bag of Acorn machines and operating systems, most of the later development was on an Archimedes using a software PC emulator and MS-DOS.  Although none of these were PCs or true compatibles, you should experience no problems - provided you are using Richard Russell's PC BBC BASIC(86) (at the time of writing v4.82 - see the links page for information) which is incorporated in the package.  Please note that the programs will not run (or at least not correctly) under other versions of BBC BASIC.

The package should also run under most versions of Windows.




Brian Stewart, 2001



Future Developments and News

With the advent of Windows and other 'graphical user interfaces' (GUIs) to the DOS field (something we'd had for a long time in RISC OS) the presentation of the package unquestionably became dated.  Unfortunately, producing versions of the programs for a GUI would require a complete re-write from scratch in something like Visual Basic for Windows.  For a long time there were no plans to do this.  As the programs have been developed piecemeal over something like 15 years, the amount of work involved would have been considerable.  Also, my interest still lies with RISC OS and, if I was going to invest that kind of effort, it probably wouldn't have been for a Windows program.  However I was approached by the OFT to do this and have now produced a Windows APR and rebate calculator.


JavaScript Programs

I've learned te basics of JavaScript and have developed a few web-based calculators running in a browser - see the JavaScript link on the menu for more details.  Although JavaScript is deliberately restricted in some of the things it will do (eg like writing to your disc) this approach provides an opportunity to produce programs which will work across a variety of platforms (ie principally for me, Windows and RISC OS) with a GUI interface which is constructed fairly simply using HTML.  Interesting thought ... wouldn't it be nice if there was some way of running BBC BASIC scripts in a browser?


BBC BASIC for Windows (April 2002 Update)

In September or October 2001 Richard Russell released 'BBC BASIC for Windows' and I bought a copy.

This is an extract from what I wrote here in October 2001:

"This isn't really the place for a software review but, I had visions of building a Windows interface (buttons, text boxes etc) in an editor and just stripping the maths etc routines from the package and using them to respond to clicks.  However, it seems it's not some sort of 'Visual BBC BASIC' and it will probably be quite difficult to use it to write something which looks and acts like a Windows application.  In fact, it seems to emulate something like a BBC Micro in a window, only with the more sophisticated BASIC 5 available under RISC OS, which is a slightly strange combination of old and new.

"The help files only mention support for menus from the Windows API.  It seems it may be possible to do more by calling other functions in the API or other DLLs but, at present, you seem to be left to your own devices to work out how to do that.  This means that, even if it's possible to convert the credit programs, the amount of work required is likely to remain considerable.

"Anyway, as I said, very much first impressions and perhaps clouded by my unrealistic expectations - you can't expect the Earth for 30 quid."

Well ... I'm pleased to say I was wrong.  Richard Russell has continued to release further versions which provide some fairly minor bug fixes but, in the main, concentrate on giving more information and facilities for using the Windows GUI.  The latest release I picked up from his website pretty much has provided a 'Visual BBC BASIC' through library routines to use dialogues.  Within a few hours of looking at this, I was able to produce a simple executable for a Windows period rate calculator - download it here.  It's very simple, but it was really easy to create (I had a bash at this in Visual BASIC 6 some time ago, and the same thing took me three or four days and isn't quite so versatile - download it here - maybe that says more about my being comfortable with BBC BASIC than any difficulties with Visual BASIC, but BBC BASIC comes on one floppy not 3 CD-ROMs and seems to provide fairly easy access to things I could never figure out in Visual Basic - like getting the program to determine the content of a dialogue on the fly, rather than having it all fixed in the code.  This is encouraging me to think more about a 'proper' Windows version, although I doubt it will ever have all the facilities of the DOS version - as I've said before ... watch this space.


February 2002 - WinCredit v0.01 for Windows released

I was pleased to discover that much of the code in the credit programs package would run unaltered under the new BBC BASIC for Windows.  I have therefore been able to produce a small patch to run them using this interpreter.  While this still means that what appears on screen is an old 'DOS/BBC Micro-style' program, it should, in theory at least, now run under all versions of Windows ... including XP.  Use the 'Windows' link on the menu for more information and a download.

Some minor improvements to the patch have been introduced with v0.02 and v0.03.


March 2002 - New 10 March 2002 release

This, relatively trivial, update corrects a rag-bag of minor bugs and glitches which I have accumulated over time, includes one or two up-graded programs, and incorporates a fairly quick review of the documentation to incorporate references to things like WinCredit mentioned above.  The changes are more significant if you're using the 'Plus' or 'Distrib' packages available from the confidential address (see the Downloads link on the menu).

If I've still missed your favourite or most annoying 'feature', let me know.  For the time being, having just discovered the Brandy BBC BASIC V Interpreter (see the links page), I am going to be looking into the possibility of adapting the BBC BASIC(86) code to run under RISC OS - but see below.

May 2002 - Revised 10 March 2002 release - Doh!

No sooner had I released this version than one of my colleagues hit upon a couple of bugs in Trurate Two and Builder - a revised version of the 'Distrib' set and the Builder program (see the Resources link on the menu) are available from 15 May 2002.


RISC OS/BBC Micro Version

Here's a scary blast from the past which will be of little interest to most people ... I have hundreds of floppy discs hanging around because I'm always afraid I'm going to inadvertently throw something important away.  I decided to save some space by burning them all onto CD-ROMs (although I've cleared about eight feet of shelf space so far and only have about a quarter of a CD's-worth, so make that 'CD-ROM').  While I was doing this, I came across the first complete BBC Micro version of the Trurate (not Trurate Plus or Trurate Two) APR calculator, which I'd apparently adapted to run on the Archimedes at some point (it will run on the RISC PC, including RISC OS 4, and I suspect that it will also still run on a BBC Micro, memory permitting - you might need a Master or a second-processor).  You can download it here - I have amended it to deal with the latest version of the TCC Regulations (see the note at the end of the instructions file) and am making it available in case anyone needs a native 'Acorn' solution.

If you want to try it out on a PC, you should be able to run it using the amazing 'Archie' RISC OS emulator which you can  download here - it's free but you'll need to get hold of some RISC OS 3 ROM images (and RISC OS Ltd. apparently have some copyright 'issues' with that).


New Job - 8 July 2002

As of that date I no longer work on credit.  That doesn't mean I'm going to abandon these pages or further development of the programs, but it does mean I'm going to be more out of touch with developments in the field.  If you think the programs need to be adapted to deal with something new, let me know using the 'Email me' link on the menu - don't forget to let me have enough info to understand the problem.