diff options
Diffstat (limited to '2522/CH7/EX7.4')
-rwxr-xr-x | 2522/CH7/EX7.4/exm7_4.sce | 33 | ||||
-rwxr-xr-x | 2522/CH7/EX7.4/exm7_4_output1.jpg | bin | 0 -> 27847 bytes | |||
-rwxr-xr-x | 2522/CH7/EX7.4/exm7_4_output2.jpg | bin | 0 -> 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 Binary files differnew file mode 100755 index 000000000..8aea52faa --- /dev/null +++ b/2522/CH7/EX7.4/exm7_4_output1.jpg diff --git a/2522/CH7/EX7.4/exm7_4_output2.jpg b/2522/CH7/EX7.4/exm7_4_output2.jpg Binary files differnew file mode 100755 index 000000000..a74a894f8 --- /dev/null +++ b/2522/CH7/EX7.4/exm7_4_output2.jpg |