HTMLGEN


Right through to the very end. It was originally written in ARM BASIC on the RISC PC, but needed very little modification to run on 8-bit BASIC.

There were three main challenges. First, getting the OS version for the information text in the HTML pages, which on ARM BASIC can be done easily with *FX0 and then REPORT$. This involved a test for ARM BASIC and then using INKEY-256 if not.

Second, the file type stamping, which was originally done using RISC OS's *SETTYPE command. This also date stamps the file at the same time. File and date stamps are kept in the load and exec addresses, so it was easier in all cases just to set the load and exec addresses of the file when saving the assembled HTML page. This further involved working out the current date - from the internal RTC if available - and converting it to the RISC OS centisecond format, the tail-end of the calculation for which you can see here.

Thirdly was the memory constraint. Originally, 24K was reserved as a data block for the index page file, which would be sufficient for over 100 captions in the file, and 4096 bytes each for the index page caption and individual page captions. Obviously, there isn't always 28K available on a Beeb, especially when taking into account that "HTMLGEN" itself uses up about 12K. With a second processor and HI-BASIC, it was OK, but I wanted it to be able to run on a 32K Model B as well. To achieve this, I added a routine to scan the captions file and work out the maximum sizes of the captions and only then reserve just enough memory. It will allow most picture sets to be run on a 32K machine, but some will need a second processor.



Click here to return to HTMLGEN