Hi all,

First off, great board, i am going to learn a ton from here. Anyway my question is this. On TUT. #3 the introduction to some new words, MOV, EAX, PUSH, and some others that escape me right now. Can anyone explain the meanings of these, and exactly what they do? I kind of understand the MOV, is move stuff, but the others are a bit unclear. I've checked out the word doc that comes with win32asm.exe, but i think i need to go back into N00B land a bit further. Any suggested resources i can read into? A google search with these terms yields very vague articles, and so many. Thanks for any help!

BTW Tut # 2 went off great!! :)
Posted on 2003-05-28 13:55:27 by mitsu50
I was going to answer this question but it would be hypocrisy if n00b like me answer another N00b such a lame question. !!!
Posted on 2003-05-28 14:59:58 by AceEmbler
Go to this page and download Win32asm basic tutorials Htmlhelp version

It will help a lot.

http://www.madwizard.org/view.php?page=tutorials.contents&PHPSESSID=73a8e8c7de44e6edd78609aa0e831b48
Posted on 2003-05-28 16:51:42 by Gandalf
eax, ecx, edx, ebx, esp, ebp, esi, edi are 8 32-bit general registers. Cpu perform things to the register or memory depending on the instruction (opcode).
Posted on 2003-05-29 01:50:10 by roticv

I was going to answer this question but it would be hypocrisy if n00b like me answer another N00b such a lame question. !!!


i dont think this is a lame question at all. I did a SEARCH, and was able to answer my other questions, I just needed a bit more info on this, since i am just starting out. BTW this board is for HELPING people....

If you have nothing useful to say, then dont waste bandwith, keep YOUR N00B opinon to yourself. :mad:

BTW, thanks guys for the info, this will be some more good reading for me! :alright:
Posted on 2003-05-29 06:32:04 by mitsu50
If you have nothing useful to say, then dont waste bandwith, keep YOUR N00B opinon to yourself.


ye ye give a break with this template answer.

Maby i shouldnt post this previous message but i was going to answer this question of yours. And then when i was writing it (the answer to your main question) I just felt realy stupid.
Posted on 2003-05-29 16:52:08 by AceEmbler



ye ye give a break with this template answer.

Maby i shouldnt post this previous message but i was going to answer this question of yours. And then when i was writing it (the answer to your main question) I just felt realy stupid.


so why not post the answer then? I'm not sure why you would feel stupid sharing knowledge with others....

as far as my template answer, I moderate on other boards, and it drives me crazy when people post answers like yours, be-littling others...:rolleyes:

sorry mods, no more off-topic stuff from me!:cool:
Posted on 2003-05-30 08:18:37 by mitsu50
mitsu, it's not off-topic stuff, welcome on the board, I hope you'll enjoy yourself here.

check out randall hydes (http://www.webster.cs.ucr.edu) page at webster for his 16 bit tutorial, go over the first chapters so you can see multiple constructs in action.
Thomas has a great resource as people have told here above and intel manuals are very comprehensive but dry.

What also helps is if you can find a x86 asm pocketbook in a used books store or something, I got mine for only a dollar :)

Aceassembler I already have moderators, I don't need forumcops. When you edit your message there is a little button on top that allows you to delete it if you find it stupid. Remember you're not forced to help people if you don't want to so you don't *need* to answer but when you do *do* stay respectful.

thx for your support :alright:
Posted on 2003-05-30 15:23:22 by Hiroshimator
Hi,

This is basically a question of architecture. To understand the answer properly you need to understand a bit about how the CPU works...

Your computer can be devided into any number of sections depending on how specific you want to get but for this explanation we'll say four. The Opcodes, the stack, the registers and memory, every CPU is based on at least those four.

Opcodes = Operation Codes - these are instructions to the cpu, they tell it what task to perform and what data to use. In reality they are just numbers but to make things easier we use "mnemonics" which are little words to represent a group of opcodes. An example is MOV which is tells the cpu to move numeric data from one place to another. Mov has a number of different opcodes that tell it what type of data to use, in assembly you only have to say MOV and provide the data, the assembler will choose the right opcode.

The Stack - the stack is a special place that is used to temporarily store data you can look at it like a stack of books, to add a book you PUSH it onto the stack and it's on top, to remove a book you POP it off the stack. Like a stack of books, the last book you pushed on is the first one that comes off. The current top of the stack is kept in a register called ESP (extended stack pointer)

Registers = Registers are like variables, they contain numeric data. Every register is 32 bits wide but many can be accessed in smaller chunks. EAX is accumulator, EBX is the base. these are 32bit physical locations inside the CPU that hold the data you want to process. Some registers are OK to use, some are verbotten. For example the address of the current opcode being executed by the cpu is held in the EIP (extended instruction pointer) register and you don't want to mess with that until you know alot more about machine architecture.

Some registers have special features, like ESI and EDI, they are the source and destination registers. There are opcodes that are used with these two registers to make transfering large blocks of data easier. The registers that you will see in your travels through assembler are :

32bit version - Name - 16 bit version, 8 bit versions
The 16 and 8 bit versions are the same data but allow you to bite off a smaller chunk:

In 32 bits the register is broken up as follows (E is the full, X is 16 bits, H and L are 8 bits)
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
EEEEEEEEEEEEEEEEXXXXXXXXXXXXXXXX
EEEEEEEEEEEEEEEEHHHHHHHHLLLLLLLL

EAX - Accumulator - AX ,AH/AL
EBX - Base - BX,BH/BL
ECX - Counter - CX ,CH/CL
EDX - Data - DX ,DH/DL

ESI - Source index - SI
EDI - Destination index - DI

EIP - Instuction pointer - IP

ESP - Stack pointer - SP
EBP - Base pointer - BP

There are also segment registers but in 32 bit progamming you will rarely if ever see them.

Memory = Memory is read and written to using addresses starting at 0 and working it's way up to however much you have. Windows maps memory to a specific configuration so you have to use the locations it supplies.
Posted on 2003-05-30 16:15:44 by donkey
Aceassembler I already have moderators, I don't need forumcops. When you edit your message there is a little button on top that allows you to delete it if you find it stupid. Remember you're not forced to help people if you don't want to so you don't *need* to answer but when you do *do* stay respectful.




You all have missunderstud me. It's not that i dont wont to help. It's about how dare i help when such a great programers are aruond here.I thought that my help will be lack of dignity.Now i think i was right, after looking at donkey's masterpiece :alright:
Posted on 2003-05-31 17:36:52 by AceEmbler
if you got masm32v8 and installed in c:\masm32

c:\masm32\help is a good folder

asmintro.hlp is where I would start
masm32.hlp would be my next file
from there I would start looking at MASMLIB.HLP or OPCODES.HLP
after that win32.hlp

for graphics programing fpu stuff and agner
for an IDE RadASM is good AFTER you begin to program a couple programs on your own.
Just so you can get the feel what code should look like.
(you'll spend some time looking over your buggy code and understanding it can be a pain, even though you wrote it, if the program is complex enough)
Posted on 2003-11-18 01:39:28 by Infro