Places to learn Assembly?
Re: Places to learn Assembly?
I'm going to make a suggestion everyone is going to hate, but bear with me.
I first learned x86 assembly using "debug" under DOS. You could do worse than boot up FreeDOS and try that.
I'll take a break while you stop laughing.
Think back to the days when you wrote your first line of code in the first language you learned. You wrote "x = 4" and then "print X" so you could see with your own eyes that it did exactly what it was supposed to. You'll probably want to do the same with assembly. You want to run a single MOV instruction and then inspect the registers to see that they changed. You want to do a CMP and see "whoa, it really did set the OF flag".
This is the closest you're going to get to an interactive "interpreted" assembly experience. If you've tool-savvy enough already, you could assemble some code, run gdb and step through the assembly instructions to see what each one does, but that's a lot to set up before you see any results.
You can resume laughing.
I first learned x86 assembly using "debug" under DOS. You could do worse than boot up FreeDOS and try that.
I'll take a break while you stop laughing.
Think back to the days when you wrote your first line of code in the first language you learned. You wrote "x = 4" and then "print X" so you could see with your own eyes that it did exactly what it was supposed to. You'll probably want to do the same with assembly. You want to run a single MOV instruction and then inspect the registers to see that they changed. You want to do a CMP and see "whoa, it really did set the OF flag".
This is the closest you're going to get to an interactive "interpreted" assembly experience. If you've tool-savvy enough already, you could assemble some code, run gdb and step through the assembly instructions to see what each one does, but that's a lot to set up before you see any results.
You can resume laughing.
- Schol-R-LEA
- Member
- Posts: 1925
- Joined: Fri Oct 27, 2006 9:42 am
- Location: Athens, GA, USA
Re: Places to learn Assembly?
The OP seems to have left the forum, but WTH, I might as well add my two cents, too.
That having been said, if you have access to a public library, there are some excellent books such as Duntemann's Assembly Language Step by Step, which has the advantage of covering NASM under Linux the same as the tutorial you've gone through already. I know that libraries aren't the easiest things to access right now due to COVID, but if you can get a copy of this from one it would be worth the effort. Otherwise, the Kindle may not be free but it isn't too expensive if you can scrape the money together or convince a family member to get it for you.
I would also suggest considering a different assembly language, either emulated or on a real single-board computer such as a Raspberry Pi. The x86 instruction set is frankly a mess, compared to something such as ARM or MIPS, and if nothing else looking at other machine types will give you some idea of what is general to most assembly languages, and what is specific to x86 PCs.
For MIPS, there aren't that many real machines which you could use, but there are a few such as the Onion Omega2, and there are many emulators such as SPIM which are usually free. Alternatively, setting up a cross-assembler and a QEMU virtual MIPS Linux image shouldn't prove too difficult. I'd have to look around for suitable tutorials and videos, but I know that ones like this one are around.
While not free, an ARM SBC such as the Raspberry Pi isn't overly expensive (under $80 US for usable system), so it might prove to be a good investment, and not just for programming. I don't know if this is something you could ask family to help with, but I trust that you could convince them that it would be educational (which probably is the case anyway). There are tons of assembly programming tutorials and videos covering the Pi, and while it is far from the best SBC around, it is far and away the most accessible for most people.
Alternatively, a neo-retro platform such as the Commander X16 is another choice, which is convenient in that there is a free emulator and multiple assemblers such as cc65 ready to be used with it. There are several free videos on Youtube covering 6502 assembly for the Commander X16, such as this one.
And there are always the OpenCourseware classes on the theory of instruction sets and such, but that may be jumping the gun a teensy bit.
As has already been mentioned, there are a lot of programming languages out there, and some of them are very different from the run-of-the-mill Algol derivative. However, since I am mainly mentioning this to suggest you watch at least a few of the Abelson-Sussman lectures (which cover Scheme, a language in the Lisp family) as an alternative view of programming. I'd also check out Smalltalk and Forth as ones which work quite differently from conventional languages, but I will leave it to others to offer good resources on those.CrossJava wrote:I'm 13 and already mastered most of the other languages, now it's time for a challenge.
'Free' and 'high quality' tend to be antagonistic goals, but I probably don't need to tell you that. This isn't to say that there aren't any such resources, but a lot of the better ones (and many of the worse ones) will cost money.CrossJava wrote:I finished Tutorialspoint's walkthrough on it, but now I need another place to learn from that's free and high quality.
That having been said, if you have access to a public library, there are some excellent books such as Duntemann's Assembly Language Step by Step, which has the advantage of covering NASM under Linux the same as the tutorial you've gone through already. I know that libraries aren't the easiest things to access right now due to COVID, but if you can get a copy of this from one it would be worth the effort. Otherwise, the Kindle may not be free but it isn't too expensive if you can scrape the money together or convince a family member to get it for you.
I would also suggest considering a different assembly language, either emulated or on a real single-board computer such as a Raspberry Pi. The x86 instruction set is frankly a mess, compared to something such as ARM or MIPS, and if nothing else looking at other machine types will give you some idea of what is general to most assembly languages, and what is specific to x86 PCs.
For MIPS, there aren't that many real machines which you could use, but there are a few such as the Onion Omega2, and there are many emulators such as SPIM which are usually free. Alternatively, setting up a cross-assembler and a QEMU virtual MIPS Linux image shouldn't prove too difficult. I'd have to look around for suitable tutorials and videos, but I know that ones like this one are around.
While not free, an ARM SBC such as the Raspberry Pi isn't overly expensive (under $80 US for usable system), so it might prove to be a good investment, and not just for programming. I don't know if this is something you could ask family to help with, but I trust that you could convince them that it would be educational (which probably is the case anyway). There are tons of assembly programming tutorials and videos covering the Pi, and while it is far from the best SBC around, it is far and away the most accessible for most people.
Alternatively, a neo-retro platform such as the Commander X16 is another choice, which is convenient in that there is a free emulator and multiple assemblers such as cc65 ready to be used with it. There are several free videos on Youtube covering 6502 assembly for the Commander X16, such as this one.
And there are always the OpenCourseware classes on the theory of instruction sets and such, but that may be jumping the gun a teensy bit.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Re: Places to learn Assembly?
The single best resource I know of for learning assembly is Understanding Assembly Language (aka Reverse Engineering For Beginners). You'll learn about a bunch of other cool stuff from that book, too. (You don't have to give your email to read the book; it's available right here.)
Re: Places to learn Assembly?
As a total noob when it comes to assembler, what's the best and easiest distro to learn -- FASM, NSAM, YASM, JWASM or some other ASM? Thank you.
https://vintageos.org/frn2000.html
Re: Places to learn Assembly?
I've learn't my asm skills from PASS32 assembler bundled with some old gaming magazine. It was an assembler written by some german guy. It had awesome tutorials included,ranging from basic move instruction, to implementing dynamic linker. I think the author was Dieter Pawelczak (I think, he is a doctor or something now).
Re: Places to learn Assembly?
I found some information on PASS32 at http://www.manmrk.net/tutorials/assembly/a.htm#P.pvc wrote:I've learn't my asm skills from PASS32 assembler bundled with some old gaming magazine. It was an assembler written by some german guy. It had awesome tutorials included,ranging from basic move instruction, to implementing dynamic linker. I think the author was Dieter Pawelczak (I think, he is a doctor or something now).
Pawelczak's website was http://www.geocities.com/SiliconValley/Bay/9159/ (ERROR 404). That's how old PASS32 is! I'm going to check it out. Hopefully it runs on DOSBox. Thank you.The Pass32 Assembler is a free x86 Assembler to easily create protected mode and DOS applications. The Assembler directly links a dos extender to the application - there's no complicated linking needed. The Assembler comes together with the Pro32 Dos Extender, but is also compatible to other Dos Extenders like WDOSX, etc. The Assembler provides a large run time library with std. I/O, heap management, file handling & VESA graphic functions. Pass32 comes with a complete documentation and many example programs. The Assembler and Dos Extender are compatible with plain DOS, Win31, Win9X and WinNT platforms.
https://vintageos.org/frn2000.html
Re: Places to learn Assembly?
I'm sure everyone has good tips on here and each have their own pros and cons. I might argue that while learning a non-x86 assembly might be a good idea, it could distract from his purpose to OS Dev for x86 platform, which I assume here.Schol-R-LEA wrote:The OP seems to have left the forum, but WTH, I might as well add my two cents, too.
As has already been mentioned, there are a lot of programming languages out there, and some of them are very different from the run-of-the-mill Algol derivative. However, since I am mainly mentioning this to suggest you watch at least a few of the Abelson-Sussman lectures (which cover Scheme, a language in the Lisp family) as an alternative view of programming. I'd also check out Smalltalk and Forth as ones which work quite differently from conventional languages, but I will leave it to others to offer good resources on those.CrossJava wrote:I'm 13 and already mastered most of the other languages, now it's time for a challenge.
'Free' and 'high quality' tend to be antagonistic goals, but I probably don't need to tell you that. This isn't to say that there aren't any such resources, but a lot of the better ones (and many of the worse ones) will cost money.CrossJava wrote:I finished Tutorialspoint's walkthrough on it, but now I need another place to learn from that's free and high quality.
That having been said, if you have access to a public library, there are some excellent books such as Duntemann's Assembly Language Step by Step, which has the advantage of covering NASM under Linux the same as the tutorial you've gone through already. I know that libraries aren't the easiest things to access right now due to COVID, but if you can get a copy of this from one it would be worth the effort. Otherwise, the Kindle may not be free but it isn't too expensive if you can scrape the money together or convince a family member to get it for you.
I would also suggest considering a different assembly language, either emulated or on a real single-board computer such as a Raspberry Pi. The x86 instruction set is frankly a mess, compared to something such as ARM or MIPS, and if nothing else looking at other machine types will give you some idea of what is general to most assembly languages, and what is specific to x86 PCs.
For MIPS, there aren't that many real machines which you could use, but there are a few such as the Onion Omega2, and there are many emulators such as SPIM which are usually free. Alternatively, setting up a cross-assembler and a QEMU virtual MIPS Linux image shouldn't prove too difficult. I'd have to look around for suitable tutorials and videos, but I know that ones like this one are around.
While not free, an ARM SBC such as the Raspberry Pi isn't overly expensive (under $80 US for usable system), so it might prove to be a good investment, and not just for programming. I don't know if this is something you could ask family to help with, but I trust that you could convince them that it would be educational (which probably is the case anyway). There are tons of assembly programming tutorials and videos covering the Pi, and while it is far from the best SBC around, it is far and away the most accessible for most people.
Alternatively, a neo-retro platform such as the Commander X16 is another choice, which is convenient in that there is a free emulator and multiple assemblers such as cc65 ready to be used with it. There are several free videos on Youtube covering 6502 assembly for the Commander X16, such as this one.
And there are always the OpenCourseware classes on the theory of instruction sets and such, but that may be jumping the gun a teensy bit.
But good work.
-
- Member
- Posts: 70
- Joined: Tue Jul 14, 2020 4:01 am
- Libera.chat IRC: clementttttttttt
Re: Places to learn Assembly?
Books are your friends.
Re: Places to learn Assembly?
Someone put the Duntemann's book in Github.Seasoft wrote:Schol-R-LEA wrote:The OP seems to have left the forum, but WTH, I might as well add my two cents, too.
That having been said, if you have access to a public library, there are some excellent books such as Duntemann's Assembly Language Step by Step, which has the advantage of covering NASM under Linux the same as the tutorial you've gone through already. I know that libraries aren't the easiest things to access right now due to COVID, but if you can get a copy of this from one it would be worth the effort. Otherwise, the Kindle may not be free but it isn't too expensive if you can scrape the money together or convince a family member to get it for you.
https://vintageos.org/frn2000.html
Re: Places to learn Assembly?
frn2000 wrote:Someone put the Duntemann's book in Github.
He's dead right there! It took me far too long to realise that.Duntemann wrote:Note well: When somebody asks you, "Why would you want to do that?" what it really means is this: "You've asked me how to do something that is either impossible using tools that I favor or completely outside my experience, but I don't want to lose face by admitting it."
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
Re: Places to learn Assembly?
It could also mean "I have enough experience with the subject matter to know that this is a really dumb thing to do that will come back to bite us in the arse later". Just as well.eekee wrote:He's dead right there! It took me far too long to realise that.Duntemann wrote:Note well: When somebody asks you, "Why would you want to do that?" what it really means is this: "You've asked me how to do something that is either impossible using tools that I favor or completely outside my experience, but I don't want to lose face by admitting it."
The trick is to have the awareness of your relative experience sets to tell the two apart.
Every good solution is obvious once you've found it.
Re: Places to learn Assembly?
Or it sometimes means: "That is outside of my limited imagination. I will stick to the pathes others have gone before me. And so should you."eekee wrote:He's dead right there! It took me far too long to realise that.Duntemann wrote:Note well: When somebody asks you, "Why would you want to do that?" what it really means is this: "You've asked me how to do something that is either impossible using tools that I favor or completely outside my experience, but I don't want to lose face by admitting it."
(Which is nonsense, of course. Imagine all people were that way! We still would use stone tools, maybe not even those.)
Greetings
Peter
Re: Places to learn Assembly?
Good point, but it can take a lot of awareness. I guess that's what really took me years. The fun part is when something would indeed be dumb in someone else's world, but makes perfect sense for what you're trying to do. Just-about all of Forth is like that.Solar wrote:It could also mean "I have enough experience with the subject matter to know that this is a really dumb thing to do that will come back to bite us in the arse later". Just as well.
The trick is to have the awareness of your relative experience sets to tell the two apart.
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
Re: Places to learn Assembly?
I would recommend FASM, because it's easy to set up (on both Win and Unix), has straightforward syntax (mostly Intel with some additions, in contrast to AT&T), very intuitive and powerful macro system, good and very detailed documentation (including x86 instructions), lightning fast compilation times, finally a friendly community and active developer on the forum (aka Message Board) with tons of examples.frn2000 wrote:As a total noob when it comes to assembler, what's the best and easiest distro to learn -- FASM, NSAM, YASM, JWASM or some other ASM? Thank you.
NASM is not bad either, you might find more examples with it on the net, but less supportive forum, and its macro system is nowhere near sophisticated as FASM's.
Eventually to get pro you'll have to learn GAS (AT&T syntax and the quirks of inline assembly and C precompiler with Assembly). But don't start there, it's hard.
Cheers,
bzt