Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

seven programming languages on one floppy (Developers)

posted by kerravon, Ligao, Free World North, 26.05.2023, 11:07

> https://github.com/xorvoid/sectorc
>
> If it's real, I envisage stepping stones all the way
> from this to the x64 in C code.

Nils, the author of SubC, says:

It is real, but -- unsurprisingly -- it implements a *very* limited
subset of C:

- only int variables
- only void functions of no arguments
- no local variables
- no else in if
- only one level of indirection through int: *(int*)x
- no unary operators except for &
- no operator precedence
- no preprocessor

Bootstrapping something more useful from that will be very
challenging.


But I don't think this is the right thing to put on the
boot sector, and I don't think input should come from
the serial port (which more-or-less requires another
computer to exist).

There were mainframe computers (S360/67) that allowed
you to toggle switches to zap memory, and there were
micros that did it too, like this one:

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

So it had switches and a floppy disk.

Now it is difficult to get the appropriate hardware,
so I think I would like a boot sector that doesn't
do much more than allow you to write a hex value to
memory and then execute it.

And the first thing I would do is have a routine to
zap bytes on sector 0 of the hard disk, so that I
never have to "flick switches" again to get that
boot sector. And after a bit more disk zapping I
could then start entering the hex for the 1-sector
C compiler.

I guess the goal would be that the only data ever
to go ONTO the PC would be that one single flick
switching boot sector, on a floppy image on a
CDROM in El Torito format, but if the code has
been written to do so, you can make a backup
onto another hard disk or whatever for safekeeping.

Try to keep yourself honest.

One more possibility would be to leave the switch
flicking for someone else to do, rewrite Sector C
in Sector C, and then carry that bootstrapping
forward from there.

BFN. Paul.

 

Complete thread:

Back to the forum
Board view  Mix view
22017 Postings in 2030 Threads, 395 registered users, 17 users online (1 registered, 16 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum