OPL
-
- Posts: 290
- Joined: Tue Jan 03, 2023 7:54 pm
OPL
I've had a Psion organiser 2 since some time in the 80s and have written OPL snippets since I got it. I still have it somewhere, but it has become mixed with the others I have recently acquired. I then moved to the Series 3 and even, much later, the series 5, which was too expensive for me when it first appeared. I got the SIBO SDK for the series 3 and dabbled a bit, then left the Psions until much more recently. I have a Psion netbook, and some workabouts. When I got the SIBO SDk i was impressed at the architecture of the framework. It is some of the best, if not the best software engineering I've seen, and I've seen quite a bit. When I did the recreation, again I was impressed by the hardware engineering, which is impressive, and not over-engineered. I've recently (yesterday and today) been investigating the organiser 2 OPL architecture and it is, frankly, astounding. The tiny little organiser, as well as having a set of useful applications, has a well architected full-blown byte code compiled language with well thought out global, local and external variables. The byte code itself runs on a stack based machine just like many more modern languages did and do later. Not only that, but all this can be used on the machine itself, no big desktop needed, and all in a few kilobytes of code on a 6301 processor running at 1MHz. Editor, compiler and runtime. Astounding.
- Martin
- Global Admin
- Posts: 286
- Joined: Mon Jan 02, 2023 5:18 pm
I agree
OPL called from the pocket spreadsheet - you've got to try it..
As some members know I'm on with reviewing 'Organized Solutions' Travel Pack. It is evident that some of the original features could better be done in the pocket spreadsheet... So I've been revisiting the the integration of OPL procedues into the spreadsheet using the OPL function..
The republished spreadsheet manual explains..
The OPL function adds three facilities to the Spreadsheet:
Any cell in the grid can call OPL procedures
An OPL procedure called by a cell can 'grab' the contents of other cells In the same worksheet.
An OPL procedure can return a value to a cell.
If you need something to tinket with try using OPL to create a spreadsheet 'time' function..
Sincerely
Martin
As some members know I'm on with reviewing 'Organized Solutions' Travel Pack. It is evident that some of the original features could better be done in the pocket spreadsheet... So I've been revisiting the the integration of OPL procedues into the spreadsheet using the OPL function..
The republished spreadsheet manual explains..
The OPL function adds three facilities to the Spreadsheet:
Any cell in the grid can call OPL procedures
An OPL procedure called by a cell can 'grab' the contents of other cells In the same worksheet.
An OPL procedure can return a value to a cell.
If you need something to tinket with try using OPL to create a spreadsheet 'time' function..
Sincerely
Martin
-
- Posts: 290
- Joined: Tue Jan 03, 2023 7:54 pm
Re: OPL
Some other things I forgot to mention:
- You could write a compiler for a different language that emits QCode and the organiser would run it. This is effectively what ATRAN does.
- You could write directly in QCode, maybe with an assembly language.
- The calculator (and spreadsheet, as mentioned above) both allow loading of procedures, so it must be possible to access this facility for other programs, maybe this can be found and documented? Of course, OPL programs do this natively.
-
- Posts: 86
- Joined: Thu Jan 12, 2023 8:25 pm
- Contact:
Re: OPL
I've not looked at this (I am staying with the PK$save problem), but this is a very important find. I assumed that any large program would use too many resources to allow full use of OPL within its own context, but if the spreadsheet allows it, it might be one of the most important user interfaces an Organiser can offer. I knew the calculator can do it, but it's usually very limited in use because of the limits in output display (must always be expressible as a floating point value). Ultimately the usefulness may be limited by how a display instruction of any kind relates to the context, e.g. co-ordinates of a current cell, and whether arbitrary text may be included in what's printed. Seeing values intended as boolean being printed as 'true'/'false' would be a simple but useful example. Another might be to call a 'choice' program by recalculating a single cell on demand, so answering differently gets a different outcome in multiple cells, but this idea would need that cell to then cause full recalculation of all but itself, likely not possible!
I agree with amenjet about how amazing the Organiser II is, as a full computing architecture, and I like the WorkAbout too, except the name, and the shape, but anything with hinges I do not want; they break, always. There were earlier slab-shaped things by Casio and Texas Instruments that could run BASIC and likely had internal machine code available to those who knew how, but those devices, though they looked cool, were ridiculously fragile. They never offered anything like the easy hybridisation of OPL and ASM either. Organisers got used in factories, shop chains, aircraft carriers, amazon exploration... I suspect NASA made use of them in space but I never saw that confirmed. Those earlier machines could never have stood the rigorous demands, nor allowed a user to invent new answers to problems anywhere they had the time to sit and think about them, with nothing but a small handheld machine and some documentation, without having to worry about battery life during several weeks of work.
Even now, I suspect the Arduino crowd have never found, or created, that unusual combination of luxury and raw capability at such low power. When people say my Organiser is obsolete, I laugh, and I tell them about it's ability as a portable GPS and an effective controller for the Icom PCR-1000 comms receiver, and this usually stops any claims of obsolescence immediately. When an old machine is not merely a front end (like that owned by a guy who used one to control a web browser on a laptop PC), but can do a complex modern task on hardware made over 25 years earlier than the hardware it's controlling, it looks impressive. Smaller, faster machines can do it, but I'm aware of people who use an Arduino, who will still reach for an Organiser when then they want a rugged, self-contained system to do the work.
- Martin
- Global Admin
- Posts: 286
- Joined: Mon Jan 02, 2023 5:18 pm
Re: OPL
Huw Barnes... Not a member here but a member of the Psion FaceBook group has written some fascinating Psion Stories. In one (here) - Circular References in Spreadsheets he explains how he was developing a function to allow the spreadsheet for the MC400 (the precursor to the Series 3) to allow the full recalculation of all but itself..but this idea would need that cell to then cause full recalculation of all but itself, likely not possible!
Extract
The problem is that spreadsheets assume that when you type in a calculation that accesses other cells that it is the latest value of the cells that you need, and orders the calculations appropriately. In spreadsheets this is called natural order sorting of calculations. In this case though, each cell wants to know the value of its neighbours (and itself) before they have been calculated, i.e. It wants the previous values not the latest.
You could have a special function to access this, say PREVIOUSVALUE(A1). This would increase readability, though it would require the natural order sort mechanism of the spreadsheet to recognise this function as special and ignore any cell references within it otherwise the calculation would still trigger a circular reference. This also only allows for single cell references, not ranges, and to be fully flexible it would be useful to make range references easy too.
he goes on to say..
Unfortunately the decision was made at the last minute to release the spreadsheet at the same time as the V2 upgrade. We still finished it with no overnighters (possibly a Psion 1st), but there was no longer enough time to add this feature. I still hoped to add it at a later date, but another sad turn of fate led to my parting ways with Psion before the Series 3 launch and so it never got to see the light of day.
For those that can access Linkedin Huw's other Psion stories are interesting. I particularly like number 3 where he reminisces about developing the Software suite for the Sinclair QL
Sincerely
Martin
-
- Posts: 86
- Joined: Thu Jan 12, 2023 8:25 pm
- Contact:
Re: OPL
I remember trying something like that with Spread32 (Bye Design Ltd), and a GS-Calc (Jarek Piechura), and I think only Spread32 could do it. I tried looking for my test case last night but can't find one, so I think I decided that some other way to indicate dynamic data rather than make it actually dynamic, was a better way. (It was to do with a complex modulation system for a synthesiser, I remember that much, I had many problems visualising the mechanics before I could code it...)Martin wrote: ↑Tue Feb 06, 2024 11:38 pmHuw Barnes... Not a member here but a member of the Psion FaceBook group has written some fascinating Psion Stories. In one [url=http://https..www.linkedin.com/pulse/circular-references-spreadsheets-huw-barnes-czq6e?trk=article-ssr-frontend-pulse_more-articles_related-content-card](here)[/url] - Circular References in Spreadsheets he explains how he was developing a function to allow the spreadsheet for the MC400 (the precursor to the Series 3) to allow the full recalculation of all but itself..but this idea would need that cell to then cause full recalculation of all but itself, likely not possible!
In the extract Huw Barnes mentions the ideal use of ranges, not just single cells, but I always assumed that a range would just be an iteration of single cells! At some point, it always is, so it's mainly down to how efficiently this can be done. In a high-level language it may well be slower, so a range can define an iteration that machine code will do. Fortunately, C is fast enough to express it directly, with some care about which dimension in a multidimensional array gets considered first.
I don't know about the finer points of spreadsheet cell evaluation order, so if I were trying to do it, I'd consider adding a switch for each cell, letting a user exclude it. This would be a useful default to avoid repeat evaluation for constants and literals (like strings), for obvious reasons. :) It might even help with speed.
Any chance of indicating the PK$save thread to Huw Barnes? He might well know something specifically useful to help solve that..
- Martin
- Global Admin
- Posts: 286
- Joined: Mon Jan 02, 2023 5:18 pm
Re: OPL
Hi Lostgallifreyan
I sent him a tentative Personal Message asking if he was involved with the Organiser II operating system?
His reply...
Hi Martin.
I wasn't involved in the Organiser II OS development. My only involvement was when I was asked to help out on the Organiser spreadsheet by rewriting the display code for it when the 4 line version came about.
Kind regards
Huw
I didn't mention your PK$SAVE quest and it looks like he came to the Organiser after it was up and running... I have followed up asking him if he is still in contact with anyone that was there at the early development stage... If/When he gets back to me I'll point him in the direction of the PK$SAVE thread.
Always sincere
Martin
I sent him a tentative Personal Message asking if he was involved with the Organiser II operating system?
His reply...
Hi Martin.
I wasn't involved in the Organiser II OS development. My only involvement was when I was asked to help out on the Organiser spreadsheet by rewriting the display code for it when the 4 line version came about.
Kind regards
Huw
I didn't mention your PK$SAVE quest and it looks like he came to the Organiser after it was up and running... I have followed up asking him if he is still in contact with anyone that was there at the early development stage... If/When he gets back to me I'll point him in the direction of the PK$SAVE thread.
Always sincere
Martin
-
- Posts: 86
- Joined: Thu Jan 12, 2023 8:25 pm
- Contact:
Re: OPL
Nice one. I may get lucky... This is the wrong thread to announce this but waste not, want not... I have a forced test running, of the WORD at address $2407, starting at zero, on an XP with ROM 36-LA. It's a quarter done (not sure why it's so slow, it was faster on ROM 33-LA), but so far it's not found a value that prevents the extra 'FF', and I don't think it's going to find one! I suspect Psion used an entirely new method for all later OS's.Martin wrote: ↑Wed Feb 07, 2024 3:58 pm I didn't mention your PK$SAVE quest and it looks like he came to the Organiser after it was up and running... I have followed up asking him if he is still in contact with anyone that was there at the early development stage... If/When he gets back to me I'll point him in the direction of the PK$SAVE thread.
Always sincere
Martin
-
- Posts: 77
- Joined: Tue Jan 03, 2023 10:03 pm
Re: OPL
I wholeheartedly agree, OPL is really quite something - I am as far from what could be considered a programmer as is possible, yet I can usually get a little OPL program working and doing what I want. It is very well documented and thought out, and the fact that you can do it right on the Psion without any fuss is very useful to me. I will continue to use OPL and my beloved Psion(s) until they or I no longer function.
Modern tech is nowhere as appealing to me for this kind of stuff, don’t get me wrong I use iPads and other computers and PDAs and tablets too, but the barrier to creating bespoke programs on all of those is just far too high for me.
I also have a couple of Series 3, and back in the 90’s made some OPL programs on those, but nowadays I think I prefer the old LZ64, better battery life, way more rugged, sure more minimal but also I think some of the Psion magic was lost on S3, even though obviously a lot was improved too, but today a lot of those things the S3 does are handled by more modern devices I have.
Modern tech is nowhere as appealing to me for this kind of stuff, don’t get me wrong I use iPads and other computers and PDAs and tablets too, but the barrier to creating bespoke programs on all of those is just far too high for me.
I also have a couple of Series 3, and back in the 90’s made some OPL programs on those, but nowadays I think I prefer the old LZ64, better battery life, way more rugged, sure more minimal but also I think some of the Psion magic was lost on S3, even though obviously a lot was improved too, but today a lot of those things the S3 does are handled by more modern devices I have.