/g/, where did (You) learn Assembly?
from an NES primer as a freshman in collegelearned 65816 from buying a copy of this book: https://archive.org/details/0893037893ProgrammingThe65816reversed engineered SNES game code that'd i trace, like Super Metroid's decompression routinethen read details of SNES coprocessors that made me aware of things like hazards in deeply pipelined cpu designs that don't discard anythingthen designed a simple processor for a computer architecture classi think my CS program also dabbled in ARM briefly, but i was already wise to assemblyeventually got around to watching 6.004once 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 prngi find assembly relaxing
>>107818149I didn't because I'm not transgender
>>107818149Assembly? Is that a new React Framework?
what's the point of registers when you have ram?
>>107818149universitypdp-11 & IBM 4341early '80s
>>107818278Did you mistake Assembly for Rust?
>>107818149doing 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
>>107818395i'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
>>107818149Use case for assembler code?
>>107818529Absolute control over hardware
>>107818297Registers hold data inside the CPU. They are the inputs for CPU functions and where those functions output to.
>>107818529If 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.
>>107818149From the 500 in 1 electronics kit with its single board computer.
>>107818529Checking the FLAGS register.Reverse engineeringIntentionally writing your program in a way that's very hard to reverse engineerOptimizing in weird cases where the compiler won't know what outcome to expect and you will.
>>107818503x86 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.
>>107818343Did you mistake Rust for C? Do the names Justine Tunney and Mary Ann Horton ring a Bell (Labs)?
>>107818149https://www.five-embeddev.com/riscv-user-isa-manual/latest-adoc/intro.html#_introduction
I want to learn assembly to become a hackerman, but do I need to learn C++ first?
>>107818529At 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.
>>107819170Absolutely not.You can dive into assembly with zero programming language knowledge.
>>107819170You 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.
>>107818149University. 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.
>>107818343he 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
>>107819848That's a good exercise.
>>107819908it definitely was interesting since i didn't study computer engineering but it was probably the first and last time i'll touch vhdl
>>107818149I'm interested in learning assembly. Any suggestions, /g/?
>>107819933any applications in mind e.g. hacking vidya or messing around with microcontrollers?
>>107819921>probably the first and last time i'll touch vhdlMaybe. 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>>107818278so 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 liethis, coming from a faggot that thinks x86 instructions are mysterious and nobody knows what they are. give us a break, nigga.
>>107818222Fantastic recommendation, anon.
>>107818149https://store.steampowered.com/app/375820/Human_Resource_Machine/
>>107819170No. 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
>>107818529An 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.
>>107818149Back 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.
>>107820441I 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.
>>107820436Is that Mario and Mouser's sister?
>>107819953Vidya for the most part yeah
>>107820533what system? choose a game you like and want to know more about if you don't know.
>>107818326Larp. 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?>>107818655wow, uni is very strong AND very smart....
>>107818503Stop 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>nonsensenah>they are all documentedthe 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.
>>107820658Agreed. 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.
>>107818529for small code
>>107820658>But everything clicked together only when I took the elective microcontroller courseMicrocontrollers give your mistakes or bad assumptions nowhere to hide.
>>107818744> x86 is pretty demented but x64 isn't that bad so farThey 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.
>>1078206586502 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 workyou 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.
>>107820855idk where I got 6502, it was actually 8086. I still have the emulator we used.
>>107820855it'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>>107820886once 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 contortionsname 3 that don't involve lack of multiple and divide instructions or revolves around only having 3 registers. entertain us.
>>107820868>begins to hallucinatewaste 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 workwhat a retarded fucking loser lmao
>>107820890> it is the easiest to learnBeing 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.
>>107821030it really isn't that bad, anon
>>107818149No point in learning ASM anymore AI will do it all for you.
>>107818149learned 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.
>>107821059AI sucks ass at ASM.
>>107821102>AI sucks assCleaned that up for you, anon.
>>107821096The 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.
>>107821207understanding how to synthesize wider and new operations is actually a great practical exercise when learning assembly
>>107818149College, 8086 asm, then ARMv4 asm when messing with the GP2X
also, 6502 and 65816 have some really great addressing modes
>>107820876Same 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.
>>107821059N
>>107821346...ASM is the best assembler!
>>107821352Clever.
>>10781814990% of /g/ doesn't even own a computer, what are you on about
>>107818149>whereAt 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.
>>107818149All 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?
>>107818149On pic. related.