Post Reply 
Raw files for these HP 67 program listings ?
09-02-2016, 06:47 AM (This post was last modified: 09-02-2016 06:48 AM by Dieter.)
Post: #13
RE: Raw files for these HP 67 program listings ?
(09-02-2016 04:13 AM)RobertM Wrote:  Here is my take(s) on Blackjack.
(...)
And then a slightly modified version, that doesn't require the card reader module. Replaced 7ISZ with ISG, ENTER, and 7DSP with FIX, and 7PRTX with VIEW X, PSE, PSE, PSE, CLD.

Great. I see you use the same initialization routine as my Jive Turkey version. The idea is to initialize some settings (flags, display format, user mode) which on a 67/97 is automatically done while the program card is read. If this is considered a good idea we should maybe do this for all translated programs.

BTW, the Blackjack program includes an infinite loop at LBL b. What's the idea behind this? It looks like this is supposed to simulate shuffling the cards: Enter a random seed and press f b, let it run for a few seconds and a new seed is generated.

Two more notes:

The 67/97 can always access 26 data registers, and it is common practice to use the higher registers A...E (i.e. R20...24). Since a lot of programs use the I-register, even the highest register number (25) is occupied even if the program otherwise merely uses R0 and R1. On the other hand memory can be limited on the 41 (especially the 41C without RAM extension), so it is a good idea to move A...E and I downwards to the lowest possible addresses. In this case (BJ) that's R10...R12 instead of D, E and I. This way only SIZE 13 is required.

In this program the HP67/97 ISZ command can be replaced with ISG followed by a dummy instruction that is never executed, as register "I" always holds a positive integer. Please note that this is not always possible. Also, instead of using ENTER for the dummy instruction, something like LBL 20 could be used. Such a label never occurs in a 67/97 program.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Raw files for these HP 67 program listings ? - Dieter - 09-02-2016 06:47 AM



User(s) browsing this thread: 1 Guest(s)