Virgil Dupras
1dec33e02a
zasm: make symbol registry a bit more straightforward
...
Instead of strings of variable length driving the iteration of the
registry, we do so through records that keep track of lengths and
counts.
2019-07-23 15:21:42 -04:00
Virgil Dupras
cc7a4bae58
zasm: improve .equ duplicate detection handling
...
Things are a bit more straightforward now.
2019-07-23 14:00:01 -04:00
Virgil Dupras
9ea72dc1d0
zasm: add separate symbol registry for constants
...
This will allow me to make the ".org" treatment a bit less murky.
2019-07-23 13:59:55 -04:00
Virgil Dupras
b95f4c8c24
zasm: remove SYM_CTX_PTR
2019-07-22 16:34:40 -04:00
Virgil Dupras
f4f91ebd79
zasm: remove SYM_CTX
2019-07-22 16:13:00 -04:00
Virgil Dupras
311d04e9aa
zasm: make symbol registry easily parametrizable
...
I'm about to split the global registry in two (labels and consts)
and the previous state of registry selection made things murky.
Now it's much better.
2019-07-22 15:13:09 -04:00
Virgil Dupras
fe15bafeca
zasm: fix bug with registry selection
...
During expression parsing, if a local label was parsed, it would
select the local registry and keep that selection, making
subsequent global labels register in the wrong place.
2019-07-20 18:07:52 -04:00
Virgil Dupras
e414e600ea
zasm: add ERR_DUPSYM and ERR_OOM error conditions
2019-05-27 17:45:05 -04:00
Virgil Dupras
acddb045a5
zasm: add support for .org directive
2019-05-19 14:40:42 -04:00
Virgil Dupras
3b1ef2b9af
zasm: bump global symbol limit to 0x200
2019-05-19 09:54:42 -04:00
Virgil Dupras
98695f9912
zasm: de-index symRegister
...
Make symRegister's logic pointer-based so we can break through the 0x100
limit.
2019-05-19 09:06:24 -04:00
Virgil Dupras
29f0bcbe23
zasm: can now assemble zasm/symbol.asm!
2019-05-18 18:56:27 -04:00
Virgil Dupras
072aad775a
zasm: don't match prefixes in symFind
...
Only match when full names match.
2019-05-17 13:14:16 -04:00
Virgil Dupras
7083116379
zasm: remove JUMP_ prefixes
...
They serve no purpose and make the code less flexible.
2019-05-17 09:50:11 -04:00
Virgil Dupras
0ae91e55ec
zasm: big local symbols overhaul
2019-05-16 08:26:00 -04:00
Virgil Dupras
a2b5b1efab
zasm: add one layer of indirection in symbol registry
...
We'll need it for an upcoming "local labels" registry.
2019-05-15 14:30:41 -04:00
Virgil Dupras
2de69ee7cd
zasm: add support for local labels
2019-05-13 20:23:10 -04:00
Virgil Dupras
17dbee6a49
zasm: deduplicate code
2019-05-13 19:47:34 -04:00
Virgil Dupras
746c86cbf8
zasm: make getSymVal not responsible for calling symFind
...
With local labels, these two will have to be decoupled.
2019-05-13 16:53:52 -04:00
Virgil Dupras
c000d5cfb1
zasm: support forward label references!
2019-05-10 21:14:46 -04:00
Virgil Dupras
b87feac785
zasm: add support for labels!
2019-05-09 21:21:08 -04:00