Connor Olding
0fdac556a8
fix specials like %lo and %hi
...
when I rewrote Muncher into TokenIter,
I removed the return value of self:advance(),
and forgot to handle this case that relied on it.
2018-04-28 21:39:31 +02:00
Connor Olding
ec76e37014
add \x escapes to strings...
...
also adds the plain \e escape and allows escapes in filenames.
2016-12-28 04:04:05 -08:00
Connor Olding
793a454b38
add a gameshark writer
2016-12-28 03:11:22 -08:00
Connor Olding
81f5f317bf
handle the alternative names as well
2016-12-28 02:25:51 -08:00
Connor Olding
272ef0fbde
implement addressing modes for fpu load/stores
2016-12-28 02:09:15 -08:00
Connor Olding
b80fb49a22
allow _ in expr vars; tweak number matching
2016-12-01 10:31:55 -08:00
Connor Olding
63644df1bc
lex the same number syntax in expressions
2016-12-01 10:19:09 -08:00
Connor Olding
9f6252117e
allow comments after filenames
...
this is hack city but it will do until i refactor this crap
2016-11-29 09:58:08 -08:00
Connor Olding
8546411e14
handle ; comments in variable definitions again
...
this is hacky but i don't wanna break existing code.
if you used // comments, then you'll have to change.
2016-11-27 22:16:32 -08:00
Connor Olding
e5cc5fd068
improve variable name checks
2016-11-27 22:01:15 -08:00
Connor Olding
63ddf558df
parse variable definitions as expressions
2016-11-27 21:37:57 -08:00
Connor Olding
6bae5647c8
fix parsing of 0 in expressions
2016-11-27 21:25:57 -08:00
Connor Olding
ab493693a9
add support for variables in expressions
2016-11-27 21:17:42 -08:00
Connor Olding
64ef102183
disallow variable names beginning with a number
...
this makes lexing easier.
i don't think this worked properly anyway.
2016-11-27 21:16:38 -08:00
Connor Olding
de2618bb61
allow expressions in variable definitions
2016-11-27 21:01:30 -08:00
Connor Olding
067267c313
allow Preproc to throw errors again
2016-11-27 20:28:53 -08:00
Connor Olding
8aa3c58f8f
allow expressions in instructions (whoops)
2016-11-27 20:14:36 -08:00
Connor Olding
ad0269cc61
fix incbin parsing again
2016-11-27 20:03:26 -08:00
Connor Olding
3c1cbf0901
remove defunct comments
2016-11-27 20:03:26 -08:00
Connor Olding
437b816f85
refactor label resolution into its own method
2016-11-27 20:03:23 -08:00
Connor Olding
2143128628
split Preproc expansion into Expander class
2016-11-27 15:14:51 -08:00
Connor Olding
3aa5d01a21
refactor some utility functions
2016-11-27 14:02:28 -08:00
Connor Olding
fb2e588f79
move arg_types to TokenIter
2016-11-27 06:06:48 -08:00
Connor Olding
0d1527a773
refactor Muncher into separate TokenIter class
...
this also fixes lexing the EOL after an include directive.
2016-11-27 05:58:08 -08:00
Connor Olding
e1ae1fdd64
optimize incbin via string passthru
2016-11-23 12:22:31 -08:00
Connor Olding
cdc0f8edb2
add a barebones expression parser
...
at the moment, this probably only works in directives.
some of the operators are still unimplemented, and the errors are poor.
there will be support for accessing variables in the future.
2016-10-14 09:27:19 -07:00
Connor Olding
575af689b5
fix loading labels with overflowed PC
2016-10-14 04:50:14 -07:00
Connor Olding
11b62bf9de
fix a typo that broke table unpacking
2016-10-14 04:19:11 -07:00
Connor Olding
115bae0689
use LI for remaining CALL functionality
2016-05-18 03:07:08 -07:00
Connor Olding
dcdfc22f0a
implement basic CALL pseudo-instruction
2016-05-18 01:48:15 -07:00
Connor Olding
bfbe2845e6
actually implement path handling for .incasm
2016-05-14 03:27:30 -07:00
Connor Olding
1540062a6f
clean up informat parsing a little
2016-05-13 07:57:39 -07:00
Connor Olding
0ec6b24531
use R# instead of REG# for registers
2016-05-10 17:18:17 -07:00
Connor Olding
e4e8e16ea5
implement all branch pseudo-instructions
2016-05-08 15:21:16 -07:00
Connor Olding
8375eaff08
reimplement branch pseudos, remove branch-immediates for now
2016-05-01 16:31:09 -07:00
Connor Olding
51820234a8
allow VARSYMs in directives
2016-05-01 03:56:56 -07:00
Connor Olding
b596405e76
add basic branch pseudos, add REG(REG) addressing
2016-05-01 02:04:27 -07:00
Connor Olding
16cb504443
add DMOV L.D L.S S.D S.S pseudo-instructions
2016-04-27 16:04:43 -07:00
Connor Olding
0678d3eb58
move word_writer to lips.writers, add others
2016-04-26 21:34:05 -07:00
Connor Olding
027b5d9deb
fix options.origin (obvious typo)
2016-04-26 15:15:00 -07:00
Connor Olding
6b0d27ba6d
allow 1 register in place of 2, pseudo stuff…
...
allow CL to take more than one argument.
implement pseudo-instructions NEGU, SGT, and SGTU.
2016-04-26 02:36:19 -07:00
Connor Olding
f3765a0300
fix incbin directive
2016-04-24 13:19:18 -07:00
Connor Olding
693294bef2
fix labels and variables in data directives
2016-04-24 04:41:30 -07:00
Connor Olding
f851540b24
various fixes, mostly for labels
...
reimplement modulo by 0x80000000 for labels.
allow numeric label values ("REL") to be "fixed" to bypass label calculation.
add offsets after label calculation instead of before.
properly check for EOL after all expected arguments have been exhausted.
finally, add token properties to debug dumps.
2016-04-24 03:55:12 -07:00
Connor Olding
6433227c26
rewrite overrides, reimplement ROL/ROR
2016-04-23 19:36:26 -07:00
Connor Olding
43e08af5c5
fix some branch pseudo-instructions; fix example
2016-04-23 16:43:43 -07:00
Connor Olding
1188543cd2
more verbose errors
2016-04-23 16:24:46 -07:00
Connor Olding
5f74f178d3
actually fix hex and inc directives
2016-04-23 15:51:29 -07:00
Connor Olding
33ea629309
fix data collection, expect EOLs for all directives
2016-04-23 02:10:38 -07:00
Connor Olding
87c210d617
add .push/.pop directives for basic states
2016-04-23 02:06:43 -07:00