diff options
Diffstat (limited to 'x86_64/reg_size.s')
| -rw-r--r-- | x86_64/reg_size.s | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/x86_64/reg_size.s b/x86_64/reg_size.s new file mode 100644 index 0000000..e374922 --- /dev/null +++ b/x86_64/reg_size.s @@ -0,0 +1,17 @@ +# Program to play around with different register sizes + +.set exit_num, 60 + +.section .text +.globl _start + +_start: + movw $0b0000101000000101, %bx #10d and 5d into high and low registers + addb %bh, %bl + movb $0, %bh + + # %bh now contains 10+5, use it as an argument to exit() + + movq %rbx, %rdi + movq $exit_num, %rax + syscall |
