flat assembler
Message board for the users of flat assembler.

Index > Main > What is the difference between registers?

Author
Thread Post new topic Reply to topic
Kristian_



Joined: 13 Nov 2004
Posts: 38
Kristian_ 15 Nov 2004, 13:46
Hi!
I can't seem to understand what exactly are registers.
Quote:
The main purpose of a register is to keep a number (variable). Registers are located into CPU, so they are much faster than memory.

Well, thats all I know. I know that I can store a variable in it, and I know that there are 8 bit and 16 bit registers. For example there are: AX - accumulator, BX - BASE etc.. Isn't they the same?

For example when I want to output text in DOS, I store value 9 into AH register and address of my variable that contains text into DX register. Why can't I store my address of my variable in BX register, and how does DOS know in what register I store my message?

There are also segment, index registers! What are they? Why are they so many? and what is the purpose for each register? Can anyone please explain me this? Or does anyone know any newbie friendly tutorial about this? Thank you!

[Matrix_Spell_Checking=adjust;reason="For Better searching"]Matrix[/Matrix_Spell_Checking]
Post 15 Nov 2004, 13:46
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2138
Location: Estonia
Madis731 15 Nov 2004, 14:42
DOS doesn't "know" anything
THAT is the reason you cannot put it in bx or any other,
because DOS always takes the ax register as input.

I think you answered your question yourself there Very Happy

you don't need to touch segments very often (at least in 32bit mode)

I think you have to read some tutorials, because we cannot
explain all to you in these forums.
Post 15 Nov 2004, 14:42
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Kristian_



Joined: 13 Nov 2004
Posts: 38
Kristian_ 15 Nov 2004, 14:47
Thank you!
Now please can you suggest me any fasm tutorials? I have read this http://decard.net tutorial. Thank you!
Post 15 Nov 2004, 14:47
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2138
Location: Estonia
Madis731 15 Nov 2004, 14:59
I guess you haven't read any tutorials or searched the boards Smile
http://flatassembler.net/docs.php?article=manual
http://board.flatassembler.net/topic.php?t=2530
http://board.flatassembler.net/topic.php?t=2527
...
another good resource is
http://webster.cs.ucr.edu/
Check out the AoA book and some windows programming resources
Post 15 Nov 2004, 14:59
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1164
Location: Overflow
Matrix 15 Nov 2004, 19:23
i also recommend you reading the basics before asking something, this board is not large enough to contain every basic questions like what is byte? or similar.

you should also take a look @
Flat Assembler Frequently Asked Questions (FAQ) (main)

its linked to other FAQs as well, and they should contain a large amount of links to tutorials. if you find tutorials explaining your problem well you can recommend them @ faq page like:

"i found this great tutorial about xxxx @ http://xxxx.com/whatisit.htm,
and you should add it to your faq."

this way it others have the same question, they will find it easily without searching in the FAQ
Post 15 Nov 2004, 19:23
View user's profile Send private message Visit poster's website Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1164
Location: Overflow
Matrix 15 Nov 2004, 23:52
well i see your thread is already DUPE,

http://board.flatassembler.net/topic.php?t=2592

why do you post same question multiple times?
Post 15 Nov 2004, 23:52
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.