Post Reply 
Term for feature that abstracts RPN program location?
05-13-2020, 06:12 AM
Post: #10
RE: Term for language that abstracts program location?
Hello,

Early CPU had few instructions to run through, one program loaded at a time, and jumps where absolute. You would say: jump to instruction N.
It worked fine at the beginning... and was super simple to implement (just change the Program Counter to N)...

But then, CPU started running some sort of OS (of unknown size), gained more memory (which meant that "jump to address N" took more room to encode)...

This made programs/system that were using absolute addressing hard to use/create...
So entered relative jumps. They have 2 advantages: 1: you do not need to know where your program is loaded in memory. 2: when you jump short distances, you can have a compact instruction to say: jump + or - 32 bytes (for example). The Saturn CPU has short: +/-64bytes, normal (1K) and long (16K) jumps (if I remember well, unless I have it off by a factor of 2).
Such were called "relocable" (at least in my neck of the wood)...
Note that an absolute positionned program could still use relocable code!!!!

Now programming languages could follow, or not, similar concepts...
Basic (10 A=1; 20 print(A); 30 A=A+1 40 GOTO 20) is absolute... So are, to some extend (and in my opinion) some numbered labels languages where the labels HAVE to be in order... the other are not...
12C type languages which jump to an instruction number are absolute..

anyhow, my 2c :-)

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Term for language that abstracts program location? - cyrille de brébisson - 05-13-2020 06:12 AM



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