Post Reply 
Can 50g sysRPL jump to lables?
10-30-2018, 09:37 AM
Post: #14
Relative sysRPL jump to labels? Yes, possible.
Consider the following:
Code:

LOCALLABEL L_C1238

     DUP ONE SUB$1#
     NumericChr? NOTcase 2DROPFALSE
     CDR$ DUPNULL$?

*          NOT?GOTO L_C1238
CODE
    GOSBVL    =popflag
    GOC    +        * Skip lbl .

    A=PC
    LC(5)    (L_C1238)-(*)    offset to label
    C=C+A    A
    D0=C
+    LOOP
ENDCODE
The above was a (conditional) absolute GOTO converted to a (conditional) relative GOTO within the same RPL secondary. This way the code is relocateable.

Good RPL programming style? Certainly not. But that's not the point;-)

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


Messages In This Thread
Can 50g sysRPL jump to lables? - BlackMi - 10-22-2018, 07:09 AM
RE: Can 50g sysRPL jump to lables? - 3298 - 10-22-2018, 10:11 AM
RE: Can 50g sysRPL jump to lables? - 3298 - 10-29-2018, 01:36 PM
RE: Can 50g sysRPL jump to lables? - 3298 - 10-30-2018, 10:49 AM
Relative sysRPL jump to labels? Yes, possible. - Raymond Del Tondo - 10-30-2018 09:37 AM
RE: Can 50g sysRPL jump to lables? - 3298 - 10-30-2018, 03:36 PM
RE: Can 50g sysRPL jump to lables? - 3298 - 10-30-2018, 04:54 PM



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