|
Thanks for all the suggestions! PBASIC is not overly complicated (no order of operations!), so none of it should be too technically difficult. As for the 255 thing, I'm not going to check it. After all, if your code ends up producing 255's, you probably want to know! The way I've planned out the tokenizer, expressions such as x=5*y/z will be evaluated in two steps, so truncating shouldn't be an issue. The way I'm planning on doing individual bit assignments is to use different algorithms for 1 and 0. For setting a bit to 1, I will use | with everything set to 0's except the bit that needs setting. For clearing a bit, I will use & with a mask of all 1's except for the bit that needs clearing.
One more questions: has anyone ever had a need to access a specific nibble in a byte, or a specific byte in word? Is this even possible?
|