Re: Bare-Metal Programming
- From: Ed Prochak <edprochak@xxxxxxxxx>
- Date: Mon, 14 Jan 2008 09:35:25 -0800 (PST)
On Jan 14, 12:01 pm, Scottman <FonzoC...@xxxxxxxxx> wrote:
On Jan 14, 11:22 am, spinoza1111 <spinoza1...@xxxxxxxxx> wrote:
On Jan 14, 8:49 pm, Scottman <FonzoC...@xxxxxxxxx> wrote:
If I had a bare system without any OS and the CPU's instruction set,
how would I issue binary commands directly, or create a binary file to
execute? I am not suggesting that I need to do this, but I am
wondering, fundamentally, how the first OS was written, the first
assembler, etc.
Thanks!
Cheers,
Scott Nelson
On my first system, the IBM 1401 in 1971, all programs were on cards.
The first card was loaded into a fixed memory location (001) by
pressing a console button which formatted that location with a "word
mark", an extra bit which indicated the start of an instruction.
The loaded instructions had to format the subsequent bytes in the area
001-080 with word marks and then read the remaining punched card deck,
and they had to do so in 80 (six-bit) bytes.
Some programs, however, fit on one card. IBM supplied one-card
programs to read and print and read and punch a deck. I believe it was
I, however, who wrote, for my installation a combined program to both
read and punch a deck.
So in regard to the first assembler ever written- was it machine coded
on one of these punch cards and loading into memory where it could be
run? Once this was accomplished were punch cards slowly replaced by
assembly code?
On a modern computer is it even possible to hand-code a binary file
and execute it?
Thanks!
-Scott
Sure it's possible...
... for certain definitions of "modern computer". 8^)
Writing the program is the easy part. Running it is harder nowadays.
Assuming you mean a PC class machine or better, you at least need to
load the program onto a floppy or CD in the boot sector to get the
BIOS program to load it. I don't know of any PC BIOS that allows
direct access to RAM from the keyboard or other device. (but I haven't
exactly try to look for this feature).
for some embedded systems, you just need to load the program into a
ROM and plug that into the board, supply power and away you go.
HTH,
ed
.
- Follow-Ups:
- Re: Bare-Metal Programming
- From: spinoza1111
- Re: Bare-Metal Programming
- From: kwikius
- Re: Bare-Metal Programming
- References:
- Bare-Metal Programming
- From: Scottman
- Re: Bare-Metal Programming
- From: spinoza1111
- Re: Bare-Metal Programming
- From: Scottman
- Bare-Metal Programming
- Prev by Date: Re: Kernighan Scum project status announcement from spinoza1111
- Next by Date: Re: Article on Herbert Schildt, author of C Unleashed, repaired on wikipedia
- Previous by thread: Re: Bare-Metal Programming
- Next by thread: Re: Bare-Metal Programming
- Index(es):