Commit Graph

71 Commits

Author SHA1 Message Date
Andrew Alderwick 550aceee23 (uxnasm) Allow writing the 0xffff byte of RAM. 2022-02-19 00:29:40 +00:00
Andrew Alderwick 8b84813c6e (uxnasm) Raise error when memory is overwritten. 2022-02-19 00:27:28 +00:00
Andrew Alderwick da4f0e70a5 (uxnasm) Allow returning errors from writebyte(). 2022-02-19 00:26:55 +00:00
Andrew Alderwick 0ae6992089 (uxnasm) Fix calculation of usage. 2022-02-18 23:02:42 +00:00
Andrew Alderwick 2a825de2fd Switch void context increments from pre to post 2022-01-04 02:05:32 +00:00
Sigrid Solveig Haflínudóttir 148dae4ebd fix a few "set and not used" warnings 2021-12-29 18:33:23 +01:00
neauoire 385fa44f9d Prefixed globals with uxn_ 2021-12-29 09:11:03 -08:00
~d6 abd6a3a5da Support nested comments in uxnasm.
Previously, code like this would fail with an error
about an unrecognized ) token:

    ( this is a ( nested ) comment )

With this patch, the above code will now work.

Relatedly, it was previously possible to write code
that compiled but was confusing:

    (open parenthesis should have a space )
    ( in this case the ADD2 will be ignored )ADD2
    ( this comment with ( would have been fine )

With this commit, the first example will emit a warning
but continue to work as intended. The second and third
examples will continue searching for a matching ) token,
which due to the new nested coment behavior will probably
mean the rest of the file gets commented out.
2021-12-28 19:28:15 -08:00
Andrew Alderwick 2330320985 (readability) Use preincrements throughout in void context. 2021-12-14 23:17:32 +00:00
neauoire bae2d37fc2 (uxnasm) Only catch hex labels with slen of 2 or 4 2021-12-06 09:01:48 -08:00
Andrew Alderwick 60f04ca053 (uxnasm) Add error for relative references that are too far. 2021-12-01 11:42:44 +00:00
neauoire da797b33c6 (uxnasm) Stop on resolve failure 2021-11-30 10:27:35 -08:00
neauoire 074a049ff2 (uxnasm) Renamed conflicting function 2021-11-29 16:19:47 -08:00
neauoire 25df420607 (uxnasm) Improved errors 2021-11-29 08:48:12 -08:00
Andrew Alderwick 6ba2af5c62 Avoid combining literals across | or $ pads. 2021-11-28 18:07:22 +00:00
neauoire 6c0e39ad6f (uxnasm) Fixed issue with labels 2021-11-27 14:58:37 -08:00
neauoire b4e50165b6 (uxnasm) Warn for refs size limit 2021-11-27 14:44:28 -08:00
neauoire 78853ac5c6 (uxnasm) Removed lit flag for writebyte 2021-11-27 14:20:56 -08:00
neauoire fbbddf50d6 (uxnasm) Cleanup 2021-11-27 14:07:25 -08:00
neauoire 4b6efa6fc6 (uxnasm) Combine byte literals 2021-11-27 13:55:33 -08:00
neauoire 71e8177657 (uxnasm) Rewrite 2021-11-27 11:33:22 -08:00
neauoire b873f04789 Added tal syntax highlight for nano 2021-11-26 08:11:18 -08:00
Devine Lu Linvega 088897c6b4 (uxnasm) Display exact numberof bytes 2021-11-24 17:12:01 -05:00
Andrew Alderwick d4e033e715 Remove vestigial mention of "include". 2021-11-18 00:14:15 +00:00
Andrew Alderwick c3ac41c41d Change "include" word into ~ rune for includes. 2021-11-17 22:06:00 +00:00
Sigrid Solveig Haflínudóttir 4988b2214e
uxnasm: reset scope to avoid pointing at garbage 2021-11-08 18:51:28 +01:00
Andrew Alderwick 80b4e4f88d Use Keep mode for all LIT opcodes 2021-10-30 00:28:33 +01:00
Devine Lu Linvega 6f872feff5 Use Keep modes for byte and short literals 2021-10-29 16:02:07 -07:00
Devine Lu Linvega 8132a09e21 Test for valid destination in uxnasm 2021-10-29 09:29:23 -07:00
Claude Heiland-Allen 33e77e261c uxnasm errors-out if too many macros 2021-10-26 09:55:57 -07:00
Claude Heiland-Allen a373939544 uxnasm errors-out if too many labels 2021-10-26 09:54:29 -07:00
neauoire 5582816943 Removed unecessary error 2021-10-24 09:09:58 -07:00
Andrew Alderwick 5807e22fef Fixed corruption in ff00-ffff, improved checks for | and $, thanks karolbelina! 2021-10-23 23:15:07 +01:00
neauoire 6799b5f78e Warn for out of bounds 2021-10-23 08:48:11 -07:00
neauoire 04e4edf05f Fixed an issue with the ref counter in uxnasm 2021-10-17 19:10:29 -07:00
neauoire d6ef361383 Corrected raw short length 2021-10-11 13:35:01 -07:00
neauoire 037ab10b6a Fixed issue with raw bytes in macros 2021-10-11 13:27:20 -07:00
Andrew Alderwick 55590cec7b Fixed "while loop has empty body" warning with macOS compiler 2021-10-10 20:09:20 +01:00
Andrew Alderwick 2006b2a6ad Print uxnasm message to stderr 2021-10-07 22:38:25 +01:00
neauoire d363aad7b5 Improved size report for uxnasm 2021-10-06 09:21:27 -07:00
neauoire 765724d2af Fixed issue where macro size was too large 2021-09-30 19:21:04 -07:00
neauoire 2b80b85baf Relative labels should not incr references to parent label 2021-09-25 09:39:27 -07:00
neauoire 4406c2856c Sublabels add refs to root labels in uxnasm 2021-09-16 09:11:53 -07:00
neauoire 25858c3948 Fixed issue with strings in uxnasm 2021-09-01 13:04:56 -07:00
neauoire 4f6a29f57d Reverted flags 2021-08-30 10:19:33 -07:00
Andrew Alderwick 4d535ebb46 Swapped return and short flags in advance of uxn.c refactoring 2021-08-29 22:28:30 +01:00
neauoire 3da9352230 Fixed issue with scmp in uxnasm 2021-08-29 11:43:00 -07:00
neauoire 66f898ade4 Removed hardcoded number for LIT opcode in asm 2021-08-29 11:25:58 -07:00
neauoire 0da8709ce3 Assembly stop on long token 2021-08-29 10:51:14 -07:00
neauoire c70f16f7ac Formatted changes 2021-08-28 10:49:51 -07:00