Implement the DB instruction
frodare opened this issue · 4 comments
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.
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?
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.