Initial CS:EIP: object 7 offset 00000000
And I didn't see an object 7, so let me see if I can confirm that this is the problem.
I modified pdld to always put object 1 (as a kludge), and now my program seems to actually be run! It crashes though:
[Z:\]pdptest
SYS1808:
The process has stopped. The software diagnostic
code (exception code) is 0005.
[Z:\]
Not sure how to debug that at the assembler level.
But the problem is unlikely to be in the code anyway. One of those relocations may be wrong instead, and that is zapping the code.
I changed my application to just loop:
public __top
__top:
; We don't use the registers or stack at entry
public __intstart
__intstart proc
nop
nop
nop
nop
ploop: jmp ploop
mov eax, 0
ret
push eax
And you can see those NOPs in the executable:
D:\devel\pdos\pdpclib>hexdump pdptest.exe 0 400
000000 4D5A6000 01000000 04004000 FFFF0400 MZ`.......@.....
000010 00040000 00000000 40000000 00000000 ........@.......
000020 00000000 00000000 00000000 00000000 ................
000030 00000000 00000000 00000000 80000000 ................
000040 0E1FB409 BA1400CD 21B001B4 4CCD21EB ........!...L.!.
000050 FE000000 54686973 2070726F 6772616D ....This program
000060 206E6565 6473204F 532F3220 322E3020 needs OS/2 2.0
000070 6F722065 71756976 616C656E 740D0A24 or equivalent..$
000080 4C580000 00000000 02000100 00000000 LX..............
000090 00020000 07000000 01000000 00000000 ................
0000A0 04000000 F07F0000 00100000 00000000 ................
0000B0 44090000 00000000 A8000000 00000000 D...............
0000C0 35670000 04000000 95670000 00000000 5g.......g......
0000D0 00000000 00000000 CD670000 DB670000 .........g...g..
0000E0 00000000 00000000 DD670000 FD670000 .........g...g..
0000F0 18710000 01000000 21710000 00000000 .q......!q......
000100 30010000 00000000 00000000 00000000 0...............
000110 00000000 00000000 00000000 00000000 ................
000120 00000000 00000000 00000000 00000000 ................
000130 90909090 EBFEB800 000000C3 50E89E55 ............P..U
But it doesn't loop, so it is unlikely to be reaching this (intact) code.
I'm attaching the latest executable.