20 Commits

Author SHA1 Message Date
Paul Koning
fbb936d1ce Fix .psect without argument, add (ignored) pseudo ops
.mdelete, .cross, .nocross
2022-06-26 13:13:49 -04:00
Olaf Seibert
e1962af99e Fix a small one-time memory leak. 2021-11-14 18:44:00 +01:00
Olaf Seibert
d2d143dd9b Put undefined symbols in separate table.
Even though all regression tests pass, it feels better to do the
undefined symbols similar to the implicit globals.
2021-05-30 13:19:39 +02:00
Olaf Seibert
0ab2a4fa16 Add consistency checking for symbol flags
while also adding some consistency.
All listings now list . (dot) as defined so they need updating.
2021-05-30 13:19:39 +02:00
Olaf Seibert
7bbcbba5f5 Include undefined symbols in the symbol table for listing purposes.
MACRO11 V05.05 does this:

```
.MAIN.  MACRO V05.05  Sunday 18-APR-2021 16:29  Page 1

      1
      2 000000  012700  000000G                 mov #lab1,r0
      3
      4                                         .dsabl gbl
      5
U     6 000004  012700  000000                  mov #lab2,r0
      7
      8         000001                          .end

.MAIN.  MACRO V05.05  Sunday 18-APR-2021 16:29  Page 1-1
Symbol table

LAB1  = ****** GX       LAB2  = ******

. ABS.  000000    000   (RW,I,GBL,ABS,OVR)
        000010    001   (RW,I,LCL,REL,CON)
Errors detected:  1

*** Assembler statistics

Work  file  reads: 0
Work  file writes: 0
Size of work file: 34 Words  ( 1 Pages)
Size of core pool: 9260 Words  ( 35 Pages)
Operating  system: RSX-11M/M-PLUS

Elapsed time: 00:00:00.01
GBL,GBL/-SP=GBL
```
2021-05-30 13:19:39 +02:00
Olaf Seibert
22fdaedded Some floating point fixes.
- Fixed immediate source operand of LDEXP, LD[IL][FD]
  which is an integer, unlike several other FPP instructions.
- Renamed floating point instruction formats so they match the
  instruction descriptions in the architecture handbook better.
2021-03-30 20:13:31 +02:00
Olaf Seibert
6369384e25 Add some missing instructions.
- to tests: MFPT, MTPS, MFPS
- also to opcode set: CSM, TSTSET, WRTLCK
2021-03-13 22:55:04 +01:00
Olaf Seibert
cf7e442557 LDCFD: add missing FloatingPointProcessor instruction. 2021-03-13 15:48:04 +01:00
Olaf Seibert
1d799534bb Add Commercial Instruction Set.
I haven't done much compatibility testing with MACRO11 to check
weirdnesses, but the original functionality is very limied: none
of the mnemonics has operands.
2021-01-27 16:31:45 +01:00
Olaf Seibert
015c8bee23 Prepent register label values with a % in symbol table.
This changes the layout of all the regression test listings...
2021-01-23 16:37:15 +01:00
Olaf Seibert
0e3d596daf Allow implicit floating point immediate for FPP instructions
which have an general (source) argument and an AC destination.
There are no FPP instrs which have 1 general source arg;
only with 1 general destination (even TSTF).
2021-01-23 16:11:51 +01:00
Olaf Seibert
28f891dc1f Correct name of OC_[12]FIS to OC_FPP{ACGEN,GENAC}. 2021-01-22 18:26:07 +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
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
6c992f6406 Fix some warnings from clang. 2015-05-20 22:54:26 +02:00
Olaf Seibert
2488e02aae A few more small listing tweaks. 2015-05-19 22:09:53 +02:00
Olaf Seibert
749b0a5d73 Add the .LIBRARY /string/ directive.
If no -p options or MCALL environment variable are given, pretend the
search path is the current directory ".".
2015-05-12 21:32:01 +02:00
Olaf Seibert
a6ee20cdc1 Don't truncate the internal form of local symbols
Local symbols like 32768$ (and such long ones can be generated
automatically by macros) are suffixed with the "local symbol block number"
to make different labels in different local symbol blocks:
32768$12345.

However, this becomes longer than the regular symbol length (6).
So, to avoid changing these labels, they are not truncated at this length.

The listing code is updated to deal with the longest symbol name lengt
it encounters in the symbol table.
2015-05-10 17:36:58 +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
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