Close

First modifications to BASIC

A project log for SMART Response XE BASIC

Turn a SMART Response XE terminal into an 80's flavour pocket computer

fdufnewsfdufnews 01/06/2020 at 16:030 Comments

Adapting Arduino BASIC to the SMART Response XE terminal was quite easy as the interface was  limited to a pair of functions that were easy to replace with the ones in the Low Level Library.

But the display is not that large and the limitation imposed by its graphic controler lead to some problems. The contraint is that font width shall be multiple of 3. You can have small fonts that give many lines with many characters difficult to read (for my eyes at least) or large fonts that are easy to read but with less lines with less characters. It made me want to be able to change the font at any moment.. The low level library alreay defines 4 fonts

Font
name
Font
size
# of char
per line
# of lines
per frame
Comment
NORMAL9 x 84217fill screen
SMALL
6 x 
6417fill screen
MEDIUM12 x 163288 unused lines
LARGE15 x 162588 unused lines

As the larger fonts leave 8 lines I decided to do the same for the smaller ones. The 8 unused lines will be used to display some information on screen.

The cpp file in which the interface with the host is defined was upgraded in order to be able to change the font on the fly. I first defined a structure that holds parameters depending on the font size. And replaced all the constants with members of the structure.

The terminal has some "special" keys. I used the menu one to launch a function with which I can change the font.

The 8 unused lines are located at the bottom of the screen. They display the status of the terminal. Actually, battery level, font used and memory usage.

Discussions