Skip to content

Instantly share code, notes, and snippets.

@Ismael-VC
Created August 5, 2024 03:52
Show Gist options
  • Save Ismael-VC/94a19d10cc1cf1926e639b45dfc08472 to your computer and use it in GitHub Desktop.
Save Ismael-VC/94a19d10cc1cf1926e639b45dfc08472 to your computer and use it in GitHub Desktop.
Differences between axnasm and drifblim.
  • uxnasm: treats (foo) as comment and fails.
  • drifblim: treats (foo) as nested comment, @[bar] as invalid symbol.
➜  ~ cat blimtest.tal 
|100
  (foo)
  [bar]
  {baz}
  BRK

@(foo) LIT2 "A 18 DEO JMP2r
@[bar] LIT2 "B 18 DEO JMP2r
@{baz} LIT2 "C 18 DEO JMP2r

➜  ~ uxnasm blimtest.tal rom
Comment incomplete: (foo) in @on-reset, blimtest.tal:11.
➜  ~ drifblim blimtest.tal rom
!! Error: Nested (foo) in RESET
!! Error: Symbol @[bar] in [bar]
  • uxnasm: treats {baz} as lambda and can't find it.
  • drifblim: treats @(foo) and @[bar] as invalid symbols.
➜  ~ cat blimtest.tal 
|100
  ( foo )
  [bar]
  {baz}
  BRK

@(foo) LIT2 "A 18 DEO JMP2r
@[bar] LIT2 "B 18 DEO JMP2r
@{baz} LIT2 "C 18 DEO JMP2r

➜  ~ uxnasm blimtest.tal rom  
Label unknown: λ00, blimtest.tal:4

➜  ~ drifblim blimtest.tal rom
!! Error: Symbol @(foo) in (foo)
!! Error: Symbol @[bar] in [bar]
  • uxnasm: success!
  • drifblim: same as before.
➜  ~ cat blimtest.tal 
|100
  ( foo )
  [bar]
  {baz}
  BRK

@(foo) LIT2 "A 18 DEO JMP2r
@[bar] LIT2 "B 18 DEO JMP2r
@{baz} LIT2 "C 18 DEO JMP2r

➜  ~ uxnasm blimtest.tal rom
-- Unused label: [bar]
-- Unused label: {baz}
Assembled rom in 16 bytes(0.02% used), 3 labels, 0 macros.

➜  ~ drifblim blimtest.tal rom
!! Error: Symbol @(foo) in (foo)
!! Error: Symbol @[bar] in [bar]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment