6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 27, 2024 4:21 pm

All times are UTC




Post new topic Reply to topic  [ 30 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Is Comal lost to time?
PostPosted: Fri Aug 11, 2023 5:35 pm 
Offline
User avatar

Joined: Thu Oct 12, 2017 10:51 pm
Posts: 87
Doing some poking around with Basic, I was reminded that Comal was a thing.

I can find three implementations of Comal for the 6502: Acornsoft's for the BBC Micro, and Commodore's for the C64. Wikipedia says that there was a public domain version of the latter, but that seems to be airquotes public domain: after tracking it down it's very much copyrighted and the source is long lost. The same with Acornsoft's.

The third implementation is for DOS65 (note no slash), an OS for a Dutch computer system. There's a port of Comal for that with unknown provenance, but the documentation says it's a port of Junior Comal. Neither I nor Google have ever heard of this (but I did learn that Comal, Texas has a Junior Livestock Show). See http://retro.hansotten.nl/6502-sbc/dos6 ... s65-comal/

But the weird thing is that that's all I can track down --- except there are hints that Comal was available for loads of other systems. A news article from 1984 claims it was the major educational language on Denmark, Sweden and Ireland. A long forgotten catalogue shows it was available for the Oric. There's a tape image for Comal on the Spectrum which apparently nobody's ever heard of. Shouldn't there be more information, somewhere?


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 11, 2023 5:40 pm 
Offline

Joined: Wed Mar 22, 2023 3:58 am
Posts: 37
Location: teh interwebz
hjalfi wrote:
I did learn that Comal, Texas has a Junior Livestock Show


At least that matched the search terms. I often get search results where the last third of the first page of results go way off into left field.


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 11, 2023 7:11 pm 
Offline
User avatar

Joined: Thu Oct 12, 2017 10:51 pm
Posts: 87
(I have, BTW, found out that a lot of the Comal interpreters are on archive.org. Here's the Spectrum version running in an emulator: https://archive.org/details/zx_Comal_v2 ... _Computing Still surprised not to see anyone ever mention them...)


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 11, 2023 7:17 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
I see COMAL is often described as "a structured Basic". And there were several z80 implementations.

For example, Christensen writes in Datamation, December 1977
" by now we have gained considerable experience with our Structured BASIC, which we call COMAL (COMmon Algorithmic Language"
The language debuted on a Nova 1200, using 12k words of core (half the core) in 1975.

I see also in Commodore Club News from December 1981
“ ...the Department of Education and Science should tell computer suppliers that from, say, the beginning of 1982, schools and colleges will be discouraged from buying computers without COMAL or other satisfactory structured BASIC. Nothing less than this kind of action will do if we are to put educational computing in Britain on to a firm footing.”

As it turned out, BBC Basic was a structured Basic.


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 12, 2023 3:18 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
FWIW: I can run Acornsoft COMAL in my Ruby system without any issues. I've never really gotten into it though to do stuff like benchmarks, etc. as there seemed little point, really.

Personally, I'm treating the copyright issue of the (Acornsoft) ROM images as more or less moribund - it's not open source but I really do not know who will come after me or you if we shipped a system with the ROM images - or even without the ROM images with the ability to run them as the ROM images which are freely available to download from many places. This may not make it right but that's the way it seems.

Are you planning a commercial system with a BASIC or COMAL for sale? Please let us know as if it's for a personal thing, really just use it as no-one will know.

Attachment:
Screenshot_2023-08-12_16-10-56.png
Screenshot_2023-08-12_16-10-56.png [ 11.7 KiB | Viewed 16754 times ]


See also:

https://www.josvisser.nl/opencomal/article.html (comal has been set free)
https://www.josvisser.nl/opencomal/ (Open Comal)

Open Comal is written in C.

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 12, 2023 6:56 pm 
Offline
User avatar

Joined: Thu Oct 12, 2017 10:51 pm
Posts: 87
This is for an operating system distribution, so all the copyright paperwork needs to be correct or other people won't distribute it (if they ask: do you have the rights to redistribute everything here? then I can't lie).

So far I've seen several references to the first Comal versions being public domain, but have been unable to follow this up. Still no idea what that Junior Comal thing is, and the DOS65 Comal source seems to be missing. The binaries exist, though...


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 12, 2023 7:49 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
hjalfi wrote:
This is for an operating system distribution, so all the copyright paperwork needs to be correct or other people won't distribute it (if they ask: do you have the rights to redistribute everything here? then I can't lie).

So far I've seen several references to the first Comal versions being public domain, but have been unable to follow this up. Still no idea what that Junior Comal thing is, and the DOS65 Comal source seems to be missing. The binaries exist, though...


"Junior" refers to the (Elektor) Junior Computer. A 6502 based system which was a KIM-1 like system. See:

https://en.wikipedia.org/wiki/Elektor_Junior_Computer

I guess this is the page you're thinking of: http://retro.hansotten.nl/uploads/eljun ... %20dis.txt

For now it looks like the only way you're going to get a version of Comal (& BASIC) that's suitable for you might be to write it yourself... And who has time/inclination/enthusiasm/energy for that these days...

(Although it is something I'd like to do, but it's not neat the top of any sort of to-do list right now)

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 15, 2023 10:53 pm 
Offline
User avatar

Joined: Thu Oct 12, 2017 10:51 pm
Posts: 87
Curses!

I was hoping to find some predecessor port which actually was in the public domain. It would have made sense given the language's history --- it was apparently written (in part) by university students.

Given that modern BASICs for 8-bit machines tend to be incorporating more and more structured programming systems, a useable Comal interpreter from back in the day would be an excellent alternative to writing a new one. Comal's a fine language, deliberately designed to be a better BASIC, with standards documents and everything. But I don't even know who owns it any more...


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 16, 2023 7:03 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
hjalfi wrote:
But I don't even know who owns it any more...


No one owns Comal in the same way that no one owns Basic, or FORTRAN, Pascal, etc.

There are standards, but not ownership, so if you want to write your own, no one will stop you - or come after you.

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 16, 2023 2:42 pm 
Offline

Joined: Sun Nov 08, 2009 1:56 am
Posts: 387
Location: Minnesota
A version of Comal that is apparently in the public domain is Commodore Comal 0.14, based on the Comal-80 specification.

I've done a partial disassembly of the binary.

The final part, at the highest position in memory, is mostly initialization. The final step is to set the top of memory to just before the initialization code, freeing that memory for program space. Even so, there's not a whole lot of memory for program space, only about 12K.

Floating point is handled by the BASIC ROM, used by Comal as necessary.

Error messages are not included in the binary. They are on the Comal disk, which is read whenever an error occurs. Oddly enough, at least two of the error messages are duplicates of each other. This suggests to me some carelessness on the part of whoever did the port, which further suggests there may be additional opportunities for optimization (though frankly the whole idea of error messages not in the binary itself is kind of weird to me in the first place).

The main loop is not handled the way BASIC does it, as a recurring loop of calling subroutines from a central loop. Instead, this Comal uses a series of direct jumps from place to place, making it hard to follow what's going on.


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 16, 2023 2:51 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
Some notes on 0.14 by Jim Butterfield back in the day:

Update On COMAL: A SuperBASIC (Classic Computer Magazine Archive COMPUTE! ISSUE 54 / NOVEMBER 1984 / PAGE 102)

Quote:
COMAL has traditionally been available in the public domain (that means free).

Quote:
It looks like things are changing. New versions of COMAL are being released that will make it an attractive language. A disk version for the Commodore 64 is now in the public domain; a cartridge version is soon to be made available for sale;.

Quote:
Disk-based COMAL for the Commodore 64 is named COMAL 0.14. It's free in North America, but it's not public domain. The package prints a copyright statement, but permits unrestricted distribution and copying. COMAL 0.14 is available from clubs, user groups, and the COMAL user group in Madison, Wisconsin. It's a good language implementation, complete with graphics and a complete set of error messages drawn from disk as needed.


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 16, 2023 3:36 pm 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1927
Location: Sacramento, CA, USA
teamtempest wrote:
Error messages are not included in the binary. They are on the Comal disk, which is read whenever an error occurs. Oddly enough, at least two of the error messages are duplicates of each other.

Maybe one of the duplicates is obscuring the "DISK READ ERROR" message 8)

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 16, 2023 4:09 pm 
Offline
User avatar

Joined: Thu Oct 12, 2017 10:51 pm
Posts: 87
I can't help feeling that if you need to store your error messages on disk, your compiler is too damn big...

I have figured out that the original Comal interpreters probably passed to UniComal A/S, which was bought by Prolog Development Centre A/S, who still exist. I might drop them an email to see if they still have anyone who knows about it. I doubt it, but it can't do any harm.

But this has all got me wondering how hard writing a Comal interpreter could possibly be...


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 16, 2023 5:37 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
hjalfi wrote:
I can't help feeling that if you need to store your error messages on disk, your compiler is too damn big...

I have figured out that the original Comal interpreters probably passed to UniComal A/S, which was bought by Prolog Development Centre A/S, who still exist. I might drop them an email to see if they still have anyone who knows about it. I doubt it, but it can't do any harm.

But this has all got me wondering how hard writing a Comal interpreter could possibly be...


Easy for the openComal project... https://www.josvisser.nl/opencomal/

However while I can compile that on my Linux desktop, I can't run it, and I don't have the energy or time to work out why.

A couple of things though: The internals of Comal and BASIC will be pretty much the same, so you'll have a LOT of common code - all the line editing, load/save, arithmetic (integer/floating point) handling and so on will be common - a lot of the variable handling and parsing will be the same too - this might make the task of writing them easier - ie. write one and the other will not be hard to follow on.

However... Like my fondness of BCPL for my '816 board, I suspect that if you did get a Comal going, you might be the only programmer in the world who might use it ...

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 16, 2023 5:41 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
Thanks for the link to OpenCOMAL. This might be the most current effort, last change only 4 years ago:
https://github.com/poldy/OpenCOMAL


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 30 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 29 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: