News for hackers. Stuff that matters.
Re:KolibriOS – operating system written entirely in assembly... by wiz21c on Wednesday April 15, 2020 @08:01AM (#22876714)
>> I think one element of writing ASM by hand is the programmer subliminally changes the algorithm to be 'simpler' to write.

I strongly disagree :-)

My experience is that optimizing assembler leads to reorganize your code or even your algorithm into a form that you'll CPU will be most efficient at executing which almost always translate to unbelievably intricate, super hard to modify code. I've done stuff on 6502, 80x86, MMX and the assembly parts, optimized for speed and ended up with impossibly tricky code. Worst, sometimes I have to adapt my data structures to allow optimization, which becomes even tougher. So, I prefer to leave assembly code at the "onyl if necessary" level

But now, to be honest, optimizing assembly code is incredibly satisfying to me :-) I've got the feeling to use a CPU to its maximum capacity. Also, using assembly comes after thorough algorithmic study. So once I'm at the ASM level, I've maxed out my own capabilities ! How happy me !

So if you have the chance to do that, just give it a try !

Re:KolibriOS – operating system written entirely in assembly... by arghwhat on Wednesday April 15, 2020 @08:23AM (#22876866)
I suspect that this occurs for you exactly because you're aiming for optimization. This can happen in any language, really.

I'd assume that when you maintain larger codebases (i.e. full OS and application suite), that you start writing practical and maintainable code instead.

Re:KolibriOS – operating system written entirely in assembly... by wiz21c on Wednesday April 15, 2020 @12:40PM (#22879853)
ahhh I'm biased. Your analysis is right :-)

But even so, I'd say that ASM doesn't help. Clumsy code in ASM is worse than clumsy code in high-level language :-)

Re:KolibriOS – operating system written entirely in assembly... by fouc on Wednesday April 15, 2020 @10:14PM (#22885402)
If you write assembler in a maintainable way, do you still gain lots of benefits over a compiler?