Look at old code that was originally written in a simpler assembly language. Original NES games are great for this.
Justin Foster
>OP pic isn't a cute girl, or contains the word meme Say hi to page 10 for me pal
Grayson Price
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?
Alexander Hernandez
Pretty fucking sad how true this is...
Lincoln Reyes
Learn 6502 , Z81 or 68K ASM Old CISC are simpler to work with.
Asher Lopez
*Z80
Josiah Rogers
Bump for wanting to learn this too but not knowing where to start.
John Myers
How do I actually assemble MIPS assembly? All of the tutorials I'm finding online use emulators
Adrian Perry
just quit gee and visit lainchan desu
Xavier Ward
Write a program in c.
Compile to asm.
Read asm.
Change c program.
Recompile.
See what's changed.
Repeat, tweak, make your own, RTFM
Luis Ortiz
Yes. And Google source, pretty sure even Mario source is available
Joseph Williams
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.
Ethan Kelly
buy a copy of the IntelĀ® 64 and IA-32 Architectures Software Developer Manual and read all 3762 pages of it cover-to-cover
Aaron Phillips
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.
Jeremiah Murphy
this is the only way desu.
Dominic Anderson
>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.
Grayson Sanders
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
Lucas Williams
Why assemble it tho? You gonna whip out your n64 or something?
Adam Butler
Starr with something simple, like a C compiler.
Isaiah Ward
/thread
Caleb Thomas
What is even the point of learning assembly. We invented higher level languages for a reason.
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.
Hudson Gray
What is the point of anything in life? You're just going to die anyway.
Camden Perez
>Not using the catalogue exclusively
Justin Morgan
>implying pages don't exist when you use the catalog They're just not clearly visually defined
Cooper Young
this desu
Hunter Jackson
I learned MIPS in my computer systems class it was pretty easy I guess
Landon Perry
read that text book and do its assignments.
Alexander Turner
Are you being serious? So you can understand the optimization and underlying processes of those higher level languages
Colton Gutierrez
Fun.
Lincoln Cook
>3762 pages Fucking hell. I have problems with reading to begin with, that would take me forever to read.
Hunter Torres
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.
Logan Gutierrez
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.
Justin Parker
so you can make super efficient programs also because it's fun to mess with low level stuff
Alexander Anderson
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.
Anthony Hughes
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.
Justin Anderson
It has a cute spiral tho
Ethan Lewis
/thread
Dylan Bell
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
Asher Allen
>try to learn assembly >get to interrupts i give up
Brandon Sullivan
6502 is RISC though
possibly one of the first of that kind too
Michael Butler
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
Jordan Lewis
>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