sfl-examples/slide-examples/ex22.asm

24 lines
363 B
NASM
Raw Normal View History

2023-12-14 14:12:51 +01:00
; CFG example
bits 64
SECTION .data
; empty
SECTION .text
global _start
_start:
mov rbx, 0
test rbx, rbx
jz newBB1
mov rbx, 0
newBB1:
jmp return
mov rax, 0xdeadc0de
return:
; sys_exit(42)
mov rdi,rax ; system call return value
mov rax,60 ; system call number (sys_exit)
syscall