summaryrefslogtreecommitdiff
path: root/2522/CH7/EX7.4
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2522/CH7/EX7.4
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2522/CH7/EX7.4')
-rwxr-xr-x2522/CH7/EX7.4/exm7_4.sce33
-rwxr-xr-x2522/CH7/EX7.4/exm7_4_output1.jpgbin0 -> 27847 bytes
-rwxr-xr-x2522/CH7/EX7.4/exm7_4_output2.jpgbin0 -> 13512 bytes
3 files changed, 33 insertions, 0 deletions
diff --git a/2522/CH7/EX7.4/exm7_4.sce b/2522/CH7/EX7.4/exm7_4.sce
new file mode 100755
index 000000000..8de6ed61f
--- /dev/null
+++ b/2522/CH7/EX7.4/exm7_4.sce
@@ -0,0 +1,33 @@
+//page no 222
+//example no 7.4
+// USE OF ADDRESSING MODES.
+clc;
+//register B contains 32H
+B=32;
+
+//using indirect addressing modes
+printf('B= %d \n',B);
+disp(' 1) LXI H,8000H'); // loads HL register pair.
+disp('H=80H L=00H');
+disp('MOV M,B'); // contents of register B are moved in memory location pointed by HL register pair.
+M=B;
+printf('\n 8000H --> %d \n \n',M);
+
+disp('LXI D,8000H'); //loads the memory location 8000H in DE register pair.
+disp('D=80H E=00H');
+disp('MOV A,B');
+A=B;
+printf('A= %d \n',A);
+disp('STAX D'); //stores the value of accumulator in the memory location pointer by DE register pair.
+printf('\n 8000H --> %d \n \n',A);
+
+//using direct addressing mode.
+disp('2) A= F2H');
+disp('STA 8000H'); //this instruction stores the value of accumulator in the memory location 8000H.
+disp('8000H --> F2H');
+
+//using indirect addressing mode.
+disp('3) LXI H,8000H'); // loads HL register pair.
+disp('H=80H L=00H');
+disp('MVI M,F2H'); //moving the data in the memory.
+disp('8000H --> F2H');
diff --git a/2522/CH7/EX7.4/exm7_4_output1.jpg b/2522/CH7/EX7.4/exm7_4_output1.jpg
new file mode 100755
index 000000000..8aea52faa
--- /dev/null
+++ b/2522/CH7/EX7.4/exm7_4_output1.jpg
Binary files differ
diff --git a/2522/CH7/EX7.4/exm7_4_output2.jpg b/2522/CH7/EX7.4/exm7_4_output2.jpg
new file mode 100755
index 000000000..a74a894f8
--- /dev/null
+++ b/2522/CH7/EX7.4/exm7_4_output2.jpg
Binary files differ