Page 1 of 1

Assembler For Dummies Like Me

Posted: Sat Mar 26, 2011 1:01 am
by Jvac
DOS and BIOS provides simple functions that ease programmers life. Using BIOS and DOS functions programmer can easily write text on the screen, set video modes, get keyboard data, read disks and floppies and a lot more, and best of all:

It doesn't require hardware coding experience.

For example seting video mode in BIOS:

Code: Select all

mov ah, 0 - Video BIOS 'Set Display Mode' function. 
mov al, 13h - Video Mode (you can set al & ah bu hust setting ax 'mov ax,13h') 
int 10h - Video BIOS interrupt
And setting Video Mode without BIOS needs setting video cards registers (writting about 9 values). That would take ~20 lines in assembly. DOS uses interrupt 21h. printing text on the screen using DOS (for NASM compiler):

Code: Select all

jmp start ; jumps to start

db text "Hello, world!",$ ; text needs to finish with $

start:
mov dx, text ; movs text pointer to dx
mov ah, 9 ; DOS print function
int 21h ; we call it ;)
Assembly is a lot to learn, especially if you want to be good assembler programmer. Read books, tutorials, articles on assembly, read forums wich usually contains a lot of usefull information, try to code, do some research and you will definatly make it. ;)

This article has giving me hope Assembler for Dummies :mrgreen:

Re: Assembler For Dummies Like Me

Posted: Sat Mar 26, 2011 1:10 pm
by Tosi
What? Why? How?

Re: Assembler For Dummies Like Me

Posted: Sun Mar 27, 2011 3:10 pm
by os64dev
Sadly when switching to protected mode or long mode (read full PC potential) you loose the usefulness of the BIOS and you still have to write everything yourself.

Re: Assembler For Dummies Like Me

Posted: Sun Mar 27, 2011 8:03 pm
by VolTeK
Jvac wrote:Assembly is a lot to learn
For me it was the easiest, as long as you have good logic on your side, the "concepts" of programming with assembly are alot to learn. Well, understanding it.

Re: Assembler For Dummies Like Me

Posted: Wed Mar 30, 2011 12:39 pm
by Jvac
Thanks guys for the response sorry it took so long to get back, been really busy lately.

@ GhostXoPCorp:
For me it was the easiest, as long as you have good logic on your side, the "concepts" of programming with assembly are alot to learn. Well, understanding it.
I agree totally.

@ os64dev:
Sadly when switching to protected mode or long mode (read full PC potential) you loose the usefulness of the BIOS and you still have to write everything yourself.
Thanks for the pointer.

Re: Assembler For Dummies Like Me

Posted: Wed Mar 30, 2011 1:42 pm
by Darwin
Jvac wrote: Thanks for the pointer.
Ha-ha, get it? The "pointer"? Ah...

Re: Assembler For Dummies Like Me

Posted: Fri May 27, 2011 3:26 pm
by Zacariaz
I never quite got the hang of it. All I wanted was to be able to get from POST to 64 bit long mode, and then I planed to take it one baby step at the time from there. Still, I failed marvellously and never gave it another try.

Guess the problem for me was really to find good "from the ground up" material. Too much you are assumed to know and such.

I'm planning to give it another go at some point, so please do throw a few links in my direction if you feel like it ;)

Re: Assembler For Dummies Like Me

Posted: Tue May 31, 2011 5:46 pm
by xyjamepa
well, I believe assembly is easy, but you have to have the right start, search for simple
tutorials, I think assembly is a simple logic. :)