Re: Disassembler questions




On 26-Jul-2008, "Benjamin David Lunt" <spamtrap@xxxxxxxxxx> wrote:

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

The code looks like Linux, but the int 21h looks like DOS.
I haven't done any Linux programming, so I may be wrong here,
but shouldn't the int 21h be int 80h?

that is dos code ^_^ but yea you are right to work in linux it needs to be
80h (i've tried on both os)

i have been messing around with differant methods and found that objdump (i
think it is a linux but also comes with djgpp) gives the best results so
far but it requires some clean up to code
i can figure out the trivial stuff like "test.o: \n\n\t Disassembly of
`_main':" like stuff but there is some syntax that i cannot understand such
as "call 4004e0 <_start+0x90>", well i understand it but i don't know how
to make it assemble correctly

.



Relevant Pages