1. The process of the new project is unchanged, the selection of the chip, but in the new file is the. asm suffix
2. Once the assembler is complete, place it in a folder and then right-click on the project to generate the hex file
3. Then press the Debug button
4. Step Execution (step button), you can see the changes on the right side of the PSW,R0-R7,A,B,PC, you can choose the Memory tab in the lower right corner, enter the storage space you want to see in address, you can see the changes in the content, enter address when the rule is:
Enter the address value in the Memory window, the result is the contents of the program code area, because 51 is the Harvard structure, program instruction storage and data storage separate. To see the contents of a variety of memory areas, simply enter "Letter: Address" in the Address box to display the corresponding memory value. Where the letters can be C, D, I, X, respectively, the meaning is: C: Code storage space D: Direct addressing on-chip storage space I: Indirect addressing on-chip storage X: extended external RAM space such as input "d:0x30" can display the contents of the 30H storage space directly addressed on-chip. You can also use the right-click Modify memory option to modify the contents of the specified RAM.
Debugging the assembler in Keil