Very nice ASM coding
Ive been trying to get my head round this ASM code. Mike's ASM seems to do almost exactly what i want but i just want to clarify things as im completely new to ASM.
Is W some kind of temp byte? It appears that ASM compare commands only accept 1 input and that is always compared with W.
Ive read the part in the datasheet about CPFSGT. It says "Compare f with W, skip if f > W". I assume this means skip the following line of code
BCF looks pretty obvious. What is "Shadow" though? Is that a predefined variable of some kind or does it need declaring anywhere?
Yes, W is the Accumulator on which almost all operations are performed.Is W some kind of temp byte? It appears that ASM compare commands only accept 1 input and that is always compared with W.
Yes, shadow is a byte sized variable which holds a copy of the actual bits which turn on/off the leds attached to PORTB. It has to be declared like thisWhat is "Shadow" though? Is that a predefined variable of some kind or does it need declaring anywhere?
Code:shadow: var byte
So "LATB" is the ASM version of PORTB?
Is Shadow just a normal variable then? So i could call it LATBTemp if i wanted?
Is there a reason i would use Shadow instead of performing the operations directly on LATB?
Bookmarks