What very good tutorials are out there for Assembly?
- BrightLight
- Member
- Posts: 901
- Joined: Sat Dec 27, 2014 9:11 am
- Location: Maadi, Cairo, Egypt
- Contact:
Re: What very good tutorials are out there for Assembly?
We all learned from reading manuals and documentation. I have a folder just for all manuals, for reference. Learn to read official documentation; it's the only way to succeed in this field.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
Re: What very good tutorials are out there for Assembly?
Thread hijack: what's this theme called?omarrx024 wrote:
Learn to read.
Re: What very good tutorials are out there for Assembly?
Is that macOS (Sierra) or OS X (Yosemite, El Capitan or earlier)? Is it a Linux distro based on OS X?omarrx024 wrote:We all learned from reading manuals and documentation. I have a folder just for all manuals, for reference. Learn to read official documentation; it's the only way to succeed in this field.
You've learned from Intel Manuals then? I thought you just searched on Google randomly. Let me try it out then.
One day in the future... computers will be holograms...
Re: What very good tutorials are out there for Assembly?
Looks like Ubuntu with OS X (now macOS) El Capitan Transformation Pack. Let me tell you, it sucks. So many bugs in my opinion, doesn't mimic the look of OS X enough. It is okay for older Ubuntu releases but doesn't look good on 16.10.dozniak wrote:Thread hijack: what's this theme called?omarrx024 wrote:
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
Re: What very good tutorials are out there for Assembly?
So I should read all these pages and I'll be able to make a good OS? This Intel documentation? What should I choose? Combined documentation? 9 PDF files? Or the 3 files? Do they all have the same content? Do they really teach you more about Assembly then? I don't see any programming much. It doesn't look like one of those things when they explain about the mov instruction (not that I don't know what mov is. I do know what it is. It moves something to register).
They don't really have mov ah, 1000 in there or anything.
Is the Intel manual good? The programming manual with lots of volumes? IA-32 x64 documentation? Is it good to learn more?
By the way, that doesn't really look like OS X because it should have Macintosh HD as the hard disk.
They don't really have mov ah, 1000 in there or anything.
Is the Intel manual good? The programming manual with lots of volumes? IA-32 x64 documentation? Is it good to learn more?
By the way, that doesn't really look like OS X because it should have Macintosh HD as the hard disk.
One day in the future... computers will be holograms...
Re: What very good tutorials are out there for Assembly?
yes, I would read them all, but most importantly for learning about the instructions, is volume 2 (which describes each instruction in detail)stevej150 wrote:So I should read all these pages and I'll be able to make a good OS?
as for the other things, the first ~6 chapters or so of volume 3 are very important, definitely read them all, but you will probably need to read them (or sections of them) more than once before you properly understand them
both have advantages, but I would stick with the 3 volume set myself (unless you want to buy them in book form...)This Intel documentation? What should I choose? Combined documentation? 9 PDF files? Or the 3 files?
the 1-book set, the 3-book set and the 9-book set all contain the same thing, its just how many different books its divided into (its too much information to fit in fewer than 9 physical books, but the PDFs can be largerDo they all have the same content?
volume 3 teaches you how to control the CPU (it doesn't give code, it gives information: if you can't turn information into code yourself, then OSdev isn't for you)Do they really teach you more about Assembly then? I don't see any programming much.
information on the mov instruction would be found in the instruction set reference (book 2) under 'mov' (all the instructions are listed in alphabetical order, or you can look in the table of contents for the list of them all)It doesn't look like one of those things when they explain about the mov instruction
yes they do, but its under "mov"... all forms of mov are there (for that instruction, you will want the general purpose mov instruction)They don't really have mov ah, 1000 in there or anything.
yes, very much, it is the only thing that really teaches it properly, but you have to be ready to work hard at learning because this is not an easy subject to learn properlyIs the Intel manual good? The programming manual with lots of volumes? IA-32 x64 documentation? Is it good to learn more?
- dchapiesky
- Member
- Posts: 204
- Joined: Sun Dec 25, 2016 1:54 am
- Libera.chat IRC: dchapiesky
Re: What very good tutorials are out there for Assembly?
andrew isn't taking his meds again
Plagiarize. Plagiarize. Let not one line escape thine eyes...
- BrightLight
- Member
- Posts: 901
- Joined: Sat Dec 27, 2014 9:11 am
- Location: Maadi, Cairo, Egypt
- Contact:
Re: What very good tutorials are out there for Assembly?
MacBuntu transformation pack.dozniak wrote:Thread hijack: what's this theme called?
I'm on Ubuntu 16.04.octacone wrote:It is okay for older Ubuntu releases but doesn't look good on 16.10.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
Re: What very good tutorials are out there for Assembly?
Everyone here is insane and I like it! How can you read 7000 pages by the way?
One day in the future... computers will be holograms...
Re: What very good tutorials are out there for Assembly?
Start page-by-page, when you get the idea and have a list of cross-references - go to necessary pages directly.stevej150 wrote:How can you read 7000 pages by the way?
Learn to read.
Re: What very good tutorials are out there for Assembly?
I mean like a place to learn more Assembly.
One day in the future... computers will be holograms...
Re: What very good tutorials are out there for Assembly?
Assembly is very simple. Assembly language represents operations of the CPU in mnemonic form.stevej150 wrote:I mean like a place to learn more Assembly.
There is a limited set of operations in Load/Store, ALU, FPU, Vector Instruction Units and Machine Control. In each category there's a limited observable number of basic instructions that you HAVE to know to write any program, and more obscure but USEFUL instructions which are not required but nice to know.
Look at the CPU schematic - Load/Store unit concerns with sending data between CPU registers and main memory, ALU performs arithmetic operations (add, sub, mul, div, bit shifts), FPU performs arithmetic and trigonometric operations on floating point numbers (add, sub, mul, div, pow, sin/cos/tan/etc), VIUs perform special "multimedia" or SIMD operations - one command usually operates on 2 or more operands, it implements the same functions as ALU plus some additional like "add with saturation" or "group all bytes in certain positions in multiple arguments into bytes in single register, with some combining logic" - you most probably will not need those right away to start programming. Machine Control commands are used to change the state of CPU and surrounding machinery - e.g. switching to protected mode, controlling cache lines etc. They are very CPU-specific, and you can hold them off a bit.
Start with Load/Store and ALU, and work your way from there.
It really helps to use an emulator like bochs - it has a debugging command line where you can step instruction-by-instruction, so write some stuff, run it in bochs or gdb and see how it changes the state of registers and memory.
Practice makes perfect.
The time you've spent asking how to learn assembly (that was about 2-3 weeks already) you could've easily learned enough assembly to write your simple bootloader.
Last edited by dozniak on Fri Feb 03, 2017 1:03 pm, edited 2 times in total.
Learn to read.
Re: What very good tutorials are out there for Assembly?
The first few tutorials I find when googling "assembly language tutorial" look usable enough. If you're running in DOS or a DOS emulator Ralf Brown's Interrupt List will be helpful too.
- ScropTheOSAdventurer
- Member
- Posts: 86
- Joined: Sun Aug 25, 2013 5:47 pm
- Location: Nebraska, USA
Re: What very good tutorials are out there for Assembly?
I think we should bear in mind that in general there are two different flavors of assembly: Intel and AT&T. For the OP, I am assuming you are using GCC.
This tutorial covers basic Intel Syntax: http://www.cs.virginia.edu/~evans/cs216/guides/x86.html
This one is for AT&T syntax: https://www.nayuki.io/page/a-fundamenta ... rogramming
These were on the first page of the Google search
If you want to use AT&T, do this line instead:
This tutorial covers basic Intel Syntax: http://www.cs.virginia.edu/~evans/cs216/guides/x86.html
This one is for AT&T syntax: https://www.nayuki.io/page/a-fundamenta ... rogramming
These were on the first page of the Google search
If you want to use Intel syntax, you should add this line to the top of every assembly file:x86 assembly
Code: Select all
.intel_syntax noprefix
If you want to use AT&T, do this line instead:
Code: Select all
.att_syntax
"Procrastination is the art of keeping up with yesterday."