system to operate as a HASP station in an RJE environment. This implementation is
compatible with Bisync/HASP emulation in the Hercules IBM mainframe emulator and the
DtCyber CDC mainframe emulator.
PRIMOS2 was built to be relocated after being loaded by BOOT.
The build process rewrote the RVEC in the save file. The SA was anded
with :160000; the result was subtracted from SA and EA in the RVEC,
and stored into RA in the RVEC. The BOOT program knew to add the RA
value during the load process.
This change causes the emulator to recognize such an RVEC when booting
an R-mode executable from unix disk, and to adjust the RVEC before
actually loading the program. This fixes failure to boot *DOS64 from
19.2.9, for example.
The code only makes this adjustment if RA is non-zero, and RP is not
between SA and EA.
On linux, keepalive defaults off. The default timer on linux
is 7200 seconds. Do we need to make a note in the docs about
setting /proc/sys/net/ipv4/tcp_keepalive_time?
Solaris (SmartOS) build needs alternative solutions to two termios
things, plus makefile support for additional link libraries. PNC
support is untested and is likely _very_ slow, since Solaris doesn't
have O_ASYNC. The usual suggestion is to rewrite such code to use
poll().
Incidental: utilities makefile needed tabs to make `make` happy
on FreeBSD. Which make? Don't remember now.
Now that instpermsec is being adjusted every second instead of every
5 seconds, the initial value of instpermsec is not so critical. This
benchmark gave wildly varying results on different system and compilers.
Previously iget16 was used for all instruction fetches, with the
assumption that any could trap. But actually, only the first word of
the instruction stream can trap in V mode, which is why these
instructions must be short. Both words of a long R-mode instruction
can trap.
Tested change by booting R19 with and without -DFAST, all other revs
with -DFAST, and basic with trace on in R19 (this executes code from
the DFAC)
In slow mode (compiled without -DFAST), Rev. 19 would crash during
boot. On investigation, the code was branching to '4 after setting
up an instruction there. However, instruction fetch found a '0
instead of the expected instruction.
Instructions might be fetched from registers via trap. Fast iget16()
checks for fault. Slow iget16() does not, and just calls get16() which
does not check.
The initial estimate for instructions per millisec (instpermses) was
much too low for modern CPUs, and was also only updated every 5
seconds. Combined, these were causing the clock to be erratic during
the first 5-15 seconds of system boot.
This was easily noticed by running the MIPS benchmark program right
after a system boot, where instead of delaying 5 seconds, it might
only delay 2 seconds, and then would report a bogus MIPS rating.
Waiting a minute and running it again would give an accurate rating.
Adjusting the instpermsec initial value from 2000 to 40000 and
IPMSTIME time from 5000 ms to 1000 ms (every second vs 5 seconds)
fixes the problem.
The emulator reads SEG load maps for Primos and displays symbolic
names and offsets during tracing. But when running in S/R modes
during initial startup, there is no point in doing a load map lookup
and it's somewhat confusing to see segment 0 symbol names printed for
all effective addresses. A blank name was already printed for
user-mode S/R traces because the segment number is > 01777, usually
04000.
Removed comment about memory needing to be a power of 2. Testing
-mem 9 worked fine with rev 20:
OK, stat sys
System is currently running PRIMOS rev. 20.2.8
Copyright (c) Prime Computer, Inc. 1985
9216K bytes memory in use
It was confusing that MAXMB is the default memory size, so renamed it
to DEFMB. MEMSIZE was not necessary (half of MAXMB) and MEMMASK was
used only in mapva to limit physcal addresses when segmentation was
not enabled. However, this appears to be a bug, because it would
cause memory addresses larger than physical memory to wrap and succeed
rather than generate a missing memory check.
Link to four distribution tape sets on sysovl.
In the emulator doco paragraph, mention the man page.
Hacked on line wrap until I decided it was better to do it in vi.