32 bit virtual computers remade with

Simula 67 may be interesting regarding I/O. It just has interfaces like INTIN, INTFIX, INREAL and OUTINT, OUTFIX, OUTREAL and INIMAGE, OUTIMAGE to flush buffers. So there’s really not much to implement for a specific implementation. Also, it features full-fledged objects and simulation classes. While Simula 67 isn’t especially available, it may serve as an inspiration.

Why in 1967 we had that in the labs, we are just getting now all the ideas from back then?
(around the year 2000).I guess C is for programs, Fortran for science,Cobol for banking and every thing else for teaching computer science.

An addendum to the above saga of Peter Stephens’ Imp to C converter. I said the grammar file had got out of synch with the code, and that we didn’t have the input to the grammar file that generated the tables used in the code… well, after a lot of hacking and comparing multiple slightly-different grammar files, I was eventually able to create one which generated exactly the same tables as used in the imp to c compiler :slight_smile: This means that any discrepancies between the grammar tables and the code that uses the tables can theoretically be found and fixed now. Unfortunately… the entire system is written in Imp80 and does not compile using our current Imp77 native x86 compiler, so fixing the Imp to C translator will have to wait until a) Bob Eager finishes his Imp80 compiler for 386; or B) John McMullin extends our Imp77 compiler to handle both 16 and 32 bit data and we convert Imp to C from Imp80 to Imp77 (non trivial); or C) I complete my own Imp to C converter! (The latter being somewhat ironic as Peter Stephens’ one will no longer be needed if I do).

2 Likes

Why go C? Fortran IV was the universial high level langage in 1977 :). Do you need a 386, as there
are lots of emulators out now for the older machines. Did you have any strange hardware for imp 80,
like a 68000 based computer, providing you can find parts that would make a good retro project.
Ben.

I feel dumb here but how can a 16 bit machine emulate a 32 bit machine?

You do a 32 bit addition by adding the bottom 16 bits and setting “carry” and then adding-with-carry the top 16 bits. Just like the 8 bit 6502 emulates Woz’s “Sweet 16” in the Apple II ROM.

1 Like

Tindie.com may still be selling a 68010 kit from the Rosco seller.

1 Like

All modern designs seem to be too cheap with I/o.
The IBM PC (1983) had buit in video, two serial ports, printer and two drives or hard disk and
one drive and no USB and a Operating System. Less that that it just a toy for any computer.
There are no operating systems I can think of DOS UNIX PASCAL CP/.M OS/9 (6809) that ran more than 64k code and 64k data from the mid 1980’s. Unix & clones require a MMU and any thing else
was a windows style operating system that used far too much video ram.
Here with my computer design I have 512Kb ram and no clean operating system for it.
(Minix and other OS’s require a C compiler, is some thing I don’t have, and can’t port because
nothing today will self comple to 128k and have structures and floating point)
Ben.

That OS was “DOS” and really - not much better than CP/M.

There were very few (micro) CPUs that supported > 16-bit address bus then, but the 68000 and 32016 were “things” then.

In the late 80’s I worked with folks who had a C compiler for the 32-bit Transputer (Not Inmos) and with that I was a small part of the team who ported Minix to the Transputer. However that system did have 8MB of RAM, Ethernet & SCSI, but it was also the very late 80’s. Note: No MMU.

Linux can run with no MMU on some systems - look for ucLinux if interested.

My own SBC, if you quietly ignore the real CPU and think of the VM that runs on it is a 32-bit system with 512KB of RAM which is capable of running a multi-tasking (although not multi-user) OS - it’s all written in BCPL. (the multi-tasking is done at the VM level, almost like a microcode, and is closely modelled on the Transputer). It has no MMU but it’s very well behaved and has proven to be quite robust when you employ defensive programming techniques. It can compile the BCPL compiler, but as it’s effectively a ~200Khz CPU it’s very slow. The native CPU runs at 16Mhz and is the 65x816 ‘hybrid’ 8/16-bit version of the 6502. It’s a 64K bank type system but my VM (written in native assembler) “linearises” the underlying memory so it’s all transparent to BCPL.

(I recently re-wrote the VM in RISC-V assembler and clock for clock the RV implementation is some 4-40 times faster - a benefit of 32-bit registers and memory)

So what do you need? Well, there is a lot of information over on anycpu.org (which I know you’re a member of) and many other places. Your aim of a C compiler is a good one though, but start small? Get a (cross) macro assembler going for it, then take it from there?

What about SDCC?

http://sdcc.sourceforge.net/

It may never run natively though. Another C compiler is PCC:

http://pcc.ludd.ltu.se/

Do keep us up to date.

-Gordon

2 Likes

Small correction: the IBM PC (1981) had a keyboard input and an audio cassette interface as built-in i/o. Using optional expansion cards you could add a video output, parallel ports, serial ports and floppy disk controllers, as well as memory beyond 64KB.

The IBM PC XT (1983) dropped the audio cassette interface but expanded the onboard memory to 256KB. It also squeezed the slots of the expansion cards closer together to fit 8 instead of 6 slots. The BIOS was patched to allow booting from hard disks, if present.

I think I remember this effort. There were some Australians I hung around with in that era who were running a similar oddball configuration. :slight_smile:

1 Like

I just assume all COMPUTERS have keyboards or a serial port. Tablets, phones and Toasters may or may not have Keyboards,Mice or Internet.

nothing today will self comple to 128k

https://www.fuzix.org targets 128k/64k systems and uses a modified sdcc (GitHub - EtchedPixels/FUZIX: FuzixOS: Because Small Is Beautiful) ?

1 Like

I need to target 128K to 512K systems, as I use 20 bit addressing.
00:RRRR (R)
01:RRRR (R+)
10:RRRR (R+[16…1])
11:##### ( Z [4…1,16…1])
Ben.

Hi Ben,

Have you got an architecture document anywhere that describes the ISA, etc. ?

Cheers,

-Gordon

We (Meiko Scientific) did have a some kit down under and I visited it once - Canberra, I think some government department who were investigating HDTV at the time as our kit could do fancy HD rendering, graphics, “page turns” and so on. I’m not sure it was a self-hosted system - a lot of them were hosted by Suns or VAXes (and latterly with a hacked-together Sparcstation inside the chasis!)

Gordon

1 Like

My ISA keeps changing every other week, as I try things out.

OP R R
OP R (R)
OP R (R+)
OP R (R+#) 16 BIT OFFSET
OP R (#) 20 BIT OFFSET
OP R #  IMMEDIATE
PUSH R
ADDRESSING MODES
DATA unsigned BYTES 8 ,signed SHORT 16 ,LONG 32

This is the current version with the normal ops and branches and memory mapped i/o.
No MMU is planned.
Still juggling little details around in the hardware, and software.
Looks to be early October to get things cleaned up and new front panel designed.
Ben.

3 Likes

Fuzix is not self hosting… yet. That’s one reason I’ve been writing a C compiler, so I can compile ANSI C in 48K of RAM.

4 Likes