Quote:
Where can i find this information, is there a website you can refer me too?
Download the programming manual from WDC's website,
www.westerndesigncenter.com. The manual is really, really good. We used to have to pay $65 for it, but now it's free for the download.
Your BEQ instruction above will not normally end up with the operand you show. Some assemblers may take that to mean BEQ forward 3 bytes, and others may take it to mean BEQ to address 0003. The operand is a count from the address of the first byte of the next instruction. So for example, F0 00 would end up in the same place whether the zero flag was set or not, although there will be a one-clock difference in execution time. F0 FE, if the branch is taken, will repeat itself endlessly, because it goes two bytes back to the beginning of the same instruction., ie, to itself.
You won't normally have numbers there in the source code though, but rather label references. This is not only so you don't have to count the offset yourself (which is prone to errors), but also so you can insert and delete portions of code without having to manually fix the offset. Typical examples would be BEQ NEXT_CHR, BEQ INIT_LINE, etc..