Closed frodare closed 6 years ago
I don't think it should automatically include a label. In ”real” assembly, you put your own label before any "db"s you need them for.
OK, I think I see what you are saying. After looking around I found two ways DB is used:
var_name DB 0xff
var_name: DB 0xff
The latter one would be easier to deal with.
var_name:
DB 0xff
DB 0xfe
MOV a, var_name
MOV b, var_name+1 ; <- how do you do label offsets? Is that a thing?
Is this how you think it would be used, or is a label required for every DB?
Yes, label offsets are a thing (thankfully).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This will need some additional research. I am thinking when the DB instruction is assembled, it will store a the byte in the assembled program along with a label that can be used as an operand.