Recognizing addressing features - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: General Forum (/forum-4.html) +--- Thread: Recognizing addressing features (/thread-14623.html) |
Recognizing addressing features - Orome - 03-09-2020 10:13 PM The feature comparison tables refer to
What are these different addressing features. Can they be illustrated with simple examples, and how would I know from looking at code which mode was available or being used? RE: Recognizing addressing features - toml_12953 - 03-10-2020 12:15 AM (03-09-2020 10:13 PM)Orome Wrote: The feature comparison tables refer to Some calculators differ in implementation but I've used some that follow these conventions. Line number addressing if x>0 print 5 and stop otherwise just stop: 1: if x>0 gto 3 2: r/s 3: 5 4: r/s Global program addressing GTO A will print 5 no matter what program is being executed: LBL A print 5 R/S Local program addressing If program 1 is executing, gto A will print 5. If program 2 is executing, gto A will print 7: Prog1: LBL A print 5 R/S Prog2: LBL A print 7 R/S Indirect addressing use a register to store the line number to branch to: 9 -> i ; store 9 in i gto(i) ; go to the line number stored in i (in this case go to line 9) RE: Recognizing addressing features - Orome - 03-10-2020 01:17 PM I also see (on the 35s for example) another mode where addresses begin with a table number and are relative to that address, e.g. A004 or D004. This looks like a hybrid of "nine number addressing" and "label addressing", but I'm not sure what to call it. It's not really line number addressing as one would think of it (the address in memory), but more like label dressing where every address has a label. Is there a name for this mode? Which models have it? |