News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

What I Want to do

Started by Evan, December 07, 2013, 02:21:14 PM

Previous topic - Next topic

Evan


Use Stack
Use first peaces of stack as registers


I have no idea how but I think I can use my memory properly.

Evan

Can I use .data? as ram


??


As the numbers where computer chooses addresses for you?

dedndave

.DATA is a "program section" that is essentially RAM
when a program is executed, all the sections are probably loaded into RAM (if it's not too big)
there are many ways to use the stack
a common way is to use PUSH and POP

        push    eax             ;the contents of the EAX register are saved on the stack
;
;other code
;
        pop     eax             ;the value at the top of stack is loaded into EAX

jj2007

Evan,

Tonight you have opened three new threads titled "What I Want to do New", "What if I mess up?" and "Yeah guys still I don't know".

I'm not the Forum police here, but do you thinks it's nice to dump your vague ideas into the Campus? If you really think it is important to ask such questions (what about reading a book? Art of Assembly, for example?), well, stick to this thread, and only this thread, and don't clutter the Campus with new threads all the time.

P.S.: Good reading maintained by a certain Evans.

dedndave

Jochen has a point, Evan
assembly language is not really for beginners
you should learn to perform some basic tasks before attempted the advanced ones

K_F

Quote from: Evan on December 07, 2013, 02:21:14 PM
Use Stack
Generally this is automatic

Quote
Use first peaces of stack as registers
Local variables do this.

Also I'd be careful about stack over-usage.. you can mess things up very quickly.

Another thing you can do is grab some memory through the system allocator.
Your code signature would be smaller, but you'll use a lot of pointers and offsets

In any event they all use memory - it's just the method that differs.
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

Evan

Quote from: dedndave on December 08, 2013, 01:01:53 AM
Jochen has a point, Evan
assembly language is not really for beginners
you should learn to perform some basic tasks before attempted the advanced ones
I am sorry. I am trying to think very small really hard.

dedndave

it's ok - i can see you have a little trouble with English
you might try playing with
translate.google.com

you can type in one language and it will give you whatever other language you select