News for hackers. Stuff that matters.
Re:The Art of Assembly Language Programming (1996) by imiric on Sunday March 06, 2022 @04:02PM (#30581230)
Would this still be relevant/approachable for a beginner coming from higher level languages, or is there a more modern resource for learning assembly that would be better suited?

I guess most of it is still relevant, but I'd rather not deal with DOS to follow along, and would prefer working on Linux.

Also, the x86 instruction set seems daunting to pick up for a beginner. Would it be better learning on a 4/8-bit or toy machine first?

Re:The Art of Assembly Language Programming (1996) by pedrolins on Sunday March 06, 2022 @04:17PM (#30581352)
I’m not an assembly programmer, but I’ve learned assembly as part of introductory CS courses (computer architecture classes) and the approachable alternative you’re looking for is the assembly language of a RISC architecture such as ARM, MIPS, or RISC-V. I’d recommend learning the latter because of how approachable it is.
Re:The Art of Assembly Language Programming (1996) by Gene_Parmesan on Sunday March 06, 2022 @04:16PM (#30581346)
I found the book "Programming From the Ground Up" to be a pretty good intro to programming in x86, and importantly, more recent than this text. I had to do just a tiny bit of research to find out how to get my shell to emulate 32 bit mode, since it's x86 and not x86-64, but it is in fact Linux based. I imagine it'd be an order of magnitude easier than trying to figure out a DOS setup.

The full x86 ISA is daunting, I'm sure, but for a beginner looking to get a sense of what asm is, you don't engage with the entirety of the ISA. The PFTGU text is great specifically because it assumes an audience of beginners who want to learn the basics of how asm operates to enable core programming concepts. It's not aiming to be exhaustive like the linked text.

Edit: And also importantly, it's also (legitimately) available for free online.

Re:The Art of Assembly Language Programming (1996) by Shosty123 on Sunday March 06, 2022 @05:42PM (#30582026)
There's a new version of that book. Same author:

https://link.springer.com/book/10.1007/978-1-4842-7437-8

Re:The Art of Assembly Language Programming (1996) by spc476 on Sunday March 06, 2022 @06:35PM (#30582369)
To get a feel for assembly, then yes, any 8-bit CPU would be a good choice. The 8080, Z80, 6502 or 6809. There are plenty of emulated machines today, tons of material are available online, and even cross assemblers that run on modern machines to make development easier. The base concepts will carry over.

The x86 instruction set is daunting and it can appear quite arbitrary unless one knows the near 50 years of historical baggage it carries along with it. But I think if you have some experience with an 8-bit CPU, plus just kind of accept the weirdness of it, it's not that bad (especially the 64-bit stuff, which in a way, is simpler, even if half the registers are named, and half are numbered).

Re:The Art of Assembly Language Programming (1996) by xupybd on Sunday March 06, 2022 @05:01PM (#30581724)
The 8051 microcontroller is pretty easy to learn. I'd recommend that as a starter on assembly. But if you want to end up playing with x86 why not start there.
Re:The Art of Assembly Language Programming (1996) by userbinator on Sunday March 06, 2022 @04:52PM (#30581642)
If you want to start small, Z80 might be a good point, but it seems opposed to your not wanting to start with DOS; a small VM will be very useful, and with Asm you'll soon discover that even 64k is plenty to play with.
Re:The Art of Assembly Language Programming (1996) by msla on Sunday March 06, 2022 @06:25PM (#30582307)
> Also, the x86 instruction set seems daunting to pick up for a beginner. Would it be better learning on a 4/8-bit or toy machine first?

The x86 instruction set isn't daunting, the 16-bit x86 memory model is, speaking as someone who learned x86 assembly at a young age. It is easier to work on Linux, because segmentation is a non-issue and you have a flat address space.

Re:The Art of Assembly Language Programming (1996) by userbinator on Sunday March 06, 2022 @07:37PM (#30582773)
Segmentation is also a non-issue if you stay within a single segment. Especially if you're writing in Asm and just starting out, even 64k is a lot. A "hello world" has less than a dozen bytes of executable code. The majority of the standard commands in DOS are <64k binaries.
Re:The Art of Assembly Language Programming (1996) by spc476 on Sunday March 06, 2022 @08:38PM (#30583224)
It's also not much of an issue if you split code and data, each being 64K in size.
Re:The Art of Assembly Language Programming (1996) by shadowofneptune on Sunday March 06, 2022 @08:24PM (#30583113)
Is segmentation really that bad? With an assembler you have direct control of which segment is being used. It's unlikely a hobby project will span more than 64k. Even if it does, for a lot of projects the individual data structures are small enough to split between segments.
Re:The Art of Assembly Language Programming (1996) by spc476 on Sunday March 06, 2022 @08:36PM (#30583207)
It only becomes an issue of have a data structure that can exceed 64K in size, or multiple structures, who aggregate size is greater than 64k in size. Then you have to deal with so called FAR pointers.