Hi, I have just started using your uvision2. I received your tool when I bought the phillips development system. Here's my problem: I am targeting a philips 764 controller, this is a 8051 compatible, all code was written in assembly language. When I go to build an existing file which used the 'b' register I get the following error error A48: DATA-ADDRESS EXPECTED the line of the code it is issuing this error for is below clr b Thanks, John
Hi Jon, Regarding your question What does it encode that instruction as? That is CLR B Here you go I have been using the AVOCET SYSTEMS Assembler (AvCase), here's how it encoded the CLR B instuction CLR A E4 CLR B C2 F0 BTW CLR tr0 C2 8C CLR ea C2 AF Regards, John
IMHO I think your previous Avocet assembler had a serious problem. The produced code
CLR A E4 CLR B C2 F0 CLR tr0 C2 8C CLR ea C2 AF
Well, I don't profess to be an expert, and I'll run the sim again, but it's working in a prototype. I'll double check it regardless. Thanks, John
Just cos something's "working" doesn't mean to say that it's correct! It could be a pure fluke - maybe B just happens to only ever be set to 1 at that point in the code, so clearing bit 0 of B has the same effect as clearing B? Maybe the original programmer realised that only bit 0 was cleared, and was careful only ever to set set B to 0 or 1? Or maybe he was just plain lucky!?
Loet, You are correct. After running the Sim Bit 0 of the B register is being cleared not the entire B register. It did not impact the application because it is only used as temp storage for A while A is being used. Good Observation, John