Who /assembly/ here? I've been wanting to learn it now that I'm well versed in C

Who /assembly/ here? I've been wanting to learn it now that I'm well versed in C.

I've downloaded a few manuals but it's a pretty damn daunting language to learn. Anyone who's skilled in it have any advice where to start?

Pic related as it's the manual I'm using.

Other urls found in this thread:

pacman128.github.io/pcasm/
myredditnudes.com/
twitter.com/NSFWRedditGif

Look at old code that was originally written in a simpler assembly language. Original NES games are great for this.

>OP pic isn't a cute girl, or contains the word meme
Say hi to page 10 for me pal

Will many of the skills learned from using those examples translate over well to programming on a modern architecture? Also is there a good centralized place to find the source from old games?

Pretty fucking sad how true this is...

Learn 6502 , Z81 or 68K ASM
Old CISC are simpler to work with.

*Z80

Bump for wanting to learn this too but not knowing where to start.

How do I actually assemble MIPS assembly? All of the tutorials I'm finding online use emulators

just quit gee and visit lainchan desu

Write a program in c.

Compile to asm.

Read asm.

Change c program.

Recompile.

See what's changed.

Repeat, tweak, make your own, RTFM

Yes. And Google source, pretty sure even Mario source is available

One of the main problems with learning x86 is that all the manuals are 15 years old. A book that helped me first get started was "Programming from the Ground Up"

But that book requires you to have a Linux machine and uses the horrible GAS/AT&T assembly syntax. Additionally it was written for 32 bit machines so you'll need to change some of the code to make it run on a 64 bit machine.

I could explain a few things if you're confused about anything specific.

buy a copy of the IntelĀ® 64 and IA-32 Architectures Software Developer Manual and read all 3762 pages of it cover-to-cover

Assembly language itself is very easy, it's just hard to read when you have to make something more than hello world with such basic instructions.

Just read about registers, stack, and basic arithmetic instructions and mov instruction (assuming you are learning x86 assembly), to understand how data is moved to registers from stack and the other way around.

Pretty much all online assemblers will let you write instructions to (virtually) instruct the bios to write text to screen or colors; which is easier in assembly than C.

this is the only way desu.

>One of the main problems with learning x86 is that all the manuals are 15 years old.

Somehow OP found one that was 2 years old.

it's a pain in the ass. Start off easy on something like Motorola 68k assembly. You can find emulators online.

Modern assembly, like the stuff Intel uses, is very close to C

Why assemble it tho? You gonna whip out your n64 or something?

Starr with something simple, like a C compiler.

/thread

What is even the point of learning assembly. We invented higher level languages for a reason.

Check out pacman128.github.io/pcasm/ it is very good

As you know C just use the compiler switch with whatever compiler you use to save the assembly output. Start with just returning a number to the OS, then printing a hello world, etc. look at how it is done in asm. change some things and compile from the asm source and see how things change.

assembly is mostly simple, it is just fucking long to do even the most simple of things. when you get into SIMD and other complex things it gets crazy difficult but desu you are better off avoiding doing that in asm anyway as compilers these days will produce better code than you will unless you become an expert in very specific cpu optimisation paths.

What is the point of anything in life? You're just going to die anyway.

>Not using the catalogue exclusively

>implying pages don't exist when you use the catalog
They're just not clearly visually defined

this desu

I learned MIPS in my computer systems class it was pretty easy I guess

read that text book and do its assignments.

Are you being serious? So you can understand the optimization and underlying processes of those higher level languages

Fun.

>3762 pages
Fucking hell. I have problems with reading to begin with, that would take me forever to read.

Read about opcodes, adresses, registers, etc., and read about Turing machines, algorithms, an CS theories etc. Assemblers are closely tied to the system so porting code will be difficult.

Thanks for all the advice guys. Like others have mentioned, I want to learn asm because I'd like to have a deeper understanding of how those higher level languages actually work. Plus working at such a low level must be wonders for optimization albeit at the expense of simplicity.

so you can make super efficient programs
also because it's fun to mess with low level stuff

Well even in the 8080/Z80 and CP/M days, they used top-down structured programming design, and separated code into small logical routines.
That's the only way to not get overwhelmed: break down the problem into small pieces, and try to re-use existing components.
They even published books those days full of code listings for common asm routines.

I can only speak for myself, but one of the reasons I am wanting to learn arm 7 assembly is because the high language compilers are limited to only half of the memory of my targeted device.

It has a cute spiral tho

/thread

Thrcompiler is likely to optimize 10x better than you any day of the week
Hat said, you do learn a lot about what xomouters actually do,in several ways

>try to learn assembly
>get to interrupts
i give up

6502 is RISC though

possibly one of the first of that kind too

If you're intimidated by x64 instructions, you could always try MIPS instructions instead to get the feel of it.

MIPS is the instruction set we learned in my senior level computer architecture courses because it's very logically designed. Hennessy and Patterson are the authors of MIPS, and they're the authors of the textbooks we used.

IMHO MIPS is nicer to learn and use than x64 and even though it's not used nearly as much as x64, it gives you a really good grasp on writing assembly code so that you can feel confident approaching more complicated and intimidating instruction sets like Intel's

>Old CISC are simpler to work with.
This
CISC in general is so much simpler, RISC is a nightmare if you're used to working with CISC. RISC makes you do everything by hand