Simple OPL programming

I’ve been totally bitten by this coding bug for these Psion organisers. They use a code called OPL, Open Programming Language that is loosely related to the BASIC programming Language. This allows the consumer to write programs or to make amendments to the way their personal organisers can operate and carry out commands. It’s an amazing bit of kit, but as usual I am about 40 years late for the party, however there is still a big community out there who have created some amazing programs and routines, and fortunately they are all willing to share their skills. The language seemed to phase out into retirement sometime around 2010.

One of those people is the guy in the video below called Huw. He has a channel on YouTube called Handheld computing and he has made a series of six episodes teaching those who want to know, how to program in OPL. He also has a lot of retro based videos on his channel.

Huw – he’s very good 👍

This is only episode one, and using Huw’s teaching I have already produced my first thirteen line routine to carry out a simple command that asks you to input your first name, and then second name and then it presents that to you, in the centre of the organisers screen. A simple and basic operation that gets you to appreciate the requirements and individual inputs that are needed, to get such a string of information to present itself on a screen in a structured way.

My rough scribblings in a scruffy shorthand

In my notes above I’ve added a couple of new lines to reposition the presentation of the text on my screen. And as I used the 4 line LZ model, this required a different set of coordinates from the two line CM model that I have also used.

When using the techniques in the video I did notice that there were mistakes, as when I entered the information into the organiser it was coming back with a “Bad declaration” error. So I knew something was wrong. After a while of searching through the program I realised two of the string routines were presented wrong with the “$” dollar sign positioned wrong in the text. A quick change of position and the program translated fine and now runs well on both machines. Below is a tidy version of the code:

NAME:

LOCAL NAME1$(10),NAME2$(10)

PRINT “HELLO”

PRINT “ENTER 1ST NAME”

CLS

PRINT “ENTER 2ND NAME”

INPUT NAME2$

CLS

AT 8,2

PRINT “HELLO”

AT 5,3

PRINT NAME1$;” “;

PRINT NAME2$;” “;

GET

I apologise if there are any glaring mistakes or mis types that the more trained eye may witness, however it’s only day one for me so I’m quite pleased.

Below are a load of pictures of the code being input into the organisers

And below is the results as they appear on either the 4 line screen or the two line screen, dependent on what unit you are programming.

And that’s it for my first session really, seems a lot of work for such a simple routine. However I have learned a lot in just one session and I have thoroughly enjoyed it. Im quite looking forward to Huw’s next five lessons, hence I will report back further as my learning and abilities hopefully improve.

Thanks for passing by.

Unknown's avatar

Author: Balders

Passionate hobbyist, restoring the past, one old camera at a time. iPhone14 Max Pro - Sony A7II and about 60 others from the days of silver halide 📸 Main aim in life - Retirement

One thought on “Simple OPL programming”

Comments are closed.