16 Commits

Author SHA1 Message Date
Olaf Seibert
e3042c9175 Remove dubious workaround in parse_unary().
The comment "eat first char of illegal label, else endless loop on
implied .WORD" was no longer true. It did reveal some other small
gotchas, which are corrected now as well.
2021-01-23 21:30:52 +01:00
Olaf Seibert
c4221e0b4b Sometimes pc-relative addressing needs no relocation record.
In this case, in an absolute section refering to an absolute symbol.
Use test cases from Johnny Billquist.
2020-03-07 17:34:45 +01:00
Olaf Seibert
592b7facf1 Silence gcc7 warnings by adjusting FALLS THROUGH comment. 2020-03-03 22:11:02 +01:00
Olaf Seibert
a685d341c5 First changes in 0.5wip: correct some grammar (it's vs. its). 2016-02-21 21:13:50 +01:00
Olaf Seibert
c423ee346a Handle invalid expressions in .WORD directives with a message.
This is most relevant in implied .WORD directives which are caused by an
attempt to call a macro (which happens to be undefined) with arguments
that don't parse as valid expressions.
2015-06-01 23:30:16 +02:00
Olaf Seibert
d38f4009c4 Crank up the warning levels, and adjust the code to silence ...
several compilers:
- gcc version 4.5.3 (NetBSD nb2 20110806)
- gcc version 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
- Ubuntu clang version 3.6.0-2ubuntu1 (tags/RELEASE_360/final) (based on LLVM 3.6.0)

The warnings were mostly about local variables shadowing others,
unused function parameters, and C++ style comments. Some variables were
indeed used before set.

Note that on Linux, using -std=c99 does stupid things like *remove* the
declaration of strdup() from <string.h>. Therefore I've reluctantly used
-std=gnu99.
2015-05-27 21:51:26 +02:00
Olaf Seibert
168340c54c A bit more tweaking of output/listing. 2015-05-21 00:57:52 +02:00
Olaf Seibert
59711f17f2 Make trailing commas work in .BYTE and .WORD
16 000000 000123                  state:  .word   123    ; 1 word
      17 000002 000000                          .word          ; 1 word
      18 000004 000001  000000                  .word   1,     ; 2 words
      19 000010 000000  000002                  .word   ,2     ; 2 words
      20 000014 000000  000000                  .word   ,      ; 2 words
      21 000020 000000  000000  000000          .word   ,,     ; 3 words
      22 000026 000001  000000  000000          .word   1,,    ; 3 words
      23 000034 000000  000000  000003          .word   ,,3    ; 3 words
      24 000042 000001  000000  000003          .word   1,,3   ; 3 words
      25 000050 000001  000002  000003          .word   1,2,3  ; 3 words
2015-05-19 22:57:45 +02:00
Olaf Seibert
2488e02aae A few more small listing tweaks. 2015-05-19 22:09:53 +02:00
Olaf Seibert
f34996452b Mark PSECT relocation also with a ' in the listing. 2015-05-19 00:50:17 +02:00
Olaf Seibert
833d9186cc Make empty expressions in .byte and .word work
such as
        .byte   ,0
2015-05-14 14:32:46 +02:00
Olaf Seibert
21b5f2269f Spaces. Spelling. 2015-05-10 00:32:14 +02:00
Olaf Seibert
e55979b30d Add a symbol and section table dump at the end of the listing. 2015-05-10 00:04:41 +02:00
Olaf Seibert
32b8059cf8 Put code where it belongs. 2015-05-09 23:54:54 +02:00
Toby Thain
48996a6627 Typo and one more warning. 2015-02-01 22:25:59 -05:00
Sergey Svishchev
6a2afc3fa7 Import J Hoppe's 20090427 release from http://retrocmp.com/tools/macro-11-on-windows 2013-02-15 23:50:38 +04:00