24 lines
363 B
NASM
24 lines
363 B
NASM
|
; 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
|