[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: assembly.png (68 KB, 1500x1013)
68 KB
68 KB PNG
/g/, where did (You) learn Assembly?
>>
from an NES primer as a freshman in college
learned 65816 from buying a copy of this book: https://archive.org/details/0893037893ProgrammingThe65816
reversed engineered SNES game code that'd i trace, like Super Metroid's decompression routine
then read details of SNES coprocessors that made me aware of things like hazards in deeply pipelined cpu designs that don't discard anything
then designed a simple processor for a computer architecture class
i think my CS program also dabbled in ARM briefly, but i was already wise to assembly
eventually got around to watching 6.004
once you get the hang of it, it's easy to learn any other processor's language. learned Z80 just to reverse engineer GB Tetris's prng
i find assembly relaxing
>>
>>107818149
I didn't because I'm not transgender
>>
>>107818149
Assembly? Is that a new React Framework?
>>
what's the point of registers when you have ram?
>>
>>107818149
university
pdp-11 & IBM 4341
early '80s
>>
>>107818278
Did you mistake Assembly for Rust?
>>
>>107818149
doing it now. it's not hard, just a tremendous fuck around trying to find resources that aren't spending years dicking around in long dead isas that have no fucking purpose outside of hobbying or just inlining for c/c++. x64 is almost exclusively the latter. and even then it's treated like the 36 fucking chambers of shaolin.

basically the whole thing is treated either as hobbyism or inline. no wonder everything is a fucking mess these days.
>>
Turing Complete, 20 dollars on Steam
>>
>>107818395
i'm convinced that x86 and x64 passed some threshold long ago and aren't meant to be programmed by human minds anymore, lest they go insane with how vomit the 50 y.o. architecture has become in terms of readability
>>
>>107818149
Use case for assembler code?
>>
>>107818529
Absolute control over hardware
>>
>>107818297
Registers hold data inside the CPU. They are the inputs for CPU functions and where those functions output to.
>>
>>107818529
If you know what you're doing, in some cases you can get higher performance by hand crafting the assembly over what a compiler puts out.
>>
>>107818149
From the 500 in 1 electronics kit with its single board computer.
>>
File: 1763363565119104.jpg (73 KB, 765x1148)
73 KB
73 KB JPG
>>107818529
Checking the FLAGS register.
Reverse engineering
Intentionally writing your program in a way that's very hard to reverse engineer
Optimizing in weird cases where the compiler won't know what outcome to expect and you will.
>>
>>107818503
x86 is pretty demented but x64 isn't that bad so far. flat memory model hides a lot of sins as far as i can make out.

the impression i am getting though is that, outside of corporations that specifically deal in it by necessity, no one actually knows how to do a lot systems level coding in it. so i think the big issue is other than certain professionals, any sort of complex usage of instructions is just out of everyone else's knowledge level. doing this has also highlighted to me how much nerds lie in order to win arguments and look superior. it gets pretty fucking tiresome.
>>
>>107818343
Did you mistake Rust for C? Do the names Justine Tunney and Mary Ann Horton ring a Bell (Labs)?
>>
>>107818149
https://www.five-embeddev.com/riscv-user-isa-manual/latest-adoc/intro.html#_introduction
>>
File: hackerman apui.png (62 KB, 300x300)
62 KB
62 KB PNG
I want to learn assembly to become a hackerman, but do I need to learn C++ first?
>>
>>107818529
At least on the DSPs I was working with a long while back, there were several useful addressing modes and instructions that the C compiler would never use.
>>
>>107819170
Absolutely not.
You can dive into assembly with zero programming language knowledge.
>>
>>107819170
You might want to learn the C function calling API since it's a lot easier to make toy programs in assembly when you can call things like scanf.
You definitely don't need to know any actual high level programming language though, including C, to write assembly.
Definitely learn about pointers though, since you're basically forced to use them in assembly.
>>
>>107818149
University. Shit sucked so bad I switched majors and swore off technology and programming entirely until very recently. Prof was an awful old hag that failed 80% of the class and retired the next semester.
>>
>>107818343
he did
>>
>>107818149
>/g/, where did (You) learn Assembly?
university course where we had to design our own cpu and implement some made up by the prof assembly lang on it
>>
>>107819848
That's a good exercise.
>>
>>107819908
it definitely was interesting since i didn't study computer engineering but it was probably the first and last time i'll touch vhdl
>>
>>107818149
I'm interested in learning assembly. Any suggestions, /g/?
>>
>>107819933
any applications in mind e.g. hacking vidya or messing around with microcontrollers?
>>
>>107819921
>probably the first and last time i'll touch vhdl
Maybe. As someone who wound up doing lots of embedded work, I'll say that I was at the mercy of my inputs; and being able to dig into the FPGAs to check out their reliability saved me a few times.
>>
>>107818412
>Turing Complete
>>107818278
so second post was right
>>
>>107818149
>g/, where did (You) learn Assembly?
at home. using books.

>>107818744
>no one actually knows how to do a lot systems level coding in it.
nonsense
>any sort of complex usage of instructions is just out of everyone else's knowledge level.
they are all documented
>doing this has also highlighted to me how much nerds lie
this, coming from a faggot that thinks x86 instructions are mysterious and nobody knows what they are. give us a break, nigga.
>>
>>107818222
Fantastic recommendation, anon.
>>
>>107818149
https://store.steampowered.com/app/375820/Human_Resource_Machine/
>>
>>107819170
No. Learn Circuit Analysis, then Boolean logic, and finally learn Computer Architecture.
Once you know the ins and outs of Assembly for one architecture you can write a compiler for a programming language of your choice.
t. gay nigger
>>
File: Skaven skank.png (241 KB, 2306x890)
241 KB
241 KB PNG
>>107818529
An absolute must for cracking your own software. Also, for writing toy compilers that have decent speed and optimization, if you combine using inline with C.
>>
>>107818149
Back in the day I would disassemble AOL Instant Messenger and other applications seeing how they worked internally. Also did Pokemon ROM hacks and learned Z80 assembly.

I can barely remember any of it now.
>>
File: 1734882769422236.png (862 KB, 810x634)
862 KB
862 KB PNG
>>107820441
I also used to crack some of my own applications (usually the easier ones that didn't use the insane packers that encrypted everything). I vaguely remember ASPack being one of the harder ones to get a dump of, or maybe it was some other one. I also used to be in the spamming scene so I would crack spamming applications that were hard drive/hardware id locked to a specific computer, and remove any backdoor shit.
>>
>>107820436
Is that Mario and Mouser's sister?
>>
>>107819953
Vidya for the most part yeah
>>
>>107820533
what system? choose a game you like and want to know more about if you don't know.
>>
>>107818326
Larp. Nobody who ever did that would be retarded enough to show up here.
>>
6502 class in uni. Honestly they should teach some form of Assembly before C or anything higher. My program had mandatory classes on Boolean Algebra, Computer Architecture, C and higher level stuff. But everything clicked together only when I took the elective microcontroller course
>>
what if i dont want to be a hackerman and just want to RE any potentially malware ridden software that I pirated? is asm still needed?
>>107818655
wow, uni is very strong AND very smart....
>>
>>107818503
Stop spreading this eternal horse shit. x86/x64 is an utter mess at the encoding level. But at the assembly level its pretty simple. Its not in any way more difficult to code for than any other processor, in fact its probably one of the easier cpus to write assembly for.
>>
>>107820009
>nonsense
nah
>they are all documented
the intel manual is about 3000 pages long. you'd know that if you'd bothered reading it.
>this, coming from a faggot that thinks x86 instructions are mysterious and nobody knows what they are. give us a break, nigga.
i don't. never said so either. so all this coming from a faggot who apparently can't read. give us a break, nigger.
>>
>>107820658
Agreed. It's pretty niggerlicious that the fundamentals are not covered anymore. I am a taco street shitter and they even do worse over there, they only teach things like dotnet or MSSQL server because it's moneyhatted.
>>
>>107818529
for small code
>>
>>107820658
>But everything clicked together only when I took the elective microcontroller course
Microcontrollers give your mistakes or bad assumptions nowhere to hide.
>>
>>107818744
> x86 is pretty demented but x64 isn't that bad so far
They are basically the same thing.

Also if anything x64 is more egregious, x86 had a certain zen, it was incredibly space efficient, function calls especially were very compact due to pushed stack arguments. Having only 4 calle saved registers further reduced the cost of function calls. I have always been of the opinion that having a large register file is not all its cracked up to be due to how bloated function prologs get saving so many registers.

x64 completely ruined x86, it went from space efficient to grotesque.
>>
>>107820658
6502 is probably one of the worst cpus to learn assembly on. You will waste all your time learning the various horrific contortions required exclusively for that cpu rather than general skills that apply to most cpus.
>>
>>107820730
>woooahh! manual is like epic large, my dude. nobody got time for that - and this is why nobody understands how instructions work
you literally have the brain of a goldfish. it's remarkable. it's always great watching the mentally challenged rambling on about how people "lie" and you're just nothing more than a repulsive and compulsive liar.
>>
File: file.png (3 KB, 145x57)
3 KB
3 KB PNG
>>107820855
idk where I got 6502, it was actually 8086. I still have the emulator we used.
>>
>>107820855
it's quirky in that not all opcodes are defined and different registers have different addressing modes available to them, but it's not terrible
>>
>>107820780
>They are basically the same thing.
as i said earlier, x64 has a flat memory model and that makes life simpler.
>>
oh yeah, 6502 has some hardware bugs too, i suppose
>>107820886
once you are out of emulation mode
>>
>>107820855
>6502 is probably one of the worst cpus to learn assembly on.
it is the easiest to learn. if this filters you then you are absolutely enormous fucking retard
>horrific contortions
name 3 that don't involve lack of multiple and divide instructions or revolves around only having 3 registers. entertain us.
>>
>>107820868
>begins to hallucinate
waste someone else's time with your faggot shit, nigger. i'm about as interested in it as the people around you irl.
>>
>>107820893
>woaah guys! book is big. this means nobody understands how computers work
what a retarded fucking loser lmao
>>
>>107820890
> it is the easiest to learn
Being simple does not make it easy. If simple was easy then brainfuck would be easy to program in. There is a sweet spot of complexity, and 6502 falls below that.
>>
>>107821030
it really isn't that bad, anon
>>
>>107818149
No point in learning ASM anymore AI will do it all for you.
>>
>>107818149
learned MIPS assembly during my CS degree, it's pretty nice
>>
>>107821030
>There is a sweet spot of complexity, and 6502 falls below that.
I disagree.
There is a bit of a "what are you trying to do?" aspect to it as well, but 6502 is very easy to learn and use.
Yes, it may (will) end up being more verbose but it is easy to track the contents of the registers and state.
>>
>>107821059
AI sucks ass at ASM.
>>
>>107821102
>AI sucks ass
Cleaned that up for you, anon.
>>
>>107821096
The point is, it makes you do far more work for the same result. And its simplicity does not help you in any way compared to a cpu with more registers and better addressing modes. Something like the 68000, or even the 8086 is far easier to program. Writing code of 6502 is a form of self-flagellation, that should not the first taste of assembly a student experiences.
>>
>>107821207
understanding how to synthesize wider and new operations is actually a great practical exercise when learning assembly
>>
>>107818149
College, 8086 asm, then ARMv4 asm when messing with the GP2X
>>
also, 6502 and 65816 have some really great addressing modes
>>
File: file.png (281 KB, 500x492)
281 KB
281 KB PNG
>>107820876
Same for me, 21 years ago
>>
My only experience with assembly is when uni gave us a task to write simple programs for dos (keyboard interrupt handler, filesystem access, drawing smth). They didn't explain anything of course. So i took nasm, read its docs, read helppc (https://helppc.netcore2k.net/), examples on the internet, etc. and made the assignments. Almost never touched assembly after that.
>>
>>107821059
N
>>
>>107821346
...ASM is the best assembler!
>>
File: 1758796195828299.jpg (213 KB, 936x936)
213 KB
213 KB JPG
>>107821352
Clever.
>>
>>107818149
90% of /g/ doesn't even own a computer, what are you on about
>>
>>107818149
>where
At home. I had a CP/M machine and I learned 8080 assembly. Actually the machine had a z80 so I could also use the handy block move opcodes. I taught myself from a book and from existing source code. Got to the point where I wrote a text editor and a disk editor. Fun times.

More recently, also at home, in progress, I am learning x86 assembly in the Linux operating system. Not as nice nor clean as z80 but it has some features z80 didn't. I wrote a Forth in it, also a False (a language created by Wouter van Oortmerssen). Step by step progress.
>>
>>107818149
All I know about assembly I learned getting partway through Human Resource Machine
>>
8086 manual
>>
I just look at compiler output, usecase for reading the manual?
>>
File: AIM65_s9500_005.jpg (2.1 MB, 3488x2616)
2.1 MB
2.1 MB JPG
>>107818149
On pic. related.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

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.