mirror of
https://github.com/open-simh/simtools.git
synced 2026-01-14 07:39:37 +00:00
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
```
95 lines
1.5 KiB
Bash
Executable File
95 lines
1.5 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Run some regression test cases.
|
|
#
|
|
# If there is a .lst.ok file, it compares the listing.
|
|
# If there is a .objd.ok file, it compares the result of dumpobj.
|
|
#
|
|
|
|
TESTS="test-asciz \
|
|
test-backpatch \
|
|
test-blkb \
|
|
test-bsl-mac-arg \
|
|
test-cis \
|
|
test-complex-reloc \
|
|
test-enabl-ama \
|
|
test-enabl-lcm \
|
|
test-endm \
|
|
test-float \
|
|
test-gbl \
|
|
test-if \
|
|
test-impword \
|
|
test-include \
|
|
test-jmp \
|
|
test-listing \
|
|
test-locals \
|
|
test-macro-comma \
|
|
test-mcall-file \
|
|
test-opcodes \
|
|
test-operands \
|
|
test-prec \
|
|
test-psect \
|
|
test-rad50 \
|
|
test-reloc \
|
|
test-rept \
|
|
test-ua-pl \
|
|
test-undef \
|
|
test-word-comma"
|
|
|
|
status=0
|
|
|
|
assemble() {
|
|
fmt="$1"
|
|
t="$2"
|
|
|
|
../macro11 $fmt -l "$t".lst -o "$t".obj "$t".mac 2>/dev/null
|
|
|
|
# Ignore error status and messages from the assembler.
|
|
# We check the listing file to see what we expect.
|
|
|
|
if [ -e "$t".lst.ok ]
|
|
then
|
|
diff -u "$t".lst.ok "$t".lst
|
|
status=$((status + $?))
|
|
fi
|
|
|
|
if [ -e "$t".objd.ok ]
|
|
then
|
|
../dumpobj $fmt "$t".obj >"$t".objd
|
|
diff -u "$t".objd.ok "$t".objd
|
|
status=$((status + $?))
|
|
fi
|
|
}
|
|
|
|
assemble_both() {
|
|
t=$1
|
|
|
|
assemble -rsx "$t"
|
|
assemble -rt11 "$t"
|
|
}
|
|
|
|
|
|
for t in $TESTS
|
|
do
|
|
assemble_both "$t"
|
|
done
|
|
|
|
for t in 2.11BSD/m11/*.m11
|
|
do
|
|
fn=$( echo ${t%.m11} | sed 's;/;-;g' )
|
|
|
|
cat >${fn}.mac <<EOF
|
|
;;;; Wrapper for $t
|
|
.list
|
|
.list
|
|
.list
|
|
debug = 1
|
|
.include "2.11BSD/m11/at.sml"
|
|
.include "${t}"
|
|
EOF
|
|
|
|
assemble_both "$fn"
|
|
done
|
|
|
|
exit $status
|