1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 21:28:05 +11:00
collapseos/blk/202

14 lines
533 B
Plaintext
Raw Normal View History

To avoid using dict memory in compilation targets, we
pre-declare label variables here, which means we have a limited
number of it. For now, 4 ought to be enough.
Flow
There are 2 label types: backward and forward. For each type,
there are two actions: set and write. Setting a label is
declaring where it is. It has to be performed at the label's
destination. Writing a label is writing its offset difference
to the binary result. It has to be done right after a relative
jump operation. Yes, labels are only for relative jumps.