Hello, I see you use the equ directive to define the Skip register. How would the compiler know that its a register you are defining as oppose to a constant? Isnt the equ directive used to initialize a constant. Ex. Five equ 5? Thanks!
I'm new at this but see your comment is unanswered.. it depends on how the equate is used; the equate is just a constant, like a #define in C. If used where an instruction expects a memory address, then it'll be an address (or 'register'). Since SKIP resolves to 0x050, then "BSF SKIP, 0x000" means "set bit 0 of memory location SKIP", which means memory location 0x050. (If it had been "BSF SKIP, 0x007" it would set bit#7 at that memory location instead.) SKIP could also be used as a /value/ in an instruction, such as "MOVLW SKIP", which I think would load the W register with the value 0x050.
If you're used to C, it would be like "#define SKIP 0x050". You can then either use it as a pointer to memory, e.g. "uchar *p = (uchar*)SKIP;", or as a value, e.g. "int val = SKIP;". Depends on how it's used.
Thank you, I'm glad you found it helpful. No, it is not. I feel that the best way to learn code is by typing it. Copy and paste is mindless and provides no opportunity for personal development.