| | |
Nasm for 64 bit programming
![]() |
•
•
Join Date: Jul 2009
Posts: 1
Reputation:
Solved Threads: 0
Sorry for a late reply, I just recently joined. NASM 64-bit support was introduced by Keith Kanios, and revised by H. Peter Anvin. Just about all the recent versions you get are fully 64 bit compliant with the exception of the MS/DOS build (afair).
The 64 bit general purpose registers have been given the designation r?x for example, rax, rbx, rcx and so on. The extended registers begin with r[8-15] then are followed with an optional size designation for byte and dword sized variables. Examples include R8B, R9D, and R15. Here are a few simple mov instructions for you to get the idea:
If you want more information, like how to handle relative and absolute displacement (not that hard since NASM supports a32, abs, r32, and rel) I suggest you check out the NASM latest release of the NASM documentation.
The 64 bit general purpose registers have been given the designation r?x for example, rax, rbx, rcx and so on. The extended registers begin with r[8-15] then are followed with an optional size designation for byte and dword sized variables. Examples include R8B, R9D, and R15. Here are a few simple mov instructions for you to get the idea:
Assembly Syntax (Toggle Plain Text)
; Set several registers to the value of __BITS__ internal definition mov RAX, %[__BITS__] ; Move QWORD value into RAX mov R8B, %[__BITS__] ; Move BYTE value into R8 mov R9D, %[__BITS__] ; Move DWORD value into R9 mov R15, %[__BITS__] ; Move QWORD value into R15
If you want more information, like how to handle relative and absolute displacement (not that hard since NASM supports a32, abs, r32, and rel) I suggest you check out the NASM latest release of the NASM documentation.
![]() |
Similar Threads
- Help With My Fy Project (C++)
- C++ Programming issue (C++)
- Straight C (C++)
- C++ programming on Fedora 5 with Eclipse but how? (C++)
- which degree (IT Professionals' Lounge)
- Arrays in PHP (PHP)
- Displaying QBasic Object Code (Visual Basic 4 / 5 / 6)
- Desiging a set of rules for a match (C++)
- VB .net vs VS .net (VB.NET)
Other Threads in the Assembly Forum
- Previous Thread: convert decimal digit to string and print
- Next Thread: Help with making a maze game with MASM
| Thread Tools | Search this Thread |





