flat assembler
Message board for the users of flat assembler.
Index
> Main > [Solved]32 bit vs 64 bit vs AMD vs intel vs linux/window |
Author |
|
revolution 03 May 2015, 04:12
I guess we can take the question one at a time.
>1. 32 bit vs 64 bit asm- Is there a major different in the different bit types? Yes. The internal registers sizes are different. Things like overflow and carry behave differently. >How hard would it be to convert 32 bit programming to 64 bit? It depends upon what your code does. Usually for any non-trivial code it is quite time consuming and finicky. >2.AMD vs Intel - I use these two CPU the most. Do I have to program in a different manner for different CPU types with assembly? Only if you are writing very finely tuned performance applications then you could do well to consider the underlying hardware mechanics (not just the CPU but also the system board and memory). >3. Linux and windows - I use both of these operating systems and am very familiar with both. Does the assembly programming differ for these two operating systems? The interfacing, architecture and calling conventions are different. You have to rewrite your OS related code to make it work correctly. >Would assembly "Hello world" written in windows work on Linux? Not without some help from something like WINE. >4.The different assemblers. FASM vs. NASM vs. MASM. Is the code written different in each one? Yup. >1.eax An internal CPU register. 32-bits >2.ebx An internal CPU register. 32-bits >3.ecx,msg The constant "msg" (a memory pointer) and the internal CPU register ecx. 32-bits >4.edx,msg_size The constant "msg_size" and the internal CPU register edx. 32-bits >5.int 0x80 (I'm guessing int is and integer, but what is 0x80?) Nope. INT mean interrupt. In this case software interrupt number 0x80. Please read the AMD and/or Intel manuals for descriptions of each instruction. >6.eax,1 The constant "1" and the internal CPU register eax. 32-bits >7.xor ebx,ebx Zero the ebx register. Xor with itself will always give a zero result. >8.msg db 'Hello world!',0xA (What does 'db' mean and '0xA.') Define some text at the memory address "msg". DB = define byte(s). 0xA hexidecimal for 10 (a line feed (LF) character). >9.msg_size = $-msg How long is the message? $ means current address. |
|||
03 May 2015, 04:12 |
|
zutokaza 03 May 2015, 21:01
revolution wrote: I guess we can take the question one at a time. Thank you. For the "hello world" programs. What does the formats stand for? Format MZ and ELF. |
|||
03 May 2015, 21:01 |
|
zutokaza 05 May 2015, 11:14
Closed. I figured it all out. Thank you again Revolution.
|
|||
05 May 2015, 11:14 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.