A problem with assembly language is that the assembler doesn't distinguish between types of numbers. It can't because of situations like this:-
Code:
samplereg equ 0x20
clr samplereg ; clear address 0x20. samplereg used as an address
movlw samplereg ; put 0x20 in the working register.
; samplereg used as a constant
movwf fsr
incf indf, f ;two lines to show a reason for the line above
It is the code writer's job to make sure that he or she uses the constants or addresses correctly.
There is absolutely no problem with having many constants or addresses set to the same number. It can be helpful and it can make the code easier to read.
for instance:-
Code:
w equ 0
f equ 1 ;destination flags
c equ 0
dc equ 1
z equ 2 ;status register bits
bsf status, c ;set the carry flag
mov samplereg, w ;move the contents of samplereg into the working register
Now in either of those two lines of code, the second arguments could be 0, c or w. All three will be compiled exactly the same and will run the same.
We use "c" and "w" because they make the code easier to write and easier to understand afterwards.
You have to remember that assemblers are only have to translate one way. When they come across "c" it is translated into 0. "w" is translated into 0. 0 is used as 0. That is a simple function.
The assembler never has to look at 0 and decide if the writer meant 0, "c" or "w" because that would be far more difficult, if not impossible.
So the answer to your question
With the above, how did it know that the name of location 00h is not ACC0 and B0?
is:-
The name of the location 00h could be B0, but it would be perverse to write code that used B0 as a register location.