I´ve written the following code in C to let create assembler code from that and to learn something about assembler.
I start with a hello world of course, and in one line, there is following:
mov DWORD PTR[esp], OFFSET FLAT:.LCO
and about LC0, it says:
.string "Hello World!"
.text
.globl main
.type main,@function
So, and I asked myself, what the meaning of line with OFFSET FLAT:.LCO ?
Am I right, when I say, that something like a pointer which points to the string is given to esp? So that esp is now pointing to the string hello world, too?
Is that right? Because this would be logical.
mov DWORD PTR[esp], OFFSET FLAT:.LCO
Moves the 4 bytes, that is the address specified .LCO to the memory location specified by ESP.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With