section .data
    msg db "Hello world!", 0ah
    v db -9
    vabs db 0, 0ah

section .text
    global _start

_start:
    mov bl, [v]
    cmp bl, 0
    jge nonfarenulla
    mov bh, 0
    sub bh, bl
    mov bl, bh
nonfarenulla:
    add bl, 48
    mov [vabs], bl
    mov rax, 1
    mov rdi, 1
    mov rsi, vabs
    mov rdx, 2
    syscall
    mov rax, 60
    mov rdi, 0
    syscall

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: