HP-35/45 Simulator for PDP-8
krause at informatik.uni-stuttgart.de
Fri Sep 9 10:07:02 CDT 2016
On Thu, 8 Sep 2016, Vincent Slyngstad wrote:
> From: Kyle Owen: Thursday, September 08, 2016 5:43 PM
>> On Sep 8, 2016 8:28 PM, "Vincent Slyngstad" wrote:
>>> That should probably be:
>>> 7 00402 7620 snl cla / Link set?
>>> 8 00403 7140 cll cma / No, remember it
>>> Needs more testing :-/.
Yes, I think, there is a bug in your code:
SNL CLA /CLA IS REDUNDANT, AS AC is 0 here
CLL CMA /CLL MAKES NO SENSE BECAUSE LINK IS NOT SET, IF THE SNL
/DOES NOT SKIP
CLL /IS NEEDED AFTER THE SNL, OTHERWAYS THE MSB WOULD BE
/INVERTED AFTER THE BSW-ROUTINE.
I tried both versions with the emulator, and both gave identical
results. So I tested another "BSW"-replacement, simply:
JMP I BSWEMU
This also worked. ;-) I didn't look in the code, but evidently the
BSWs are only used, to get the higher 6 bits of a word.
And now another question came up. What does a hp-calculator answer,
if you ask fot tan(90)?
hp35_emu: 90 t gives 9.9999999999 E99
hp35_real: didn't find the power supply :-(
hp9100: 90 tan gives 9.9999999999 E99
hp9810: 90 tan gives 9.9999999999 E98 (yes, E98!)
hp9820: 90 tan gives "NOTE 01"
Here are the three version of BSW:
/ K. KRAUSE K. OWEN V. SLYNGSTEDT
BSWEMU, NOP /BSWSUB, 0 /BSW, 0
DCA AC / DCA BSWTMP / DCA SAVEAC
RAL / SZL / SNL
DCA LINK / TAD C0100 / CMA
TAD AC / DCA BSWLINK / CLL
RTR / TAD BSWTMP / DCA SAVEL
RTR / CLL / TAD SAVEAC
RTR / AND C7700 / AND C7700
AND M0077 / RAL / TAD SAVEAC
DCA BH / TAD BSWLNK / RTL
TAD AC / DCA BSWLNK / RTL
AND M0077 / TAD BSWTMP / RTL
RTL / AND C0077 / ISZ SAVEL
RTL / TAD BSWLNK / CML
RTL / RTL / JMP I BSW
TAD BH / RTL /SAVEAC,0
CLL RAL / RTL /SAVEL, 0
TAD LINK / JMP I BSWSUB /C7700, 7700
RAR / BSWTMP
JMP I BSWEMU / BSWLNK
AC, 0000 / C7700
LINK, 0000 / C0077
BH, 0000 / C0100
I added literals an temporary locations to the code, because one cannot
be sure, that a special literal, as for example 0100 or 0077 exists in
the other code.
Stuttgarter KompetenzZentrum fyr Minimal- & Retrocomputing.
More information about the cctech