Olaf Seibert
6a3642e49a
Nicer, more specific name for temp symbol.
2021-11-15 10:31:26 +01:00
Olaf Seibert
08c6254bdd
Temp symbols are defined, so flag them as such.
2021-11-14 23:14:21 +01:00
Olaf Seibert
16b884a744
Add some more abusive test cases.
2021-11-14 23:09:35 +01:00
Olaf Seibert
3c858fe45d
Make sure immediate operands #R0 etc are output as absolute values.
...
Previously it was generated as relocatable.
2021-11-14 23:05:20 +01:00
Olaf Seibert
1c37223977
Make sure .word R0 etc are output as absolute values.
...
Previously it was generated as relocatable.
2021-11-14 22:49:44 +01:00
Olaf Seibert
855c1ca321
Slightly improve expression tree debug output.
2021-11-14 22:40:43 +01:00
Olaf Seibert
36db00dc79
Name some unnamed special sections for easier recognition.
2021-11-14 22:37:15 +01:00
Olaf Seibert
ef66dd0379
Fix pasto.
2021-11-14 19:20:02 +01:00
Olaf Seibert
2df94bfc43
Fix memory leaks in error paths of get_mode().
2021-11-14 18:58:58 +01:00
Olaf Seibert
5098927591
Fix a memory leak in my_searchenv2().
2021-11-14 18:47:56 +01:00
Olaf Seibert
e1962af99e
Fix a small one-time memory leak.
2021-11-14 18:44:00 +01:00
Olaf Seibert
3342090916
More silly %-register tests.
2021-11-14 17:09:29 +01:00
Olaf Seibert
efe4a882e3
Consistent out-of-memory checks.
2021-11-13 23:07:30 +01:00
Olaf Seibert
1722fae3d4
Rename 'rel' field to 'pcrel'.
2021-07-04 20:02:21 +02:00
Olaf Seibert
34b4815798
Rename undef to flags
2021-06-12 21:44:23 +02:00
Olaf Seibert
7ba6ed13e6
Move some work into expression parse tree constructors
2021-06-12 20:32:49 +02:00
Olaf Seibert
0058db9044
Name the addressing modes.
2021-06-12 18:37:45 +02:00
Olaf Seibert
7f38f6ae03
Make it really easy to test putting undefined symbols in the main table.
2021-06-09 23:09:28 +02:00
Olaf Seibert
354aadfdc0
Add comment about undef'd symbols
...
that they can also be put in the main symbol table, since all code is
made to work with that scenario.
2021-05-30 21:52:08 +02:00
Olaf Seibert
72eae62c45
Update CHANGES.
2021-05-30 13:21:33 +02: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
652c047711
Better error message for .globl 1$
...
Local labels can't be exported (or imported).
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
d0445ef8f4
Record change.
2021-05-28 20:15:51 +02:00
Olaf Seibert
877248f94e
More detailed error messages about bad addressing modes
...
because of gitlab issue #10 .
2021-05-28 19:02:31 +02:00
Olaf Seibert
e21f390722
Adjust tests with new error message.
2021-05-28 17:18:55 +02:00
Olaf Seibert
426db4afda
Make 2 "invalid expression" messages more exolicit.
2021-05-28 17:12:33 +02:00
Olaf Seibert
cb8103d112
Run tests in both RSX11 and RT11 format.
...
This is possible since our reference files are output from dumpobj,
and that does not depend on the format.
2021-05-16 14:04:43 +02:00
Olaf Seibert
6c6f241bac
Prepare for development after released version.
2021-05-16 13:46:31 +02:00
Olaf Seibert
760bef1e42
Bugfix release 0.7.1 for gitlab issues #7 and #8 .
2021-05-16 13:27:01 +02:00
Olaf Seibert
cb331d2a55
Add some register label tests that don't work yet.
2021-04-21 18:44:53 +02:00
Olaf Seibert
9ade850447
Fix typo.
2021-04-21 18:39:58 +02:00
Olaf Seibert
461205d60a
Make a nice flag name for evaluate().
2021-04-21 18:34:11 +02:00
Olaf Seibert
2753b081cc
Start each pass with .DSABL LSB
...
otherwise the end of pass 1 carries over into pass 2, which messes with
the ranges of local symbols.
2021-04-18 15:18:38 +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
b9b61a4659
Prepare for development after released version.
2021-03-19 21:11:19 +01:00
Olaf Seibert
33fc39ff32
Bump version to 0.7.
2021-03-19 20:16:16 +01:00
Olaf Seibert
b100021ffd
Add check for odd branch target.
...
Apart from the fact that instruction addresses must be even, this can't
even be expressed since the branch offset is expressed in words.
2021-03-14 21:19:18 +01:00
Olaf Seibert
0e373a8570
Make operand parsing error messages more helpful
...
and add a test that is supposed to exercise them all.
2021-03-14 20:19:15 +01:00
Olaf Seibert
d4c0520ac1
Update CHANGES.
2021-03-14 14:43:54 +01: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
6280a4416e
Add test file with all opcodes.
2021-03-13 16:49:16 +01:00
Olaf Seibert
cf7e442557
LDCFD: add missing FloatingPointProcessor instruction.
2021-03-13 15:48:04 +01:00
Olaf Seibert
7d4370af45
Make sure "str->stream.next = NULL"
...
even though it isn't strictly necessary (stack_push() will set it
later).
2021-03-13 14:50:57 +01:00
Olaf Seibert
70d06c9a92
Fix a double free.
2021-03-13 14:50:29 +01:00
Bjoren Davis
12e66a65d9
Properly set the character pointer after the operand.
...
Fixes issue #6 .
2021-03-13 14:00:51 +01:00
Olaf Seibert
54b73f7f9c
Attempt bracketing checking.
...
Too bad we can't issue a diagnostic here now; we just return failure
and the caller will probably next try a whitespace delimited string
next.
2021-02-18 22:49:52 +01:00
Olaf Seibert
289860e539
Rearrange flow control in brackrange()
...
which was a bit weird.
This also fixes a potential bug when a bracketed or nested string is not
properly terminated on this line.
2021-02-18 20:56:54 +01:00
Olaf Seibert
13c5a8374f
Adjust the notice in CHANGES.
2021-02-15 20:06:34 +01:00