[Simh] Cross-assemblers, cross-compilers: success! (so far)
Jan-Benedict Glaw
jbglaw at lug-owl.de
Wed Jul 25 04:37:23 EDT 2012
On Wed, 2012-07-25 10:25:13 +0200, Jordi Guillaumes i Pons <jg at jordi.guillaumes.name> wrote:
> Al 25/07/12 10:16, En/na Jan-Benedict Glaw ha escrit:
> > On Wed, 2012-07-25 00:05:27 +0200, Jordi Guillaumes i Pons <jg at jordi.guillaumes.name> wrote:
[...]
> jguillaumes at eeepc2jordi:~$ pdp11-aout-ld
> pdp11-aout-ld:built in linker script:7: syntax error
This seems to be fixed in what you can find in binutils's GIT tree:
------------------- >8 ============================
jbglaw at darkeye:/mnt/devel/src/linux/pdp11_test$ ls
hello.s Makefile putcon.s
jbglaw at darkeye:/mnt/devel/src/linux/pdp11_test$ cat Makefile
#!/usr/bin/make -f
helloworld:
pdp11-aout-as putcon.s -o putcon.o
pdp11-aout-as hello.s -o hello.o
pdp11-aout-ld hello.o putcon.o -o hellopdp.out
clean:
rm -f putcon.o hello.o hellopdp.out
jbglaw at darkeye:/mnt/devel/src/linux/pdp11_test$ make
pdp11-aout-as putcon.s -o putcon.o
pdp11-aout-as hello.s -o hello.o
pdp11-aout-ld hello.o putcon.o -o hellopdp.out
jbglaw at darkeye:/mnt/devel/src/linux/pdp11_test$ pdp11-aout-objdump -d hellopdp.out
hellopdp.out: file format a.out-pdp11
Disassembly of section .text:
00000000 <start>:
0: 15c6 1000 mov $10000, sp
4: 15c1 0100 mov $400, r1
8: 15c2 000c mov $14, r2
c: 9240 movb (r1), r0
e: 09f7 000e jsr pc, 20 <putcon.o>
12: 0ac2 dec r2
14: 0303 beq 1c <helloc+0x10>
16: 0a81 inc r1
18: 0077 fff0 jmp c <helloc>
1c: 00a0 nop
...
00000020 <putcon.o>:
20: 1066 mov r1, -(sp)
22: 10a6 mov r2, -(sp)
24: 15c1 1388 mov $11610, r1
28: 1dc2 ff48 mov $ffffff74 <XCSR>, r2
2c: 3097 0080 bit r2, $200
30: 0206 bne 3e <putcon.o+0x1e>
32: 0ac1 dec r1
34: 02f9 bne 28 <putcon.o+0x8>
36: 15c0 0002 mov $2, r0
3a: 0077 0022 jmp 60 <putcon.o+0x40>
3e: 9037 ff34 movb r0, $ffffff76 <XBUF>
42: 15c1 1388 mov $11610, r1
46: 1dc2 ff2a mov $ffffff74 <XCSR>, r2
4a: 3097 0080 bit r2, $200
4e: 0206 bne 5c <putcon.o+0x3c>
50: 0ac1 dec r1
52: 02f9 bne 46 <putcon.o+0x26>
54: 15c0 0002 mov $2, r0
58: 0077 0004 jmp 60 <putcon.o+0x40>
5c: 15c0 0000 mov $0, r0
60: 1582 mov (sp)+, r2
62: 1581 mov (sp)+, r1
64: 0087 rts pc
=================== 8< ----------------------------
So this seems to work out of the box right now.
> Of course, binutils is a widely used package, and the public
> interest of being able to build paper tape images for a simulator of
> an almost dead architecture is... debatable :) Of course, the fun
> factor already applies :)
I didn't work in that area, but I'll have a look at it Maybe it can
easily be worked out.
And GCC? I cannot yet tell about it, it's still building. Takes some
more time than binutils...
MfG, JBG
--
Jan-Benedict Glaw jbglaw at lug-owl.de +49-172-7608481
Signature of: Zensur im Internet? Nein danke!
the second :
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20120725/fac5daa4/attachment.sig>
More information about the Simh
mailing list