Re: Bare-Metal Programming



On Jan 15, 1:01 am, 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?

Possibly. At IBM San Jose where the 1401 was manufactured, perhaps an
engineer did this circa 1958 (the 1401 was introduced around this
time).

According to a spiritual mentor who worked for IBM in the 1950s and
also for an American railroad in data processing, much of the work in
the early days was, under the cover, work on various forms of special-
purpose compilers and assemblers which accepted the user's
requirements in an encoded form and translated/interpreted it...rather
than blindly coding user requests. An anecdote in Gerald Weinberg's
book, The Psychology of Computer Programming, relates the story of a
programmer in the American auto industry who replaced a nonworking
mess of a program meant to test whether customer requests for features
were consistent with a table-driven solution, but this makes this
sound like the "linguistic turn" in programming, where you develop a
language to solve the problem and then solve it in your own language,
was the exception. For successful projects then and now, it may be the
rule.

On a modern computer is it even possible to hand-code a binary file
and execute it?

Thanks!

-Scott- Hide quoted text -

- Show quoted text -

.