.section .data message: .asciz "%4d" newline: .asciz "\n" .section .text .globl main main: # Row in %ebx, column in %ecx movl $1, %ecx movl $1, %ebx row_loop_top: # Multiply movl %ecx, %eax mull %ebx # Print out the result push %rbx push %rcx mov $message, %rdi mov %eax, %esi mov $0, %rax call printf pop %rcx pop %rbx # Increment and return to top incl %ecx cmpl $25, %ecx jle row_loop_top # Move on to the next row part 1: Print a newline push %rbx push %rcx mov $'\n', %rdi call putchar pop %rcx pop %rbx // Move on to the next row part 2: Increment ebx and test movl $1, %ecx incl %ebx cmpl $25, %ebx jle row_loop_top movl $1, %eax movl $0, %ebx int $0x80