Motorola M68CPU32BUG User Manual page 118

Debug monitor
Table of Contents

Advertisement

.BINDEC
Calculate BCD Equivalent Specified Binary Number
5.2.1
Calculate BCD Equivalent Specified Binary Number
SYSCALL
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 ==>
Exit Conditions:
SP ==>
EXAMPLE
SUBQ.L
#8,A7
MOVE.L
D0,-(A7)
SYSCALL
.BINDEC
MOVEM.L
(A7)+,D1/D2
M68CPU32BUG/D REV 1
.BINDEC
Argument: Hex number
Space for result
Decimal number
Allocate space for result
Load hex number
Call .BINDEC
Load result into D1/D2
<long>
<2 long>
(2 Most Significant Digits)
(8 Most Significant Digits)
5-4
SYSTEM CALLS
.BINDEC
<long>
<long>

Advertisement

Table of Contents
loading

Table of Contents