[TUHS] pdp-11 assembly as a hll?
Bakul Shah
bakul at bitblocks.com
Wed Feb 14 17:27:42 AEST 2018
On Tue, 13 Feb 2018 22:12:50 -0700 Warner Losh <imp at bsdimp.com> wrote:
>
> On Tue, Feb 13, 2018 at 8:18 PM, Dave Horsfall <dave at horsfall.org> wrote:
>
> > On Tue, 13 Feb 2018, Warner Losh wrote:
> >
> > I don't suppose anybody has written a pdp-11 assembler to C translator...
> >> My google fu is insufficient for the day.
> >>
> >
> > I'd like to see it handle "JSR PC,@(SP)+"... Are you reverse-engineering
> > something, writing a PDP-11 simulator, or what?
>
>
> I was wondering what it would take to convert the v6/v7 basic program into
> something that can be run today.
>
> http://www.tuhs.org/cgi-bin/utree.pl?file=V6/usr/source/s1/bas.s
> or
> http://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/bas/bas.s
>
> Its 2128 lines. It doesn't have that fun instruction in it :)
May be it just needs a perl script to generate C code?
Example:
2: label(lab0);
cmp r0,(r3) cmp(r0,deref(r3));
beq 2f beq(lab1);
tst (r3) => tst(deref(r3));
beq 2f beq(lab1);
add $6,r3 add(6,r3);
br 2b br(lab0);
2: label(lab1);
C calls are to macros or inline functions.
More information about the TUHS
mailing list