While trying to make an assembler for SIC, I thought of these questions.
LABEL BYTE X'AB'
Here the generated object code would be AB
. So the object code might look something like this as an example.
001045 4C1046 AB 001045
Here I have used space to differentiate the code, but the object code would look like this.
0010454C1046AB001045
So while executing the object code how does the loader find out that the AB
is indeed a constant not part of any mnemonic object code?
I have the same question for WORD too, as the length of a WORD might be 3 bytes but how do the loader differentiate between constant and mnemonic code.
Any clarification would be appreciated.