Experiment 5: Address vs. Content and Addressing Modes urpose: To explore the effects and properties of the various addressing modes of the microprocessor. 1. Start DOSBOX, enter this command: mount c c:ltasm, switch to c:. Use EDIT editor to create the file ADDRESS.ASM. This will be a program source file. Enter the source statements shown below. 3. After you complete the data entry task, save the file and close the editor. Then assemble and link the program following this procedure: tasm address.asm to assemble, tlink address.obj to link. 4. Start the Turbo Debugger and load the program by typing the following command: td address.exe 5. Use F7 to execute the program one instruction at a time and observe the contents of the registers and the 5. 6. 7. memory located at DS: 0000 through DS: 00FF Step the program four more times. Direct the memory window to show the addresses given by DS:BX Continue stepping the program and observe the contents of memory as the program executes each loop. Record, using the space provided below, what registers and/or memory locations change as a result of the instruction execution. MODEL SMALL DATA ARRDATA DB 256 DUP 0 : set up data area Write the new value stored CODE STARTUP MOV AX, @DATA MOV DS, AX MOV ES, AX MOV AX, oFFFFH MOV DI, 10h MOV CX, AX LEA BX, ARRDATA Immediate move MOV [ARRDATA+2], AX Direct move MOV [BX], AX MOV [BX +4], AX MOV [BX+DI, AX MOV [BX + 16+ DI], AX ; Base Relative plus Index EXIT END in the destination (first) operand here DS= AX- ; Set up for DOS return Get the data segment value in AX Copy to the segment register DS ; Copy to ES also : Pattern to write : Index value to sixteen Register to register move ; Register Indirect move ; Register Relative move ; Base plus Index move ; EXIT TO DOS Experiment 5: Address vs. Content and Addressing Modes urpose: To explore the effects and properties of the various addressing modes of the microprocessor. 1. Start DOSBOX, enter this command: mount c c:ltasm, switch to c:. Use EDIT editor to create the file ADDRESS.ASM. This will be a program source file. Enter the source statements shown below. 3. After you complete the data entry task, save the file and close the editor. Then assemble and link the program following this procedure: tasm address.asm to assemble, tlink address.obj to link. 4. Start the Turbo Debugger and load the program by typing the following command: td address.exe 5. Use F7 to execute the program one instruction at a time and observe the contents of the registers and the 5. 6. 7. memory located at DS: 0000 through DS: 00FF Step the program four more times. Direct the memory window to show the addresses given by DS:BX Continue stepping the program and observe the contents of memory as the program executes each loop. Record, using the space provided below, what registers and/or memory locations change as a result of the instruction execution. MODEL SMALL DATA ARRDATA DB 256 DUP 0 : set up data area Write the new value stored CODE STARTUP MOV AX, @DATA MOV DS, AX MOV ES, AX MOV AX, oFFFFH MOV DI, 10h MOV CX, AX LEA BX, ARRDATA Immediate move MOV [ARRDATA+2], AX Direct move MOV [BX], AX MOV [BX +4], AX MOV [BX+DI, AX MOV [BX + 16+ DI], AX ; Base Relative plus Index EXIT END in the destination (first) operand here DS= AX- ; Set up for DOS return Get the data segment value in AX Copy to the segment register DS ; Copy to ES also : Pattern to write : Index value to sixteen Register to register move ; Register Indirect move ; Register Relative move ; Base plus Index move ; EXIT TO DOS