User manual

Table Of Contents
SYSTEM CALLS
M68CPU32BUG/D REV 1 5-14
.MULU32 Unsigned 32 x 32 Bit Multiply .MULU32
5.2.10 Unsigned 32 x 32 Bit Multiply
SYSCALL .MULU32
TRAP CODE: $0069
Multiply two 32-bit unsigned integers and return the product on the stack as a 32-bit unsigned
integer. No overflow checking is performed.
Entry Conditions:
SP ==> 32-bit multiplier
32-bit multiplicand
32-bit space for result
Exit Conditions:
SP ==> 32-bit product (result from multiplication)
EXAMPLE
Multiply D0 by D1, load result into D2.
SUBQ.L #4,A7
Allocate space for result
MOVE.L D0,-(A7)
Push multiplicand
MOVE.L D1,-(A7)
Push multiplier
SYSCALL .MULU32
Multiply D0 by D1
MOVE.L (A7)+,D2
Get product
SYSTEM CALLS
M68CPU32BUG/D REV 1 5-11
.INCHR Input Character Routine .INCHR
5.2.7 Input Character Routine
SYSCALL .INCHR
TRAP CODE: $0000
Reads a character from the default input port. The character remains in the stack.
Entry Conditions:
SP ==> Space for character <byte>
Word fill <byte>
Exit Conditions:
SP ==> Character <byte>
Word fill <byte>
EXAMPLE
SUBQ.L #2,A7 Allocate space for result
SYSCALL .INCHR Call .INCHR
MOVE.B (A7)+,D0 Load character in D0
Fr
eescale S
emiconduct
or
, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...