Disassembler questions
- From: thiesd <spamtrap@xxxxxxxxxx>
- Date: Sat, 26 Jul 2008 17:35:39 GMT
Hello,
I have been recently trying to see how some simple c programs translate
into assembly but my efforts have led to endless segfaults after
reassembling them
so i started with a simple hello world program
int main(){
printf("Hello, World!\n");
}
which to my surprise "ndisasm -b 32" returned a asm file that was 30000+
lines long
so i thought hmm that wasn't right
so i did the simple hello world with nasm
section .data
msg db "Hello, World!","$"
len equ $ - msg
section .code
global _start
_start:
mov edx,len
mov ecx,msg
mov ebx,1
mov eax,4
int 21h
mov eax,1
mov ebx,0
int 21h
also returned code with several thousands of line (mostly 'add [eax], al')
any way i was wondering if there was a disassembler that if you reassemble
it it works like the first program
also i get stuff that doesn't work right like 'loopne 0x154f38'
i also tried udis but that worked less than ndisasm
-dylan
.
- Follow-Ups:
- Re: Disassembler questions
- From: Dylan Thies
- Re: [Clax86list] Disassembler questions
- From: Charles Crayne
- Re: Disassembler questions
- From: Frank Kotler
- Re: Disassembler questions
- From: Benjamin David Lunt
- Re: Disassembler questions
- From: Benjamin David Lunt
- Re: Disassembler questions
- Prev by Date: Re: Problem Linking (win32)
- Next by Date: Re: Atomic operations in 32 and 64 bit platforms
- Previous by thread: Variable values are lost
- Next by thread: Re: Disassembler questions
- Index(es):
Relevant Pages
|