Skip to content

Instantly share code, notes, and snippets.

@0x61nas
Created February 6, 2024 09:06
Show Gist options
  • Save 0x61nas/4c5fc6092fe9f3d76aa101bcbebf4b47 to your computer and use it in GitHub Desktop.
Save 0x61nas/4c5fc6092fe9f3d76aa101bcbebf4b47 to your computer and use it in GitHub Desktop.
; Data stored inside CPU register called _register data_.
; and accessing register data directly is addressing mode called _register addressing_
section .data
section .text
global .start
start:
mov rbp, rsi ; 64-bit
mov ecx, edx ; 32-bit
add di, ax ; 16-bit
add bl, ch ; 8-bit
; If you're moving data from register to another then the source and dist _must_ be the same size.
;mov di, rsi ; invalid operands combination
section .bass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment