Nvis 5586A
Nvis Technologies Pvt. Ltd.
120
Program 14:
To multiply an ASCII string of eight numbers by a single ASCII digit. The result is a
string of unpacked BCD digits.
Address
Opcode
Mnemonic
Comments
0400
BE 00 05
MOV SI,0500
LOAD SI REG. WITH STARTING ADDRESS OF STRING
0403
BF 08 05
MOV DI,0508
LOAD DI REG. WITH THE STARTING ADDRESS OF
RESULT LOCNS.
0406
B2 34
MOV DL,34
LOAD DL WITH THE MULTIPLIER ASCII DIGIT
0408
B9 08 00
MOV CX,0008
LOAD COUNTER REG WITH THE NO. OF BYTES IN THE
STRING
040B
C6 05 00
MOV BYTE[DI],00
040E
80 E2 0F
AND DL, 0F
MS NIBBLE OF MULTIPLIER IS ZEROED
0411
8A 04
MOV AL, [SI]
FIRST ASCII NO. OF STRING IN AL.
0413
46
INC SI
POINT AT THE NEXT LOCN IN STRING (OF ASCII NOS.)
0414
24 0F
AND AL, 0F
MS NIBBLE AT MULTIPLIER NO GAPAND IS ALSO
ZEROED.
0416
F6 E2
MUL DL
PERFORM THE FN. AX = AL* DL
0418
D4 0A
AAM
PERFORM THE FN AH=AL/0A, AL=REMAINDER.
041A
02 05
ADD AL,[DI]
THE CONTENTS OF AL (REMAINDER OBTAINED BY
PERFORMING THE ABOVE OPERATION)
041C
37
AAA
ADDED WITH 00 WHICH ARE IN 1ST DEST.LOCN. THE
CONTENTS OF AL ARE UNPACKED DECIMAL NO. AND
ARE STORED IN 1ST DEST. LOCN (=0508).
041D
88 05
MOV [DI],AL
041F
47
INC DI
POINT AT THE NEXT DEST. LOCN.
0420
88 25
MOV [DI],AH
CONTENTS OF AH (QUOTIENT GOT IN AAM
OPERATION) ARE MOVED IN NEXT BEST. LOCN (0509).
Summary of Contents for 5586A
Page 2: ...Nvis 5586A Nvis Technologies Pvt Ltd 2...
Page 23: ...Nvis 5586A Nvis Technologies Pvt Ltd 23 Memory Read Timing in Maximum Mode...
Page 30: ...Nvis 5586A Nvis Technologies Pvt Ltd 30...
Page 48: ...Nvis 5586A Nvis Technologies Pvt Ltd 48 Diagram of module RESET power Instruction Set Note...