Write x86 assembly to x64 processor

For example, I am running a 64-bit version of Windows 7, but all the best resources for learning assembly languages โ€‹โ€‹seem to be talking about x86. If writing x86 to x64 is possible, what's the best way to do this? Are there any converters? Also, what are some good resources for 64-bit assembly programming?

+7
source share
3 answers

x86 is definitely not the best, firstly, the assembly to study. if at all this is the last one you want to know. checkout https://github.com/dwelch67 lsasim is a set of instructions designed to teach collection. pcemu_samples is a modified pcemu (8086/88 emulator capable of running dos), with the removal of bios / dos calls, especially for learning the 8088/86 assembler. I recommend that when you get closer to building x86, you start with 8088/86, something like pcemu_samples (where you are forced to focus on assembler rather than system calls). dosbox and bochs can run 8088/86 programs with dos / bios when you want to switch to system calls. Then move on to 32 and 64-bit enhancements, multi-core and all that.

You will benefit greatly by learning x86 in the past. msp430, lsasim thing above, hand, thumb (not thumb2) are all good starting points. Learning a few different sets of instructions, at least if not many, will also be of great benefit to you. I have simulators for some of them that give you good visibility in what is happening, I recommend that you first study on simulators, simulators on which you can get visibility.

if you start with 8088/86 and then go to 386/486 and then go to x64, the other answers you get about sorta instructions working everywhere will make a lot of sense.

+3
source

Most 64-bit operating systems can run 32-bit binaries without problems. Since your question is marked [windows], you should be fine. If you follow the instructions for creating a 32-bit binary from your tutorials, the resulting binaries should work unchanged. If you use a different toolchain, you may need to find a flag that tells the assembler that it is generating 32-bit rather than 64-bit code.

The differences between programming on 32-bit and 64-bit builds are pretty slight. There are several new and improved instructions for processing 64-bit types, as well as several new register names. There is also a new ABI. Intel has guides for software developers that describe all the possible instructions and how they work.

+4
source

x64 in most cases can run x86 applications without any difficulty. There are some differences in ABI, but if you just want to learn assembly programming, any x86 resource you are looking at should be fine. As for the assembly assembly programming itself, this is a broader question. You can watch NASM to get started.

+1
source

All Articles