Assume a basic x86 PC (or if it is impossible due to locked access/firmware blobs etc assume the closest modern equivalent of a PC e.g an open RISC system with cpu ram hardrive and a way to interface with a keyboard mouse and a VGA/HDMI monitor)

NO OS is present.

input could be serial/parallel port keyboard floppy CDROM or even more low level ways e.g pads/jatags on the CPU/mobo if needed/applicable)

How would it be possible to enter raw binary (ones and zeroes) to it in order to compile a basic assembler for it from scratch without using any existing programming languages including existing assembly languages.

Recommended Answers

All 2 Replies

Given some way to set memory bytes, then it's totally possible. I did something like that with an IBM System 7 process control machine when we were preparing low-level software around 1970 in preparation for the first hardware shipments. It didn't even have an assembler at that time, so I hacked one together in APL and punched the resulting binary onto paper tape. We then set the hardware to read the contents of the tape verbatim into memory starting at address 0 then start executing at address 0.

So all you need to do is to write the necessary minimum code in an assembly-like language and compile it by hand into binary for input to the hardware.
The main (only?) problem I see is that, where you could do something useful on a System 7 in a few kilobytes, you will need megabyte upon megabyte of code for x86 class machine. With zero transcription errors.
Good luck. Maybe your children and grandchildren will be able to take over and finish it for you.

There is a developer on the OSDev forum, David Cooper, who managed to do something like this for his OS project, though I am pretty sure he started off cross-developing his toolkit. He created what he describes as a sophisticated suite for editing code in hex, though presumably if you really wanted to you could do it in binary.

He's a bit of a crank, but that's true of everyone on that forum, myself included.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.