SYSTEM CALLS
M68CPU32BUG/D REV 1 5-4
.BINDEC Calculate BCD Equivalent Specified Binary Number .BINDEC
5.2.1 Calculate BCD Equivalent Specified Binary Number
SYSCALL .BINDEC
TRAP CODE: $0064
This function takes a 32-bit unsigned binary number and changes it to its equivalent BCD
(Binary Coded Decimal Number).
Entry Conditions:
SP ==> Argument: Hex number <long>
Space for result <2 long>
Exit Conditions:
SP ==> Decimal number (2 Most Significant Digits) <long>
(8 Most Significant Digits) <long>
EXAMPLE
SUBQ.L #8,A7
Allocate space for result
MOVE.L D0,-(A7)
Load hex number
SYSCALL .BINDEC
Call .BINDEC
MOVEM.L (A7)+,D1/D2
Load result into D1/D2
Commentaires sur ces manuels