Motorola M68CPU32BUG Manuel d'utilisateur Page 123

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 196
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 122
SYSTEM CALLS
M68CPU32BUG/D REV 1 5-9
.DIVU32 Unsigned 32 x 32 Bit Divide .DIVU32
5.2.5 Unsigned 32 x 32 Bit Divide
SYSCALL .DIVU32
TRAP CODE: $006A
Divide two 32-bit unsigned integers and return the quotient on the stack as a 32-bit unsigned
integer. The case of division by zero is handled by returning the maximum unsigned value
$FFFFFFFF.
Entry Conditions:
SP ==> 32-bit divisor (value to divide by)
32-bit dividend (value to divide)
32-bit space for result
Exit Conditions:
SP ==> 32-bit quotient (result from division)
EXAMPLE
Divide D0 by D1, load result into D2.
SUBQ.L #4,A7
Allocate space for result
MOVE.L D0,-(A7)
Push dividend
MOVE.L D1,-(A7)
Push divisor
SYSCALL .DIVU32
Divide D0 by D1
MOVE.L (A7)+,D2
Get quotient
Vue de la page 122
1 2 ... 118 119 120 121 122 123 124 125 126 127 128 ... 195 196

Commentaires sur ces manuels

Pas de commentaire