Outputting pins High/Low
·Hey thanks for the previous help with the high and low outputs. Due to my inquisitive mind i was experimenting with the program and was able to remove a few parts and make it simpler but I am confused as to why the program ceases to function without the "@" in the "jmp @Main" line. Using "jmp Main" when connecting 2 LEDs to low caused the LEDs to saty off but when I type the @ back in it works fine. I was wondering why this happened and the reason for using the "@" in front of the Main.
···Attatched·is the·program that PJMonty sent me regarding turning output pins into high/low pins. Then the next attatchment should be the program that I made trying to figure out the above issue. Also if anyone would be willing to look over my program of turning output pins to high and low without using the "setb, clrb" method then the help is appreciated.
Thanks for your consideration,
Calebjo
···Attatched·is the·program that PJMonty sent me regarding turning output pins into high/low pins. Then the next attatchment should be the program that I made trying to figure out the above issue. Also if anyone would be willing to look over my program of turning output pins to high and low without using the "setb, clrb" method then the help is appreciated.
Thanks for your consideration,
Calebjo
SRC
![](/plugins/FileUpload/images/file.png)
967B
Comments
jmp @Main
it will generate
page Main
jmp Main
In your RVW_006 code, the program entry point is at address 0 in page 0, and the jmp Main there will not work as you might expect because the target, i.e. Main is located in another page (in page $200 in your sample).
When you single-step your code with the debugger (or with SXSim), you will notice that after jmp Main, the program continues at address 0 but not at $200 as it should. When you place the @ in front of Main, or if you place the instruction page Main before the jmp, the jump should be performed as expected.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
Thanks,
Calebjo