HP-35/45 Simulator for PDP-8
Kyle Owen
kylevowen at gmail.com
Thu Sep 8 17:53:31 CDT 2016
On Thu, Sep 8, 2016 at 8:30 AM, Klemens Krause <
krause at informatik.uni-stuttgart.de> wrote:
>
> I tried it out: I dowloaded the hp35only.pal-source, because it needs only
> 4K of memory, kermited it to my PDP8/E and succeeded assembling with PAL8
> without modifying the PALBERT-code.
> After starting it worked well. :-)
>
Awesome, glad to hear!
As I'm always looking for 4K-applications for our older machines,
> I downloaded the .BN to our classic-8 and started it. It gave
> "strange" output. :-(
> A look in the source showd some BSWs, an operation that doesn't exist
> on pre PDP8/E machines. I replaced the BSWs with "JMS BSWEMU", a short
> subroutine to perform the byte-swap and now the hp35 runs on the
> classic-8 with 4K of memory too. I also had to replace the MQLs with CLAs.
>
> Next step is to modify the output, to run it with a teletype...
>
You've inspired me to try my hand at converting the current version into a
4K HP-35 only version with a macro switch. Teletype output is already in
the works too; I have some ideas there.
How does the following compare to your BSWEMU, by the way? This ensures
that the link bit remains untouched, which may or may not be important in
every case of BSW in my application.
BSWSUB, 0
DCA BSWTMP /SAVE VALUE
SZL /IS LINK ZERO?
TAD (0100) /NO, ADD 100
DCA BSWLNK /SAVE LINK
TAD BSWTMP /GET VALUE TO BSW
CLL /CLEAR LINK
AND (7700) /KEEP TOP HALF
RAL /ROTATE IT LEFT
TAD BSWLNK /ADD LINK
DCA BSWLNK /SAVE IT
TAD BSWTMP /GET VALUE
AND (0077) /KEEP BOTTOM HALF
TAD BSWLNK /GET REST OF IT
RTL /ROTATE INTO POSITION
RTL
RTL
JMP I BSWSUB /RETURN WITH ORIGINAL LINK AND BSW
BSWTMP, 0
BSWLNK, 0
Essentially, I shift the top six bits once to the left into a now-emptied
link bit, add in the bottom six bits and the previous link bit to the left
of the bottom six bits, then shift 6 times to the left; the old link is now
in the link position, and the two halves of the AC are swapped.
I'm sure I've seen some code before that does this, but I can't seem to
find any now that I'm looking for it. Maybe there's a shorter way. I think
this takes 23 words if you include the (0100), (7700), and (0077), which
may or may not also be used elsewhere in the first page where I put this
subroutine.
Thanks,
Kyle
More information about the cctech
mailing list