muta...@gmail.com
2021-04-27 19:07:58 UTC
I currently have a situation where "ld" is giving
an error, and when I put in printfs to isolate the
fault, it took me back to fwrite() returning a
large negative number, and when I went to
debug that, it took me away from that error
and at the moment, after the last message
printed, I don't even know something as basic
as whether the CPU is even executing
instructions or not.
Because I found out that my application can
write to address 0 and it can also divide by
zero without any indication of a problem.
The problem is almost certainly in either
PDPCLIB or PDOS, but it is only revealed when
a specific application exercises it.
If I was running Hercules it would show the PSW
every second so I would at least know whether it
is actually running. But with Bochs I know nothing.
Yes, I could use the debug version of Bochs instead,
and do it that way, but that's cheating. I want to know
I can do this on raw metal on a primitive processor
that doesn't have debugging facilities.
What I would like to do is insert INT 24H (or some
other suitable number) after every machine
instruction, and get the OS to print the current CPU
instruction, and later some registers.
I don't care how long it takes for the output to be
printed. I've always wanted to spend more time
with my family anyway (yeah, right!).
Everything will be loaded at consistent addresses,
and I can print those out before doing the INT 24H
thing so that I can interpret the results.
I need to coax GCC to insert INT 24H instructions
everywhere.
Or is there some other technique? And is there a
different number than 24H that would be appropriate?
Thanks. Paul.
an error, and when I put in printfs to isolate the
fault, it took me back to fwrite() returning a
large negative number, and when I went to
debug that, it took me away from that error
and at the moment, after the last message
printed, I don't even know something as basic
as whether the CPU is even executing
instructions or not.
Because I found out that my application can
write to address 0 and it can also divide by
zero without any indication of a problem.
The problem is almost certainly in either
PDPCLIB or PDOS, but it is only revealed when
a specific application exercises it.
If I was running Hercules it would show the PSW
every second so I would at least know whether it
is actually running. But with Bochs I know nothing.
Yes, I could use the debug version of Bochs instead,
and do it that way, but that's cheating. I want to know
I can do this on raw metal on a primitive processor
that doesn't have debugging facilities.
What I would like to do is insert INT 24H (or some
other suitable number) after every machine
instruction, and get the OS to print the current CPU
instruction, and later some registers.
I don't care how long it takes for the output to be
printed. I've always wanted to spend more time
with my family anyway (yeah, right!).
Everything will be loaded at consistent addresses,
and I can print those out before doing the INT 24H
thing so that I can interpret the results.
I need to coax GCC to insert INT 24H instructions
everywhere.
Or is there some other technique? And is there a
different number than 24H that would be appropriate?
Thanks. Paul.