Re: Question about jumps
- From: Herbert Kleebauer <klee@xxxxxxxxx>
- Date: Sun, 27 Aug 2006 13:27:20 +0200
Markus Pitha wrote:
Am Sun, 27 Aug 2006 12:49:37 +0200 schrieb Herbert Kleebauer:
Markus Pitha wrote:
segment .data
Is your program (and not only the data) really stored and executed
in the data segment? Which assembler sets the data segment executable?
No, it was my mistake. The program is stored in the .text segment. I just
wanted to delete all the unnecessary code and obviously I deleted too
much.
There is no need to put read only data in the data segment,
it is best placed in the code segment.
successmsg db "eax is set to 1.", 0, 10^
Which purpose has the 0?
0 terminates the string and 10 is a newline, isn't it?
C uses NULL terminated strings, bur we are in assembly (and
here we decide ourselves how to terminate an string). Redirect
the output to a file and look at the hex dump of the file,
then you will see, the 0 is written as part of the string
to stdout.
.
- Follow-Ups:
- Re: Question about jumps
- From: Markus Pitha
- Re: Question about jumps
- References:
- Question about jumps
- From: Markus Pitha
- Re: Question about jumps
- From: Herbert Kleebauer
- Re: Question about jumps
- From: Markus Pitha
- Question about jumps
- Prev by Date: Re: Question about jumps
- Next by Date: Re: Question about jumps
- Previous by thread: Re: Question about jumps
- Next by thread: Re: Question about jumps
- Index(es):
Relevant Pages
|