[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Who /assembly/ here? I've been wanting to learn it now that
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 44
Thread images: 2
File: assemblyTextbook.jpg (42 KB, 377x499) Image search: [Google]
assemblyTextbook.jpg
42 KB, 377x499
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.
>>
>>55544632
Look at old code that was originally written in a simpler assembly language. Original NES games are great for this.
>>
>>55544632
>OP pic isn't a cute girl, or contains the word meme
Say hi to page 10 for me pal
>>
>>55544655

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?
>>
>>55544659

Pretty fucking sad how true this is...
>>
>>55544632
Learn 6502 , Z81 or 68K ASM
Old CISC are simpler to work with.
>>
>>55544758
*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
>>
>>55544715
just quit gee and visit lainchan desu
>>
File: 1459308856466.jpg (293 KB, 1250x1150) Image search: [Google]
1459308856466.jpg
293 KB, 1250x1150
Write a program in c.

Compile to asm.

Read asm.

Change c program.

Recompile.

See what's changed.

Repeat, tweak, make your own, RTFM
>>
>>55544696
Yes. And Google source, pretty sure even Mario source is available
>>
>>55544632
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.
>>
>>55544632
buy a copy of the IntelĀ® 64 and IA-32 Architectures Software Developer Manual and read all 3762 pages of it cover-to-cover
>>
>>55544632
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.
>>
>>55544807
this is the only way desu.
>>
>>55544885
>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.
>>
>>55544632
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
>>
>>55544780
Why assemble it tho? You gonna whip out your n64 or something?
>>
>>55544632
Starr with something simple, like a C compiler.
>>
>>55544807
/thread
>>
>>55544632
What is even the point of learning assembly. We invented higher level languages for a reason.
>>
>>55544632
Check out http://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.
>>
>>55545678
What is the point of anything in life? You're just going to die anyway.
>>
>>55544659
>Not using the catalogue exclusively
>>
>>55545726
>implying pages don't exist when you use the catalog
They're just not clearly visually defined
>>
>>55545707
this desu
>>
I learned MIPS in my computer systems class it was pretty easy I guess
>>
>>55544632
read that text book and do its assignments.
>>
>>55545678
Are you being serious? So you can understand the optimization and underlying processes of those higher level languages
>>
>>55545678

Fun.
>>
>>55544981
>3762 pages
Fucking hell. I have problems with reading to begin with, that would take me forever to read.
>>
>>55544632
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.
>>
>>55545678
so you can make super efficient programs
also because it's fun to mess with low level stuff
>>
>>55545014
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.
>>
>>55545678
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.
>>
>>55544659
It has a cute spiral tho
>>
>>55544807
/thread
>>
>>55547533
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
>>
>>55544758
6502 is RISC though

possibly one of the first of that kind too
>>
>>55544632
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
>>
>>55544758
>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
Thread replies: 44
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.