Page 2 of 2

Re: What very good tutorials are out there for Assembly?

Posted: Mon Jan 30, 2017 4:40 pm
by BrightLight
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.
specs.png

Re: What very good tutorials are out there for Assembly?

Posted: Tue Jan 31, 2017 1:31 am
by dozniak
omarrx024 wrote:
specs.png
Thread hijack: what's this theme called?

Re: What very good tutorials are out there for Assembly?

Posted: Tue Jan 31, 2017 7:21 am
by stevej150
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.
specs.png
Is that macOS (Sierra) or OS X (Yosemite, El Capitan or earlier)? Is it a Linux distro based on OS X?

You've learned from Intel Manuals then? I thought you just searched on Google randomly. Let me try it out then.

Re: What very good tutorials are out there for Assembly?

Posted: Tue Jan 31, 2017 7:28 am
by Octacone
dozniak wrote:
omarrx024 wrote:
specs.png
Thread hijack: what's this theme called?
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.

Re: What very good tutorials are out there for Assembly?

Posted: Tue Jan 31, 2017 7:32 am
by stevej150
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.

Re: What very good tutorials are out there for Assembly?

Posted: Tue Jan 31, 2017 9:19 am
by JAAman
stevej150 wrote:So I should read all these pages and I'll be able to make a good OS?
yes, I would read them all, but most importantly for learning about the instructions, is volume 2 (which describes each instruction in detail)
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
This Intel documentation? What should I choose? Combined documentation? 9 PDF files? Or the 3 files?
both have advantages, but I would stick with the 3 volume set myself (unless you want to buy them in book form...)
Do they all have the same content?
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 larger
Do they really teach you more about Assembly then? I don't see any programming much.
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)
It doesn't look like one of those things when they explain about the mov instruction
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)
They don't really have mov ah, 1000 in there or anything.
yes they do, but its under "mov"... all forms of mov are there (for that instruction, you will want the general purpose mov instruction)
Is the Intel manual good? The programming manual with lots of volumes? IA-32 x64 documentation? Is it good to learn more?
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 properly

Re: What very good tutorials are out there for Assembly?

Posted: Tue Jan 31, 2017 3:20 pm
by dchapiesky
andrew isn't taking his meds again

Re: What very good tutorials are out there for Assembly?

Posted: Tue Jan 31, 2017 7:49 pm
by BrightLight
dozniak wrote:Thread hijack: what's this theme called?
MacBuntu transformation pack.
octacone wrote:It is okay for older Ubuntu releases but doesn't look good on 16.10.
I'm on Ubuntu 16.04.

Re: What very good tutorials are out there for Assembly?

Posted: Wed Feb 01, 2017 12:13 pm
by stevej150
Everyone here is insane and I like it! How can you read 7000 pages by the way?

Re: What very good tutorials are out there for Assembly?

Posted: Wed Feb 01, 2017 12:45 pm
by dozniak
stevej150 wrote:How can you read 7000 pages by the way?
Start page-by-page, when you get the idea and have a list of cross-references - go to necessary pages directly.

Re: What very good tutorials are out there for Assembly?

Posted: Fri Feb 03, 2017 12:25 pm
by stevej150
I mean like a place to learn more Assembly.

Re: What very good tutorials are out there for Assembly?

Posted: Fri Feb 03, 2017 12:59 pm
by dozniak
stevej150 wrote:I mean like a place to learn more Assembly.
Assembly is very simple. Assembly language represents operations of the CPU in mnemonic form.

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.

Re: What very good tutorials are out there for Assembly?

Posted: Wed Feb 08, 2017 6:29 pm
by azblue
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.

Re: What very good tutorials are out there for Assembly?

Posted: Mon Feb 13, 2017 2:39 am
by ScropTheOSAdventurer
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
x86 assembly
If you want to use Intel syntax, you should add this line to the top of every assembly file:

Code: Select all

.intel_syntax noprefix


If you want to use AT&T, do this line instead:

Code: Select all

.att_syntax