aboutsummaryrefslogtreecommitdiff
path: root/asm.peg
diff options
context:
space:
mode:
authorAndrew Chambers <[email protected]>2021-10-23 23:57:24 +1300
committerAndrew Chambers <[email protected]>2021-10-23 23:57:24 +1300
commit6b9b596fcd588d22e15f259b572ae8845fbddacb (patch)
tree1cf1758d7a65e90e8a9d40a91887bd5501506d27 /asm.peg
parent1e9bf39a1b2c47920def55f29c4b9b93c402e1d4 (diff)
Implement the .set directive.
Diffstat (limited to 'asm.peg')
-rw-r--r--asm.peg2
1 files changed, 2 insertions, 0 deletions
diff --git a/asm.peg b/asm.peg
index 3bc49d1..596852b 100644
--- a/asm.peg
+++ b/asm.peg
@@ -33,6 +33,8 @@ directive =
{ $$.dirint = (Int){.kind = ASM_DIR_INT, .value = v.value }; }
| "quad" ws v:value
{ $$.dirquad = (Quad){.kind = ASM_DIR_QUAD, .value = v.value }; }
+ | "set" ws s:ident ws? ',' ws? v:value
+ { $$.set = (Set){.kind = ASM_DIR_SET, .sym = s.charptr, .value = v.value }; }
| fd:fill-directive
{ $$ = fd; }
| sd:section-directive