Problems on Moving Data
Problems Write programs that will accomplish the desired tasks listed below, using as few lines of code as possible. Use only opcodes that have been covered up to this chapter. Comment on each line of code. 1. Place the number 3Bh in internal RAM locations 30h to 32h. 2. Copy the data at internal RAM location Flh to R0 and R3. 3. Set the SP at the byte address just above the last working register address. 4. Exchange the contents of the SP and the PSW. 5. Copy the byte at internal RAM address 27h to external RAM address 27h. 6. Set Timer 1 to A23Dh. 7. Copy the contents of DPTR to registers R0 (DPL) and R1 (DPH). 8. Copy the data in external RAM location 0123h to TL0 and the data in external RAM location 0234h to TH0. 9. Copy the data in internal RAM locations 12h to 15h to internal RAM locations 20h to 23h: Copy 12h to 20h. 13h to 21h, etc. 10. Set the SP register to 07h and PUSH the SP register on the stack; predict what number is PUSHed to address 08h. 11. Ex...