section .data
buf db 0, 0ah
section .text
global _start
_start:
mov rcx, 1 ; カウンタ
loop:
mov al, cl ; rcx → al
add al, '0'
mov [buf], al
; write
mov rax, 1
mov rdi, 1
mov rsi, buf
mov rdx, 2
syscall
inc rcx ; ← これが無いと無限ループ
cmp rcx, 6
jne loop
; exit
mov rax, 60
xor rdi, rdi
syscall
To embed this project on your website, copy the following code and paste it into your website's HTML: