Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Threaded code
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===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 interpretive language'' (TIL)<ref name="Loelinger_1981"/> that, unlike other TILs, allows embedding of RPL "objects" into the "runstream", i.e. 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="Busby_2018"/> which was invented and patented<ref name="Wickes_1986"/> by William C. Wickes in 1986 and published in 1988, execution follows like so:<ref name="Wickes_1988"/> # 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 (this is the second level of indirection) # 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 This can be represented more precisely by: <pre> O = [I] I = I + Ξ PC = [O] + Ξ </pre> Where above, O is the current object pointer, I is the interpreter pointer, Ξ is the length of one address word and the "[]" operator stands for "dereference". When control is transferred to an object pointer or an embedded object, execution continues as follows: <pre> PROLOG -> PROLOG (The prolog address at the start of the prolog code points to itself) IF O + Ξ =/= PC THEN GOTO INDIRECT (Test for direct execution) O = I - Ξ (Correct O to point to start of embedded object) I = I + Ξ± (Correct I to point after embedded object where Ξ± is the length of the object) INDIRECT (Rest of prolog) </pre> On HP's [[HP Saturn|Saturn]] microprocessors that use RPL, there is a third level of indirection made possible by an architectural / programming trick which allows faster execution.<ref name="Busby_2018"/>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Threaded code
(section)
Add topic