Hi all,
I've started going through a few asm programs to try and understand how all this stuff works and then start my own program. On the following link (https://jap.hu/electronic/cl2-025.zip) there is a file called cl2-025.asm - near the top of the file is:
messages clrf PCLATH
movwf PCL
msg_code dt "enter code: ", 0
From what I've read the PCL and PCLATH are program counters. What is the purpose of the above instructions - why would you want to change the program counter?
I've started going through a few asm programs to try and understand how all this stuff works and then start my own program. On the following link (https://jap.hu/electronic/cl2-025.zip) there is a file called cl2-025.asm - near the top of the file is:
messages clrf PCLATH
movwf PCL
msg_code dt "enter code: ", 0
From what I've read the PCL and PCLATH are program counters. What is the purpose of the above instructions - why would you want to change the program counter?