Nvis 5586A
Nvis Technologies Pvt. Ltd.
116
Program 11:
To add two Binary numbers each 8 Bytes long.
Address
Opcode
Mnemonic
Comments
0400
F8
CLC
CLEAR CARRY FLAG.
0401
B9 04 00
MOV CX,0004
LOAD COUNTER REGISTER WITH NO. OF TIMES ADDITION
TO BE PERFORMED (I.E. INITIALIZE THE COUNTER
REGISTER).
0404
BE 00 05
MOV SI,0500
LOAD SOURCE INDEX REG. WITH STARTING ADDRESS OF
IST BINARY NO. (LSBS ARRAY).LOAD DESTINATION
INDEX REG. WITH DEST. ADDRESS (WHERE THE RESULT
OF
0407
BF 08 05
MOV DI, 0508
ADD. IS TO BE STARTED STORING). ALSO IT‘S THE
STARTING ADDRESS OF MSBS OF ARRAY.
040A
8B 04
MOV AX,[SI]
LOAD DATA BYTES (WHICH ARE IN LOCATION 0500 AND
0501 IN 16 BIT ACC.
I.E. (0500) – AH
(0501) – AL
040C
11 05
ADC [DI],AX
ADD THE CONTENTS(MS BYTES) OF 0508, 0509 WITH THE
CONTENTS (LS BYTES) OF 0500 + 0501 AND STORE THE
RESULT IN LOCATION 0508 ONWARDS.
040E
46
INC SI
POINT AT 0502 LOCN (NEXT RELEVANT SOURCE LOCN).
0410
47
INC DI
POINT AT NEXT RELEVANT LOCN, I.E. 0504.
0411
47
INC DI
0412
49
DEC CX
DECREMENT THE COUNTER.
0413
75 F5
JNE 040A
IF NOT ZERO (I.E. CX =0000) THEN CONTINUE ADDITION
ELSE,
0415
F4
HLT
HALT.
Note:
Press F7 button of keyboard (connected to techbook) and then press D, enter address
(from where data is to be entered), press enter and start feeding data.
For example:
After Execution
0500 :
01 0508 :
0A
0508 :
0B
0501 :
02 0509 :
0B
0509 :
0D
0502 :
03 050A :
0C
050A :
0F
0503 :
04 050B :
0E
050B :
12
0504 :
05 050C :
0F
050C :
14
0505 :
06 050D :
10
050D :
16
0506 :
07 050E :
11
050E :
18
0507 :
08 050F :
12
050F :
1A
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...