Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 30th, 2007, 11:48 PM   #1
legosa
Newbie
 
Join Date: Sep 2007
Posts: 1
Rep Power: 0 legosa is on a distinguished road
AX, EAX, ect

I understand that AX,EAX, ect...are memory addresses. But...just how do you know, what memory address is for what? And, how do you discover more memory addresses?
legosa is offline   Reply With Quote
Old Sep 30th, 2007, 11:56 PM   #2
ZenMasterJG
Hobbyist Programmer
 
ZenMasterJG's Avatar
 
Join Date: Nov 2004
Location: Boston, MA
Posts: 148
Rep Power: 4 ZenMasterJG is on a distinguished road
Send a message via AIM to ZenMasterJG
EAX, EBX, ECX, EDX, EBP, ESP, ESI, and EDI are all "general purpose" 32-bit registers. AX, BX, CX and DX are the lower 16 bits of EAX, EBX, etc, etc.
Just as AX is the lower 16 bits of EAX, AH is the upper 8 bits of AX, and AL is the lower 8 bits of AH.

EBP, ESP, ESI, and EDI can be subdivided like this too, but only the lower 16 bits, with BP, SP, SI, DI (theres no access for the upper/lower 8 bits for these registers like there is for EAX & friends.)

Is there a book or tutorial you're using to learn assembly? I'm sure this is all covered in detail somewhere in there.

Oh, while ESI, EDI, ESP, and EBP are "general purpose" registers, they have specialized uses and probably shouldn't actually be used like EAX, EBX, etc.
ESP addresses data on the stack, so don't use it for anything else.
ESI and EDI are the extended source index and extended destination index registers.
EBP is the extended frame pointer register.

Theres a bunch of others for advanced stuff, but the above is kinda like "Basic Registers 101"
ZenMasterJG is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:46 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC