Content deleted Content added
m →RPL: Some copy editing. |
m →RPL: More copy editing. |
||
Line 277:
===RPL===
[[Hewlett-Packard|HP]]'s [[RPL (programming language)|RPL]], first introduced in the [[HP-18C]] calculator in 1986, is a type of proprietary hybrid direct-threaded and indirect-threaded threaded-interpreted language that, unlike others TILs, allows embedding of RPL "objects" into the "runstream" ie. The stream of addresses through which the interpreter pointer advances. An RPL "object" can be thought of as a special data type whose in-memory structure contains an address to an "object prolog" at the start of the object, and then data or executable code follows. The object prolog determines how the object's body should be executed or processed. Using the "RPL inner loop",<ref name="RPL1">Busby, Jonathan. [https://www.hpmuseum.org/forum/thread-11358.html "The RPL inner loop explained"], [http://www.hpmuseum.org/ "The Museum of HP Calculators"],
# Dereference the IP (instruction pointer) and store it into O (current object pointer)
# Increment the IP by the length of one address pointer
# Dereference O and store its address in O_1 (
# Transfer control to next pointer or embedded object by setting the PC (program counter) to O_1 plus one address pointer
# Go back to step 1
|