Add ^pl and ^ph expressions from 2.11BSD's m11.

I hope I understood what this is doing!
This commit is contained in:
Olaf Seibert
2017-04-28 22:39:51 +02:00
parent 27abf32bf4
commit 4916b699fa
5 changed files with 122 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ TESTS="test-asciz \
test-prec \
test-psect \
test-rad50 \
test-ua-pl \
test-undef \
test-word-comma"

35
tests/test-ua-pl.lst.ok Normal file
View File

@@ -0,0 +1,35 @@
1 ;;;;;
2 ;
3 ; Test ^pl and ^ph
4
5 000000 .PSECT section
6
7 000000 000000' .word <^pl section>
8 000002 000014' .word <^ph section>
9 000004 000000' .word <^pl code>
10 000006 000010' .word <^ph code>
11 000010 010' .byte <^ph code>
12 000011 000C .byte <^ph code> / 256
13
14 000000 .PSECT code
15
16 000000 000000' .word <^pl section>
17 000002 000014' .word <^ph section>
18 000004 000000' .word <^pl code>
19 000006 000010' .word <^ph code>
20
21 .end
21
Symbol table
. ******R 003
Program sections:
. ABS. 000000 000 (RW,I,GBL,ABS,OVR,NOSAV)
000000 001 (RW,I,LCL,REL,CON,NOSAV)
SECTIO 000014 002 (RW,I,LCL,REL,CON,NOSAV)
CODE 000010 003 (RW,I,LCL,REL,CON,NOSAV)

21
tests/test-ua-pl.mac Normal file
View File

@@ -0,0 +1,21 @@
;;;;;
;
; Test ^pl and ^ph
.PSECT section
.word <^pl section>
.word <^ph section>
.word <^pl code>
.word <^ph code>
.byte <^ph code>
.byte <^ph code> / 256
.PSECT code
.word <^pl section>
.word <^ph section>
.word <^pl code>
.word <^ph code>
.end

29
tests/test-ua-pl.objd.ok Normal file
View File

@@ -0,0 +1,29 @@
GSD:
MODNAME .MAIN.=0 flags=0
PSECT =0 CON RW REL LCL I flags=40
PSECT . ABS.=0 OVR RW ABS GBL I flags=104
PSECT CODE =10 CON RW REL LCL I flags=40
PSECT SECTIO=14 CON RW REL LCL I flags=40
XFER . ABS.=1 flags=10
ENDGSD
RLD
Location counter definition SECTIO+0
TEXT ADDR=0 LEN=12
000000: 000000 000014 000000 000010 ........
000010: 000010 ..
RLD
Internal 0=0
Internal 2=14
PSECT plus offset 4=CODE+0
PSECT plus offset 6=CODE+10
PSECT plus offset byte 10=CODE+10
Complex byte 11=CODE:10 256 / store
Location counter definition CODE+0
TEXT ADDR=0 LEN=10
000000: 000000 000014 000000 000010 ........
RLD
PSECT plus offset 0=SECTIO+0
PSECT plus offset 2=SECTIO+14
Internal 4=0
Internal 6=10
ENDMOD