Skip to content

Commit

Permalink
Forth: rewrite simpler defword macro
Browse files Browse the repository at this point in the history
  • Loading branch information
adumont committed Feb 27, 2022
1 parent 18032a9 commit 98d5823
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions forth.s
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,11 @@ __word_0 = 0
.ident (.sprintf("__word_%u", __word_last + 1)):

.addr .ident(.sprintf("__word_%u", __word_last))
; this ifblank cascading can probably be enhanced...

.ifnblank strname
.ifnblank flags
CString strname, flags
.else
CString strname
.endif
CString strname, flags
.else
.ifnblank flags
CString label, flags
.else
CString label
.endif
CString label, flags
.endif

__word_last .set __word_last + 1
Expand Down

0 comments on commit 98d5823

Please sign in to comment.