Post Reply 
RCL IND IND: a solution in search of a problem?
12-19-2014, 08:28 AM (This post was last modified: 12-19-2014 08:31 AM by Ángel Martin.)
Post: #6
RE: RCL IND IND: a solution in search of a problem?
Here's the code for both functions, RIND2 and SIND2... easy does it: only 50 bytes for the whole thing.

I've made them prompting, and with IND capability - so effectively they provide a triple-IND in that case (my head spins with all these pointers).

Code:

AAC0    0B2    "2"    
AAC1    004    "D"    "RCL IND IND _ _"
AAC2    00E    "N"     a solution in search of a problem…"
AAC3    209    "I"    
AAC4    213    "S"    Ángel Martin
AAC5    108    SETF 8    
AAC6    0F8    READ 3(X)    
AAC7    070    N=C ALL    
AAC8    03B    JNC +07    [MAIN]
AAC9    0B2    "2"    
AACA    004    "D"    "STO IND IND _ _"
AACB    00E    "N"     a solution in search of a problem…"
AACC    209    "I"    
AACD    212    "R"    Ángel Martin
AACE    104    CLRF 8    
AACF    04C    ?FSET 4    
AAD0    01F    JC  +03    SST'ing a program
AAD1    2CC    ?FSET 13    
AAD2    01B    JNC +03    RUN'ing a program
AAD3    179    ?NC XQ    Get Parameter from NextLine
AAD4    10C    ->435E    [GETRG#]
AAD5    026    B=0 S&X    single registers
AAD6    219    ?NC XQ    check for valid IND addr 
AAD7    10C    ->4386    [EXISTS]
AAD8    0A6    A<>C S&X    
AAD9    270    RAM SLCT    
AADA    038    READ DATA    yy = IND (xx)
AADB    38D    ?NC XQ    convert C to Hex in C[S&X]
AADC    008    ->02E3    [BCDBIN]
AADD    106    A=C S&X    
AADE    255    ?NC XQ    check for valid addr
AADF    10C    ->4395    [VALID]
AAE0    0A6    A<>C S&X    
AAE1    270    RAM SLCT    
AAE2    038    READ DATA    zz = IND (yy) = IND[ IND (xx) ]
AAE3    106    A=C S&X    
AAE4    38D    ?NC XQ    convert C to Hex in C[S&X]
AAE5    008    ->02E3    [BCDBIN]
AAE6    255    ?NC XQ    check for valid addr
AAE7    10C    ->4395    [VALID]
AAE8    0A6    A<>C S&X    
AAE9    270    RAM SLCT    
AAEA    038    READ DATA    zz' s contents
AAEB    10C    ?FSET 8    
AAEC    0A5    ?NC GO          RCL and stack lift
AAED    04A     ->1229    [LXEXL]
AAEE    0B0    C=N ALL    
AAEF    000    WRIT DATA    
AAF0    3C1    ?NC GO    doa proper exit
AAF1    002    ->00F0    [NFRPU]

The calls to the Library#4 are easily ported, let me know if you're interested in getting more details.

These functions are now in the CL_XMEM module.

Cheers,
ÁM

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: RCL IND IND: a solution in search of a problem? - Ángel Martin - 12-19-2014 08:28 AM



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