🌏Source

sys_write       equ     0x4
sys_exit        equ     0x1
stdin   equ     0x0
stdout  equ     0x1
section .data
        msg     db      "Hoc, hoc nua, hoc mai", 0xa, 0xd
        len     equ     $-msg
        msg1    db      "In ra 10 dong chu giong nhau", 0xa, 0xd
        len1    equ     $-msg1
section .text
        global _start
_start:
        mov     eax, sys_write
        mov     ebx, stdout
        mov     ecx, msg1
        mov     edx, len1
        int     0x80

        mov     ecx, 0xa
        l1:
                push    ecx        ; push ecx onto stack to save value
                mov     eax, sys_write
                mov     ebx, stdout
                mov     ecx, msg
                mov     edx, len
                int     0x80
                pop     ecx        ; pop ecx to decrease loop time.
        loop    l1

        mov     eax, sys_exit
        int     0x80

Last updated