Assembler For Dummies Like Me

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Post Reply
User avatar
Jvac
Member
Member
Posts: 58
Joined: Fri Mar 11, 2011 9:51 pm
Location: Bronx, NY

Assembler For Dummies Like Me

Post 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:
"The best way to prepare for programming is to write programs, and
to study great programs that other people have written." - Bill Gates


Think beyond Windows ReactOS®
Tosi
Member
Member
Posts: 255
Joined: Tue Jun 15, 2010 9:27 am
Location: Flyover State, United States
Contact:

Re: Assembler For Dummies Like Me

Post by Tosi »

What? Why? How?
User avatar
os64dev
Member
Member
Posts: 553
Joined: Sat Jan 27, 2007 3:21 pm
Location: Best, Netherlands

Re: Assembler For Dummies Like Me

Post 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.
Author of COBOS
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: Assembler For Dummies Like Me

Post 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.
User avatar
Jvac
Member
Member
Posts: 58
Joined: Fri Mar 11, 2011 9:51 pm
Location: Bronx, NY

Re: Assembler For Dummies Like Me

Post 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.
"The best way to prepare for programming is to write programs, and
to study great programs that other people have written." - Bill Gates


Think beyond Windows ReactOS®
Darwin
Member
Member
Posts: 43
Joined: Sun Jan 16, 2011 6:58 pm
Location: United States

Re: Assembler For Dummies Like Me

Post by Darwin »

Jvac wrote: Thanks for the pointer.
Ha-ha, get it? The "pointer"? Ah...
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Re: Assembler For Dummies Like Me

Post 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 ;)
This was supposed to be a cool signature...
User avatar
xyjamepa
Member
Member
Posts: 397
Joined: Fri Sep 29, 2006 8:59 am

Re: Assembler For Dummies Like Me

Post 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. :)
The man who follows the crowd will usually get no further than the crowd.
The man who walks alone is likely to find himself in places
no one has ever been before.
Post Reply