News for hackers. Stuff that matters.
Re:x86 assembly doesn’t have to be scary (2018) by pjc50 on Thursday October 07, 2021 @08:46AM (#28785505)
It's "scary" on almost every architecture because there's no fault tolerance, recovery, exception handling, or reporting. If you make a mistake you get to reassemble the smashed plate of your memory image in order to work out what happened - assuming you can get at it at all. Some platforms will just reboot on you.
Re:x86 assembly doesn’t have to be scary (2018) by flohofwoe on Thursday October 07, 2021 @09:03AM (#28785684)
Hmm, I don't agree, stepping through assembly code in most (C/C++) debuggers works just as well as with high level languages, and process isolation in operating systems also works for assembly coding, so it's just as unlikely to crash the whole computer with assembly code as with high level languages (otherwise we'd have a massive problem if operating system security would just depend on banning low level programming).

Bare metal embedded coding is a different topic of course, but regular application development with assembly works just fine.

Re:x86 assembly doesn’t have to be scary (2018) by pjc50 on Thursday October 07, 2021 @10:54AM (#28787103)
Inline assembly is certainly the least scary case and may be the easiest to get started with. But the original article targets the 16-bit DOS platform as a bootloader, where is "is" the operating system and you have no help.
Re:x86 assembly doesn’t have to be scary (2018) by secondcoming on Thursday October 07, 2021 @09:11AM (#28785760)
In our codebase, we used inline asm twice; for 'pause' and 'rdtscp'. Even then we replaced that with intrinsics later.

'Regular applications' that use inline asm should really be raising eyebrows.

Re:x86 assembly doesn’t have to be scary (2018) by flohofwoe on Thursday October 07, 2021 @09:16AM (#28785801)
Sure, that's the case today, but in the 80's and early 90's it wasn't all that uncommon to write big applications completely in assembly code. With a proper macro assembler and IDE-like coding environment that wasn't as bad as it sounds today. The focus has just shifted away from assembly programming to high-level languages, and the tools moved along. At least reading assembly code is still important today though.
Re:x86 assembly doesn’t have to be scary (2018) by ajsnigrutin on Thursday October 07, 2021 @09:47AM (#28786185)
yep

https://en.wikipedia.org/wiki/RollerCoaster_Tycoon_(video_ga...

> The game was developed in a small village near Dunblane over the course of two years.[2][5] Sawyer wrote 99% of the code for RollerCoaster Tycoon in x86 assembly language, with the remaining one percent written in C.[3]

Re:x86 assembly doesn’t have to be scary (2018) by kingcharles on Friday October 08, 2021 @12:34PM (#28801182)
Even into the late 90s 2D PC games were being written with large chunks of assembler. 3D APIs killed that. I'm sure there were huge slabs of machine code in console games until the early 2000s, especially systems that needed a lot of specialized code to fully exploit them, e.g. PlayStation 2.