News for hackers. Stuff that matters.
Re:Machine Code Isn't Scary by a_cardboard_box on Wednesday June 04, 2025 @12:17PM (#44182362)
> I once, for a side gig, had to write a 16-bit long-division routine on a processor with only one 8-bit accumulator. That was the point at which I declared that I'd never write another assembly program.

This is exactly the kind of job I'd enjoy! A perfectly doable technical challenge with clear requirements. Some people like solving Sudoku puzzles, I like solving programming puzzles.

I guess I'm just not "the overwhelming majority of programmers".

Re:Machine Code Isn't Scary by HeyLaughingBoy on Wednesday June 04, 2025 @01:22PM (#44183159)
> doable technical challenge with clear requirements

That's a Project Management issue, not an implementation concern.

In my case, there was no requirement that said "use 16-bit long division." However, we had committed to a particular processor family (MC68HC05), and the calculation precision required 16-bit math. IIRC, there was a compiler available, but it cost more than the rest of the project and the code it produced wouldn't have fit into the variant of the processor that I was using anyway.

The actual requirement would have looked more like "detect a 0.1% decrease in signal that persists for 10 seconds, then do X."

Re:Machine Code Isn't Scary by Animats on Wednesday June 04, 2025 @04:37PM (#44185222)
Oh, yes, that era. I had to program a MC68HC11 in Forth because the C compiler was so expensive.
Re:Machine Code Isn't Scary by markus_zhang on Wednesday June 04, 2025 @06:59PM (#44186479)
Man what a blast!
Re:Machine Code Isn't Scary by favorited on Wednesday June 04, 2025 @03:05PM (#44184312)
I think the majority of programmers would enjoy it, but most would first need to pick an ISA (something older is probably going to be more approachable for beginners), learn enough about it to understand basic arithmetic instructions, learn enough about the dev tools to be able to assemble, link, and execute their code, etc.

For most folks, that's going to be a couple days of prep work before they can get to the fun part of solving the puzzle.

Re:Machine Code Isn't Scary by commandlinefan on Wednesday June 04, 2025 @03:04PM (#44184301)
> the kind of job I'd enjoy

I feel the same way, but I also can't help but imagine the boss jumping up and down and throwing chairs and screaming "how can you not be done yet? You're a programmer and this is a program and it's been three _hours_ already".

Re:Machine Code Isn't Scary by markus_zhang on Wednesday June 04, 2025 @01:10PM (#44183004)
I totally agree. I read and commented the source code of Woz's SWEET16 and it was a blast to fully understand it.

But of course, might not be that rosy if under great time constraints.

Re:Machine Code Isn't Scary by 1vuio0pswjnm7 on Wednesday June 04, 2025 @03:16PM (#44184421)
"I guess I'm just not the "overwhelming majority of programmers"."

The "overwhelming" majority of programmers may be underwhelming

Some readers may be unimpressed by programmers who complain about and criticise assembly language, e.g., claiming it offers "no benefit" to others, especially when no one is forcing these programmers to use it