# An example of the DIV instruction.
#
# DIV 用于无符号整数的除法操作。
#
.section .data
dividend:
.quad 8335
divisor:
.int 25
quotient:
.int 0
remainder:
.int 0
output:
.asciz "The quotient is %d, and the remainder is %d\n"
.section .text
.globl main
main:
nop
movl dividend, %eax
movl dividend+4, %edx
divl divisor
movl %eax, quotient
movl %edx, remainder
push remainder
push quotient
push $output
call printf
add $12, %esp
push $0
call exit