On Wed, 2012-07-25 10:37:23 +0200, Jan-Benedict Glaw <[email protected]> wrote: > On Wed, 2012-07-25 10:25:13 +0200, Jordi Guillaumes i Pons > <[email protected]> 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 > > > <[email protected]> wrote: > [...] > > jguillaumes@eeepc2jordi:~$ pdp11-aout-ld > > pdp11-aout-ld:built in linker script:7: syntax error > > And GCC? I cannot yet tell about it, it's still building. Takes some > more time than binutils...
GCC is readily built (from GIT repository):
jbglaw@darkeye:/mnt/devel/src/linux/pdp11_test$ cat *.c
extern void putconch(char ch);
int start(void) {
char *hello = "hello";
int i;
for (i = 0; hello[i]; i++)
putconch (hello[i]);
return 0;
}
jbglaw@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
hellocworld:
pdp11-aout-as putcon.s -o putcon.o
pdp11-aout-gcc -c hello.c -o hello.o
pdp11-aout-ld hello.o putcon.o -o hellopdp.out
clean:
rm -f putcon.o hello.o hellopdp.out
jbglaw@darkeye:/mnt/devel/src/linux/pdp11_test$ make hellocworld
pdp11-aout-as putcon.s -o putcon.o
pdp11-aout-gcc -c hello.c -o hello.o
pdp11-aout-ld hello.o putcon.o -o hellopdp.out
jbglaw@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 <hello.o>:
0: 6568 add (r5)+, *-(r0)
2: 6c6c 006f add 157(r1), *-(r4)
00000006 <_start>:
6: 1166 mov r5, -(sp)
8: 1185 mov sp, r5
a: 65c6 fffc add $-4, sp
e: 15f5 0000 fffc mov $0, -4(r5)
14: 0a35 fffe clr -2(r5)
18: 010c br 32 <_start+0x2c>
1a: 1d40 fffe mov -2(r5), r0
1e: 6d40 fffc add -4(r5), r0
22: 9200 movb (r0), r0
24: 9026 movb r0, -(sp)
26: 09f7 001e jsr pc, 48 <putcon.o>
2a: 65c6 0002 add $2, sp
2e: 0ab5 fffe inc -2(r5)
32: 1d40 fffe mov -2(r5), r0
36: 6d40 fffc add -4(r5), r0
3a: 9200 movb (r0), r0
3c: 8bc0 tstb r0
3e: 02ed bne 1a <_start+0x14>
40: 0a00 clr r0
42: 1146 mov r5, sp
44: 1585 mov (sp)+, r5
46: 0087 rts pc
00000048 <putcon.o>:
48: 1066 mov r1, -(sp)
4a: 10a6 mov r2, -(sp)
4c: 15c1 1388 mov $11610, r1
50: 1dc2 ff20 mov $ffffff74 <XCSR>, r2
54: 3097 0080 bit r2, $200
58: 0206 bne 66 <putcon.o+0x1e>
5a: 0ac1 dec r1
5c: 02f9 bne 50 <putcon.o+0x8>
5e: 15c0 0002 mov $2, r0
62: 0077 0022 jmp 88 <TXRDY+0x8>
66: 9037 ff0c movb r0, $ffffff76 <XBUF>
6a: 15c1 1388 mov $11610, r1
6e: 1dc2 ff02 mov $ffffff74 <XCSR>, r2
72: 3097 0080 bit r2, $200
76: 0206 bne 84 <TXRDY+0x4>
78: 0ac1 dec r1
7a: 02f9 bne 6e <putcon.o+0x26>
7c: 15c0 0002 mov $2, r0
80: 0077 0004 jmp 88 <TXRDY+0x8>
84: 15c0 0000 mov $0, r0
88: 1582 mov (sp)+, r2
8a: 1581 mov (sp)+, r1
8c: 0087 rts pc
MfG, JBG
--
Jan-Benedict Glaw [email protected] +49-172-7608481
Signature of: What we do for ourselves dies with us. What we do for
the second : others and the world remains and is immortal. (Albert
Pine)
signature.asc
Description: Digital signature
_______________________________________________ Simh mailing list [email protected] http://mailman.trailing-edge.com/mailman/listinfo/simh
