News for hackers. Stuff that matters.
Re:Ask HN: How did people code entire machine language progr... by JohnFen on Thursday August 29, 2024 @09:56AM (#41390873)
As someone who did this a lot on various machines back in the day, I'm tempted to say "very carefully and methodically" (which is the truth). The more complete answer is what PaulHoule said. It's called "hand assembly".

In any case, none of this was particularly difficult or unusual, just a bit tedious. At least, the part where you enter hex codes is.

Even more fun was before microcomputers. On a few minicomputers and mainframes, you would occasionally have to enter short programs in binary using switches on the front panel.

Re:Ask HN: How did people code entire machine language progr... by amichail on Thursday August 29, 2024 @10:03AM (#41390941)
Don't you need to put padding everywhere so that you can edit the code without having to rewrite everything from scratch?
Re:Ask HN: How did people code entire machine language progr... by JohnFen on Thursday August 29, 2024 @10:25AM (#41391155)
During hand assembly? What I'd do is use graph paper and leave some rows blank in case I'd need to add stuff, and would occasionally redo specific pages if I ran out of room, or if I needed to make changes that were complex enough that marking them up would lead to an unreadable mess of scribbles.

But the hand assembly part was close to the end of the process. Initially, I'd just write assembly on normal paper and not worry about converting anything to op codes until I considered the program complete enough to assemble and try running it. During that initial phase, I wouldn't worry about leaving space or anything because it was all going to be rewritten multiple times anyway.

Re:Ask HN: How did people code entire machine language progr... by amichail on Thursday August 29, 2024 @10:44AM (#41391323)
I saw someone code directly on the hex dump without using paper.
Re:Ask HN: How did people code entire machine language progr... by JohnFen on Thursday August 29, 2024 @10:56AM (#41391449)
Yes, I've known people who did that as well. Anyone can do it with simple programs and enough experience with the task, but some could do that with complex programs. They could even read hex codes directly and disassemble in their minds.

I, like most programmers, never achieved that level of brilliance.

Re:Ask HN: How did people code entire machine language progr... by amichail on Thursday August 29, 2024 @11:10AM (#41391608)
So did they use padding everywhere to make it possible to edit their code later?
Re:Ask HN: How did people code entire machine language progr... by JohnFen on Thursday August 29, 2024 @11:19AM (#41391712)
Not as a rule. They're entering op codes directly into memory. Occasionally they may pad something with a few NOPs, but that was wasting a constrained resource so it was very rare.

What they did was work out the code in their minds before entering anything into the computer.