Post Reply 
(34S) Full Key Scan Map w/ A-Z to 1-26 conversion [highly compressed; <37 steps!]
08-26-2016, 11:49 PM (This post was last modified: 08-27-2016 01:07 AM by Nick.)
Post: #2
RE: (34S) Full Key Scan Map w/ A-Z to 1-26 conversion [highly compressed; <39 steps!]
In response to a mini-challenge, Didier Lachieze posted the following improvement at a reduction of two steps! Great job:

(08-26-2016 03:49 PM)Didier Lachieze Wrote:  Nice job! It's pretty well compressed already.
But ... as it is a challenge, here is a 37 steps version:

Code:
01 LBL 'KEY'
02 LBL 00
03 VIEW X
04 PSE 99
05 KEY? X
06 GTO 00
07 LBL?->X
08 GTO->X
09 ENTER
10 SDR 001
11 IP
12 LBL?->X
13 GTO->X
14 SKIP 006
15 LBL 01
16 DEC Y
17 DEC Y
18 LBL 03
19 LBL 04
20 DEC Y
21 # 007
22 *
23 -
24 GTO 00
25 LBL 24
26 LBL 25
27 LBL 26
28 LBL 31
29 LBL 35
30 LBL 41
31 LBL 51
32 LBL 61
33 LBL 62
34 LBL 72
35 +/-
36 GTO 00
37 RTN

Comments:

Due to Didier's use of additional exclusion (an improvement), this makes labels {2, 5, 6, 7} still reserved -- they cannot appear in the routine if it is to perform as specified (you'd get unintended branching -- unless that were your intention).

And now that I think of it, the scan codes of A - Z are also reserved, but this could be of benefit as it allows you to override the behavior of any letter by adding a label that contains its original scan code. How about that...
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (34S) Full Key Scan Map w/ A-Z to 1-26 conversion [highly compressed; <39 steps!] - Nick - 08-26-2016 11:49 PM



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