1
0
Fork 0
mirror of https://github.com/notwa/lips synced 2024-05-15 14:43:23 -07:00
Commit Graph

134 Commits

Author SHA1 Message Date
Connor Olding d10c0f0ee9 use Base class pattern; extend off existing classes 2016-04-20 13:15:17 -07:00
Connor Olding e593ea0c68 add comments and such 2016-04-20 13:15:14 -07:00
Connor Olding 7ccc2b180f rename "defines" to "variables"
this follows bass' terminology:
constants don't care where they're defined, but can never be changed.
variables must be defined before use, but can be redefined.
defines aren't necessarily numbers.

bass: https://github.com/ARM9/bass
2016-04-20 01:41:44 -07:00
Connor Olding 7af890c3b5 add 0o and 0b prefixes for lexing octal and binary 2016-04-20 01:16:19 -07:00
Connor Olding 67ce15feee fail to lex 0X hex prefix in favor of lowercase 0x
you are a terrible person if you do this
2016-04-20 01:12:57 -07:00
Connor Olding 59994cd15d fix binary lexing; add comments 2016-04-20 01:12:18 -07:00
Connor Olding 54d0ea0378 fix example paths 2016-04-14 07:54:41 -07:00
Connor Olding 071169df48 redo internal paths/requires 2016-04-14 07:33:33 -07:00
Connor Olding 3290735c8f pass numbers to writer instead of hex strings 2016-04-10 08:56:00 -07:00
Connor Olding 5c91e09151 fix backwards relative labels 2016-04-10 08:41:52 -07:00
Connor Olding a9b702114a allow importing/exporting of labels 2016-04-10 06:52:20 -07:00
Connor Olding b8601031f3 add named relative labels 2016-04-10 05:09:38 -07:00
Connor Olding a58ad83c92 implement incbin directive 2016-04-10 04:03:00 -07:00
Connor Olding 5afb743977 fix unary preprocessing 2016-04-10 03:39:50 -07:00
Connor Olding b7831b49c3 be smarter about lexing spaces 2016-04-10 03:26:23 -07:00
Connor Olding 311b1e362f implement offsets for constants 2016-04-10 03:25:11 -07:00
Connor Olding 356aee5e9f add branch-likely pseudo-instructions 2016-04-07 07:56:46 -07:00
Connor Olding da1c49cbfb fix trunc.w.s instruction 2016-04-07 04:00:42 -07:00
Connor Olding 4220509be5 expect addresses in literal immediates of branches
this is more useful than letting the immediate number simply pass through
2016-04-02 08:38:22 -07:00
Connor Olding fdb4b351a6 fix labels in word directives 2016-04-02 08:05:07 -07:00
Connor Olding 4b8af13e78 fix align directive with arguments 2016-04-02 08:05:05 -07:00
Connor Olding 3febafef02 fix parsing of files lacking a trailing newline
ensures files yield an EOL token before EOF
2016-03-13 20:27:13 -07:00
Connor Olding 54f28dc333 don't strip 0x80 prefix from .ORG addresses
the rest of the code seems to handle this fine,
since setting options.offset was bypassing it anyway
2016-03-13 20:24:43 -07:00
Connor Olding 0b5331ff5c use ; comments to fix github highlighting 2016-01-24 20:18:52 -08:00
Connor Olding 9e4167e04a add something resembling documentation 2016-01-24 20:03:07 -08:00
Connor Olding e7fe9d972c fix shift-variable argument order 2016-01-18 20:28:11 -08:00
Connor Olding 260db0ba9e fix a couple regressions 2016-01-16 10:51:13 -08:00
Connor Olding 07c68b6229 implement basic specials; more refactoring 2016-01-15 20:34:37 -08:00
Connor Olding 195236a52c begin work on specials; big refactor 2016-01-15 11:15:02 -08:00
Connor Olding c0c4d81b5a handle parenthesis after lexing instead 2016-01-15 07:49:43 -08:00
Connor Olding 659bec36f8 reimplement defines
defines now resolve to the previous definition, rather than the lastmost.
also, defines are invisible to the parser now.
2016-01-14 17:29:45 -08:00
Connor Olding 61cd69004f split out token-handling and preprocessing 2016-01-14 16:31:24 -08:00
Connor Olding 1eed93f2e7 add filenames to Dumper errors 2016-01-14 11:33:53 -08:00
Connor Olding fffe542d10 fix most line numbers in errors
this might be a bit of a hack;
i feel like nextc() should always happen after yield(),
not a mix of before and after.
2016-01-14 10:32:08 -08:00
Connor Olding 996d148ed5 fix usage of fpu/sys registers 2016-01-13 14:45:55 -08:00
Connor Olding e21dbc72e6 reimplement addressing modes
this allows labels as offsets
and implied offsets of 0
2016-01-13 14:31:58 -08:00
Connor Olding bf3f86e568 allow labels in WORD directives 2016-01-13 13:07:00 -08:00
Connor Olding 7c4becf0b6 use 2**n alignment instead of 2*n 2016-01-13 11:46:29 -08:00
Connor Olding f8805e6deb implement SPACE,HALF directive aliases 2016-01-13 11:41:00 -08:00
Connor Olding a47c924e75 implement ascii/asciiz directives, basic string lexing 2016-01-13 11:18:36 -08:00
Connor Olding 5e12951010 lips is lips 2016-01-13 09:51:29 -08:00
Connor Olding 9fd46b571f set up as a proper module; fix some stuff 2016-01-13 07:40:14 -08:00
Connor Olding 9612de6869 split lips
i fixed a lot of issues with globals in the process
2016-01-13 07:16:41 -08:00
Connor Olding fe947fecb6 a bit of refactoring and cleanup
update copyright
use more locals
store an empty table (__) to save memory
reorder instructions table
add a few comments
2016-01-13 06:46:51 -08:00
Connor Olding f630990c6e disallow 0 in place of r0/zero register 2016-01-05 16:45:53 -08:00
Connor Olding 361b0572f6 update readme 2016-01-05 01:51:06 -08:00
Connor Olding 59d4de30fa add relative labels a la asw 2016-01-05 01:10:52 -08:00
Connor Olding 7a0aac3b7c implement branch-immediate pseudo-instructions 2016-01-05 01:06:47 -08:00
Connor Olding 769ec200ea simplify Parser:format_out arguments 2016-01-05 01:04:03 -08:00
Connor Olding 83a194f829 add BEQZ/BNEZ pseudo-instructions 2016-01-05 01:01:52 -08:00