(PC-1200) N-Queens
|
02-21-2023, 09:16 PM
(This post was last modified: 03-16-2023 02:42 PM by robve.)
Post: #1
|
|||
|
|||
(PC-1200) N-Queens
The Sharp PC-1200/PC-1201 was made 1977-1978
10+2 digits precision, 14 digit VFD 2 standard registers (x and y operands) 1 constant register (constant operations with = key) 3 stat registers (internal n, ∑x, ∑x²) 4 bracket registers (parenthesized calculations) 12 memory registers (M0 to M9, s and t) 1 label register, set with GTO n to run a routine with S/E and cleared with CA 128 steps keystroke-programmable Links: http://www.rskey.org/CMS/index.php/exhibit-hall/96 http://www.arithmomuseum.com/album.php?c...ang=en&t=5 https://www.johnwolff.id.au/calculators/...PC1201.htm http://le-rayon-des-calculatrices.fr/WordPress3/?p=2787 https://www.hpmuseum.org/forum/thread-2503.html N-Queens algorithm references The program is based on the flowcharts that are linked in Dave Britten's solution for the HP-65. Registers s = the specified board size n t = 0 constant for testing M0 = number of old queens placed M1 = new queen M2 = old queens placed M3 = chopping block M4 = counter Execution Press CA to run the program from the start. Enter n, for example enter 8 to run the 8-queens benchmark, then press S/E Solution In 12 minutes and 42 seconds the display shows the first solution u 15863724. where u means user input (the HLT operation). Pressing S/E calculates the next solution, and so on, until the calculator returns -1 without requesting further user input. The running time for all solutions of the 8-queens problem should be about 4 hours, which is rough estimation based on running all solutions on the Sharp PC-G850 using the same "chopping block" algorithm (in BASIC) and by using the time of the first solution to scale. It turns out that the Sharp PC-1200 is only 10 times slower than the PC-G850 BASIC for this same algorithm (the PC-G850 Z80 CPU runs at 8MHz.) The PC-1200 is a fast keystroke programmable, especially for the 70s. Program The 94-step keystroke program with steps and comments (key codes are omitted for clarity). Code: 000 CAM ; clear all memory The program with key codes is listed below. The PC-1200/PC-1201 lists key codes, which are entered by pressing a key or key combination. The machine produces a satisfying beep to acknowledge the key entry (did I mention I love this calculator?) Key codes can be edited, inserted (INS) and deleted (DEL) in a program while moving forward or backward a step with FST and BST, respectively (pressing GTO + digit before switching to PRO mode jumps directly to a label). Two-digit key codes are simply the ROWCOL location of a key on the keyboard. For example, 84 (row 8, column 4) is the = key and F-12 is the (shifted, hence F) HLT key. Digits are 00 to 09. Some codes have an operand, such as F-13-05 for (shifted) LBL 5. Code: 000 F-45 CAM ; clear all memory - Rob Edit: minor edit to name the "chopping block" algorithm plus program with key codes included; added FST/BST and GTO navigation comment. "I count on old friends to remain rational" |
|||
02-22-2023, 06:39 AM
Post: #2
|
|||
|
|||
RE: (PC-1200) N-Queens
Pretty fast for it's time. Nice to have it in the list now. Thanks for your effort.
Calculator Benchmark |
|||
02-22-2023, 01:19 PM
Post: #3
|
|||
|
|||
RE: (PC-1200) N-Queens
Very cool! I'm glad I stumbled across this algorithm in Mathematical Recreations. It's opened up solutions to the problem on a lot of "weaker" hardware. Hats off to Dean Hoffman and Lee Mohler for devising it.
I've tried finding a PC-1200 or PC-1201 on ebay a few times, but they're too rich for my blood. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)