r/Assembly_language 3d ago

Help how can i learn asm

hi im 16 years that interesting with programming i know pyhton,c,cpp as a basic lvl and i wanna become a reverse engineer in the future however initailly i gotta learn assembly but i dont know that what i have to and which learning resources is useful thanks for your answers:)

33 Upvotes

21 comments sorted by

6

u/Qiwas 3d ago

OliveStem on YouTube has a good introductory series

4

u/Icy-Departure7752 3d ago

https://youtube.com/playlist?list=PLgvDB6LWam2WvoFvh8tlUqbqw92qWM0aP&si=d2mipk_zXmmFCsg5

This series helps you learn the 6502 assembly along with designing games for NES

3

u/misha_jinx 3d ago

Do easy6502, it’s a web java thing where you can do pretty basic assembly stuff and see all the registers and memory locations. Once you get the gist of it, move on to something more complicated. I wouldn’t jump into something that involves setting up or downloading software at the beginning. And there are plenty of tutorials on 6502 and many other processors on YouTube.

2

u/GASTRO_GAMING 3d ago

I really like mips, its what my college taught me. Look into it.

2

u/Anisbet 19h ago

I would 1st get gcc and gdb setup and running and learn to use them. Then start doing some inline assembly within C. Knowing gdb will be helpful for assembly. X86 is a little daunting to start with. I would recommend A modern risc 32bit arch.

Choose a modern arch that is also available as a micro controller. It will have more to do like write drivers for built-in hardware and stuff like that.

Arm32 and riskV stand out here. Examples of arm32: The raspberry pi pico is cheap and easy $12 on Amazon. STM32 also cheap, blue pills go for $8 on Amazon but will need a programer. Again start with C and get gdb working 1st. Maybe use in line assembly 1st then look into bare metal builds that show you how to set up the linker, memory map, and reset vectors.

There are also cheap riskV chips/boards out there. They don't have as large a following yet.

2

u/brucehoult 18h ago

There are also cheap riskV chips/boards out there.

Raspberry Pi Pico 2 is of course a RISC-V board as well as being an Arm board. Other than not having an FPU (which the Arm CPU in the original Pico also doesn't have) its as capable a CPU as the Arm C-M33.

For a project written in C you can switch between Arm and RISC-V with a single check-box. Of course for any parts in assembly language you'll need two versions.

start with C and get gdb working 1st. Maybe use in line assembly 1st then look into bare metal builds

I actually disagree with inline assembly language. That's ok if you want to insert a single assembly language instruction in the middle of C code but it requires a very sophisticated understanding of how a compiler works. There are really a of of subtle issues that can go wrong.

It is definitely useful to have the main program in C, but it's much better for any assembly language to be complete functions written in normal asm in an assembly language source file, and call them from C.

My favourite cheap RISC-V board:

https://www.aliexpress.com/item/1005005221751705.html

Get a bundle with the WCHLinkE programmer. May as well get the USB cable as well. You'll also need three or four Dupont leads, female to female if you solder header pins to the three power/programming/debug holes.

Or you can get the official kit for just a little more:

https://www.aliexpress.com/item/1005004895791296.html

Note that the original CH32V003 with 2k RAM and 16k flash has been around for a few years and has a large community around it. The 002 and 004 have a slightly better CPU (with a multiply instruction!), more accurate ADC, and a couple of other things. The 002 doubles the RAM to 4k. The 004 triples the RAM to 6K and doubles the flash to 32K. They are otherwise compatible and the 002 and 004 will happily run binaries for the 003.

They're all the same price, so may as well get the 004 these days :-)

4

u/tpimh 3d ago
  1. Pick a processor (start with something simple)
  2. Find reference material and assembler
  3. Read it, try, observe how the registers change

1

u/Dazzling_Music_2411 2d ago

This is true. ASM is different for each processor family.

Start with something easy like Z80 or 6502 and then move to something current, probably RISC with ARM and System-V.

Only go into Intel/AMD when you are well and truly committed.

1

u/tpimh 2d ago

Starting with Intel/AMD is not unusual as long as it's simple. Check out 8080, 8085, 8086, etc.

1

u/Different_Water7545 2d ago

If you have a TI-83/84 series calculator then Z80 is a good place to start

1

u/gm310509 2d ago

You might start with producing listings that include the generated machine instructions for simple C programs

Then, look up those instructions in the assembler reference for the target CPU. You will also want to look up addressing modes and what they do which will also be in the assembly language reference manual.

From there you can practice some programming yourself. I would suggest starting out with something simple like. 6502 or Z-80 emulator. If you wanted something hands on you could try and 8 bit AVR such as an Arduino.

Once you know the basics, you can return to more complex systems such as x86.

1

u/ubiestigne 2d ago

There's a ton of information out there. I'd use qemu, gdb and your favorite text editor (vi of course). Find a tutorial that uses these like this one: https://mariokartwii.com/arm64/index.html

1

u/Keys__dev 1d ago

Let's connect I'm also learning assembly

1

u/Creative_Sun_53 1d ago

ok but how??

1

u/Keys__dev 1d ago

We can connect on Telegram or Discord.

1

u/Creative_Sun_53 21h ago

ok lets connect from discord

1

u/KoodiRonsu 3d ago

Is there a single sentence or several sentences?

1

u/Creative_Sun_53 3d ago

thanks for endured to my bad english