.data
s: .asciz "%d x %02d = %02d\n"
.text
.global main
main:
 movl $0, %ebx
for_ebx:
 cmpl $10, %ebx
 jg endfor_ebx # %ebx > $10
 movl $0, %ecx
for_ecx:
 cmpl $10, %ecx
 jg endfor_ecx # %ecx > $10
 movl %ecx, %eax
 imull %ebx, %eax
 pushl %eax
 pushl %ecx
 pushl %eax
 pushl %ecx
 pushl %ebx
 pushl $s
 call printf
 addl $16, %esp
 popl %ecx
 popl %eax
 incl %ecx
 jmp for_ecx
endfor_ecx:
 incl %ebx
 jmp for_ebx
endfor_ebx:
 movl $0, %ebx
 movl $1, %eax
 int $0x80

# #include<stdio.h>
# main() {
#     int i, j;
#     for(i=0;i<=10;i++) {
#         for(j=0;j<=10;j++) {
#             printf("%d x %02d = %02d\n", i, j, i*j);
#         }
#         printf("\n");
#     }
# }

