Running 8085 program in single-step mode

MicrocontrollerMicroprocessor8085

Running the program in Single-Step Mode:

The single step mode is very useful for finding our program which has not yielded the desired outcomes after being executed in a single burst. We use it for program debugging. Similarly, like the operation to be executed singly ‘S’ is typed at the ‘>’ prompt. We can notice clearly that the change of address <cr> occurs after S. The given system clearly prompts which is stated below:

The address of starting is: xxxx - yy/

where the memory address is xxxx and the content of the located memory is yy which allows for responding the user with the desired address starting for single-stepping process. If we execute our program for being executed from the stated location xxxx, we respond to <sb>. We denote <sb> stands for Space Bar Key pressing, which is too wide on the keyboard. If the location of our program is from C000H, we respond to ‘C000<sb>’.

After that ‘C000-21/’ is displayed by the system where the location of the memory content 21 is C000H. Then after responding to <sb> is done by us.

Examine registers command: For checking the register values, we type ‘X’ without the change of address<cr>. The prompting of the entire system is stated below:

Register:

The require the user for responding with the desired name of the register. If the contents of the register C register are to be seen, we type C without the change of address <cr>. We get responded immediately to

C5xx-

where the content of the register C is xx, which allows the user for entering a new value in the place specified for xx. As an example, if we want the register C to have 36H, we get responded to 36 and the change of address <cr> or <sb>. If the contents of the register are not to be changed by the user, then responding to change of address of <cr> or <sb> is carried out. If it is the change of address i.e. <cr>, the command X gets terminated, and the prompt ‘>’ reappears again. If it turns to <sb> the content of the register D automatically gets displayed by the system which allows the user for entering a new value optionally to the register D. By repeatedly using <sb> all the contents can be seen by us, and if it is desired, we can modify all the contents, of every registers. The sequence of Register A, is as follows:

                                                  A, B, C, D, E, F, I, H, L, SPH, SPL, PCH and PCL

Here F is the register of the flag, SPH and SPL are the MOST SIGNIFICANT BIT and the LEAST SIGNIFICANT Bytes of SP, PCH and PCL. The register I of 8 BITS provides the mask status of the interrupt.

Display memory command: For displaying the contents of the memory, we type ‘D’ without the change of address <cr>. The prompting is done as

Starting address:

The user is required to respond with the desired starting address for memory display. The user is required to provide the memory address in hexadecimal without the H suffix and <cr> (e.g. ‘C200<cr>’).

Then the system prompts the user for ending address. When the user provides the ending address, the contents of the desired memory locations are displayed on the terminal, and the ‘>’ prompt reappears. Using this command, we can only see the contents of a number of memory locations, but not alter them. To modify the contents of memory locations we use the modified memory command.

The single step continues after checking the registers/memory: We must say that the contents of the register and memory have satisfied us after stepping single the program by a few set of instructions. After that we continue the remaining part of the program in the single-step mode.

We type ‘S’ without the change of address <cr> at the prompt ‘>’. The prompting of the system are as follows:

The address of starting is: xxxx - yy

where xxxx is the address of the memory and the content of the located memory is yy. The correct address of the instruction is xxxx where to continue we have to do the single-stepping. For the termination of single-stepping we respond with the change of address <cr>, and the prompt ‘>’ prompt comes. The final checking of the contents of the register and memory are checked, and the stepping single is continued till program end.

Display memory command: For displaying the contents of the memory, we type ‘D’ without the change of address <cr>. The prompting is done as

Starting address:

The user is required to respond with the desired starting address for memory display. The user is required to provide the memory address in hexadecimal without the H suffix and <cr> (e.g. ‘C200<cr>’).

Then the system prompts the user for ending address. When the user provides the ending address, the contents of the desired memory locations are displayed on the terminal, and the ‘>’ prompt reappears. Using this command, we can only see the contents of a number of memory locations, but not alter them. To modify the contents of memory locations we use the modified memory command.

Continuing with single step after checking registers/memory: We must say that the contents of the register and memory have satisfied us after stepping single the program by a few set of instructions. After that we continue the remaining part of the program in the single-step mode.

We type ‘S’ without the change of address <cr> at the prompt ‘>’. The prompting of the system are as follows:

The address of starting is: xxxx - yy

where xxxx is the address of the memory and the content of the located memory is yy. The correct address of the instruction is xxxx where to continue we have to do the single-stepping. For the termination of single-stepping we respond with the change of address <cr>, and the prompt ‘>’ prompt comes. The final checking of the contents of the register and memory are checked, and the stepping single is continued till program ends.

raja
Published on 28-Feb-2019 11:24:25
Advertisements