Fwd: Structured basic source code

13 views
Skip to first unread message

cro memcos

unread,
Jun 3, 2024, 7:47:29 PMJun 3
to crom...@googlegroups.com
Can anybody help Christos?   


Hello from Athens in Greece


I need the source code of Cromemco Structured basic

for 68040 unix or dnix

I have many applications written in this awesome programming language


I want to compile it to run under linux...


I would appreciate very much if you could help


Thanking you in advance

Christos Michail

Software engineer



Roger Hanscom

unread,
Jun 4, 2024, 3:48:22 PMJun 4
to crom...@googlegroups.com
I too would love to see the source code for Cromemco Structured BASIC,  but I'm pretty sure that it doesn't exist?

Roger
 

Richard Muse

unread,
Jun 4, 2024, 4:05:08 PMJun 4
to crom...@googlegroups.com

I second that. I know Systems Atlanta had source to Z80 Structured Basic in the 80's. They extended it and also created a PCdos version of it. I have patched the 68000 version of Structured Basic to run on the XXU but under 40.xx Cromix, not unix. I patched the executable but don't have source.

Richard M

--
You received this message because you are subscribed to the Google Groups "Cromemco" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cromemco+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cromemco/CAJF4YRtSUJOx5_8pcLTyWCqqePeKm4TTLmJrRpQ%3DjOK5WemQEw%40mail.gmail.com.

Bill Mahoney

unread,
Jun 4, 2024, 4:57:09 PMJun 4
to crom...@googlegroups.com

Quick question. What IS available? I see from Richard that there are executables, one for 68040 Cromix, one for PCdos. Is there any language documentation like old scanned PDFs or whatnot? 

Asking because I teach the malware analysis in our cyber program so I am very familiar with reverse engineering (e.g. my stab at RDOS 3.12), including recreating rough C code.

Bill M



Mike Stein

unread,
Jun 4, 2024, 6:12:26 PMJun 4
to crom...@googlegroups.com, rlm...@gmail.com
Wow; I'm impressed!

What did you have to patch, why, and how? And what version was your base?

m
> To view this discussion on the web visit https://groups.google.com/d/msgid/cromemco/304c869e-9bd6-4518-a4cf-fb3366f48e41%40gmail.com.

Richard Muse

unread,
Jun 4, 2024, 7:52:45 PMJun 4
to Mike Stein, crom...@googlegroups.com
Hi Mike,

Why:

The move_from_sr instruction is unprivileged in the 68000 but is
privileged in 68010 and above processors. move_from_ccr was added to the
68010 and above to handle this issue. The sr instruction is used in 68k
Structured Basic V 1.05 as well as 2.01 which were written for the 68000
and so, compiled with a compiler that used the sr instruction. 20.xx,
30.xx and 31.xx series cromix trap the error generated by the 68010 and
substitute move_from_ccr when it is encountered. 40 series Cromix does
not substitute, even though the 68020 traps on the move_from_sr in user
mode. This caused 68k basic to error and crash on the XXU.

How:

I used ddt to identify the instruction that was causing the crash and
then searched for everyplace the instruction was used and swapped the
move_from_ccr in place of the move_from_sr instruction. The
move_from_ccr instruction does not exist in the 68000 processor.

What Version:

I patched version 2.01. And renamed it Cromemco 68020 Structured Basic
version 02.10

I have to add that 30.xx and above Cromix, including 40.xx, does
something different with the get a character instruction because 30.xx
hangs when Basic checks for an escape which it does at some frequency if
"noesc" is not set.  The os does not fall through if there are no
characters in the buffer like 20.xx does. By hang, I mean you have to
hit a key for the program to continue. This also happens if you list a
program to the screen with esc enabled. But, if you just set "noesc" at
the beginning of a program this isn't a problem.

I still have to figure that out. I've looked through the Cromix 31.05
source code but the character handling is a little convoluted, at least
to me, so it's taking a bit. The 20.xx kernel uses the Z-80 code and
doesn't have the issue.

Richard M

Richard Muse

unread,
Jun 4, 2024, 8:14:52 PMJun 4
to crom...@googlegroups.com

There is full 68000 Structured programming Documentation in Marcus github Repo.  m/cromemco/software/basic/Structured BASIC Instruction Manual 023-4083 REVA 198410.pdf

He also has the Z-80 32K Structured basic docs.

Richard M

William Mahoney

unread,
Jun 5, 2024, 11:38:27 AMJun 5
to crom...@googlegroups.com

What I am wondering is whether an approach might be to just create a new compiler based on the official grammar for Structured Basic. If it compiled to LLVM (https://llvm.org/) all the machine code generation would be done already. I’ll take a look at the doc’s and see if there is an actual grammar (in BNF for example). Is there interest above/beyond Christos for a project like that?

Bill


On Jun 4, 2024, at 7:14 PM, Richard Muse <rlm...@gmail.com> wrote:

Caution: Non-NU Email

Reply all
Reply to author
Forward
0 new messages