(Euph)Oric for "today"?

Everything related to BASIC version 1.x (Oric 1 and Atmos) or HYPERBASIC (Telestrat).
Don't hesitate to give your small program samples, technical insights, or questions...
Post Reply
Flying Officer
Posts: 150
Joined: Fri Nov 30, 2007 8:30 pm

(Euph)Oric for "today"?

Post by Brana » Sun Dec 16, 2007 3:29 pm

Hello everyone

For the last two years I am seriously interested in developing commercial software under (Euph)oric. My intention is to make Euphoric useful in today's offices and/or in stores. I guess it all started when I received an order to make a simple program which will track the time spent on work for the employed personal of one company. It was a simple idea; everyone would enter their personal-ID key (number) at the start of the day and again at the end of the day. Program would then simply calculate the time "difference" (end time minus start time) and store it on the hard drive under the file for that employed person. It is extremely simple program and I wanted to create it under the (Euph)oric (emulator) because of the following reasons:

- I'm an excellent Basic programmer

- I personally hate Excel and Microsoft Access for when ever I try to do anything in their Visual Basic - all I ever end up is just - chrashing my computer!

- Ever tried to press CTRL+C under Qbasic? Does not work! And ever tried to do something like "A$=KEY$ under Qbasic? Does not work either! (Although this can be achieved but isn't so easy to do)

But then I realized that Euphoric, under Basic as well as the real Oric can't "tell the time"!
I mean - there is no command in Basic that I could use for the program to know at what time something happened!

Then I searched the Internet, searched and searched, asked a lot of questions "here and there" regarding this subject and found - no answer!

It took me almost two years experimenting ON MY OWN and doing PEEKing of hundred and hundreds of addressees "BY HAND" and comparing their values to discover the following:

PRINT PEEK (869) gives the date number, example: "31"
PRINT PEEK (868) gives the month number, example: "12"
PRINT PEEK (870) gives the year number, example: "7" for "2007"
PRINT PEEK (865) gives the hour number, example "9" for nine o clock
PRINT PEEK (866) gives the minute number, example "20" for 09:20

(Of course, RealTimeClock" in the Euphoric's INI file has to be set to "YES")

And this WORKS for the Atmos configuration of the Euphoric :)

Now, I have 3 more unresolved problems that prevents me from developing commercial applications under Euphoric;

1) Program example:
10 DIM A$(200)
20 INPUT "Enter file name";S$
30 Store A$,S$ (does not work)

In stead, I have to do it like this:

10 DIM A$(200)
20 REM---
30 STORE A$,"filename.tap"
Meaning - I cannot use a variable under the program itself for the filename, I must have that filename already written inside of the program code. It is a serious drawback :(

2) DIM A$(100000)
Result would be:
Meaning - I have to "split" my databases in to separate files and use them part-by part.

3) Keyboard matrix of the Euphoric is capable of detecting every key pressed at the same time. Example: if I press the letter "A" and keep it pressed, then press the letter "B" - Euphoric can detect both "A" and "B"! (unlike Microsoft Word for example which would just repeat the first letter pressed - "A" in this case). But the keyboard buffer of the modern computers can NOT read more than one key pressed at the same time, so this option of the Euphoric is meaningless today! And, I believe this is the reason why Euphoric is much SLOW when it comes to reading bar-codes from the bar-code scanners connected to the keyboard of PC computers.

For the first problem written above, I was told that there is a bug in Oric's ROM file and because of that I can not use a variable for storing the file created by the "DIM" command. (But I CAN use a variable for saving the program file itself, example: CSAVE S$ )
My question is: Has anyone bothered to fix this bug in the ROM file?!

For the second problem written above, - I know that Oric was an machine with only 44KB of RAM memory available and increasing the RAM amount wouldn't be the "Oric" anymore, BUT...??? If anyone would increase the RAM memory of "Oric" under the emulator up to - at least 1MB (!) and CPU just up to 20MHz - this "simulated machine" could be quite useful even today! :) I know this memory increment would be quite hard to do on the real Oric, but under the emulator - I don't know. Has anyone created a version of Euphoric with larger RAM available?

For the third problem written above - I have no other solution but to "slow down" the actual bar-code scanner itself. It's a shame. But it's only solution I can think of!

P.S. Have you a LAN connection in your house? Example - at least two computers connected via Local Area Network cable? And, example, first computer would be named "SERVER" and second computer would be named "CLIENT".
Then, on both computers on the Hard drive C you have a folder named "ORIC"

Then, launch Euphoric on the SERVER computer, and do the following:

Then exit Euphoric, and check the contest of the ORIC folder on the CLIENT computer. In it, you will find newly created "DEMO.TAP" file - meaning - Euphoric CAN pass files trough the Local Area Network!

So, why not create an account software or cash-register software under Euphoric? It would be much easier (and much more stabile!) peace of software than those provided from the Microsoft corporation(and similar sources)!
More or less only thing that's stopping me in this idea is those 3 limitations of the Oric itself. I'm not suggesting to re-create the Oric, just to re-modify it to meet toady "criteria".

I would like to hear your opinions regarding these subjects.

I hope I wont have to wait another two years or so and work on solutions regarding these 3 problems stated above - totally myself - like I did with the RealTimeClock and it's PEEK addresses :(

Best regards


User avatar
Site Admin
Posts: 2268
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway

Post by Dbug » Thu Dec 20, 2007 7:37 pm

You know, posting three (shorter) messages for three problems, would increase the probability of having an answer.

For the real time clock, you could just have asked to the author of Euphoric, after all this real time clock is just the emulation of a real oric peripheral.
And I'm sure the code for that is available in the source code of Euphoric as well.

More details about it here (I think) http://oric.free.fr/HARDWARE/Rtc.txt

For the filename problem, you can do the STORE instruction yourself by POKing/DOKing the right parameters in page 2, and calling the right ROM instructions with CALL.

For the memory problem, it's impossible to allocate one hundred thousant elements in a machine with only sixty five thousands memory locations. You have to do some disk management, or find a way to do things differently.
Increasing the frequency is just basically "waiting" less between instruction you emulate.
Increasing the memory means handling a totally different hardware. How do you adress the additional memory with a 8 bit processor ?
Euphoric emulate the reality.
If you want more memory, then you need a bank switching mechanism.
If you want that, instead of emulating an Oric Atmos, you should just emulate an Oric Telestrat, and use the bank switching mechanism.
Of course doing that in BASIC is probably not "doable".

User avatar
Game master
Posts: 1910
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN

Post by Chema » Thu Dec 20, 2007 8:06 pm

Well Dbug actually answered the questions, so I have little else to add... (just was about to post something about the memory issue only, though).

I fail to clearly see the advantages of having Euphoric working as a "real" environment for what you need, appart from being an excellent and curious exercise, of course. And probably something I would LOVE to have a photo!

I think there are quite many disadvantages, like having to be sure users won't press any function key (they can close, reboot or alter the emulator's behaviour... can't imagine their faces looking at the debugger screen :) ) and making the program quite difficult to accomplish (imagine having to deal with virtual memory on disks or memory banks).

I have used Visual Basic and, even I agree it can get on your nerves sometimes, it is quite easy to develop robust interfaces once you get used to it... If this is ever possible...

Also did some experimentation with Qbasic and ported the Oric's game "The Kilburn Encounter" (unfortunately I lost the file) and found little trouble. Sorry it was quite long time ago and I just can't remember if I had to do something like A$=KEY$.

For something as simple as what you state I am sure there are many alternatives, from C under DOS to something complex under Windows.

(to make it more difficult, use Qbasic under DOS and run it in a virtual machine in Windows, using for instance VirtualPC :) )

Anyway if you prefer to go with the emulation, maybe you would like to see emulators for machines which have the characteristics you need. Just a first thought: is there any emulator for Spectrum QL? It was a quick machine (had a 68000 micro inside, IIRC), managed microdrive units (terrible in real world, but could work in emulation quite well for this) and had an excelent SuperBasic...

Can't remember if it had a real time clock, though.

I know there were quite a bunch of administrative applications for that machine...

Best regards!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest