Post Reply 
Recognizing addressing features
03-09-2020, 10:13 PM (This post was last modified: 03-09-2020 10:40 PM by Orome.)
Post: #1
Recognizing addressing features
The feature comparison tables refer to
  • Line number addressing
  • Global program label addressing
  • Local program label addressing
  • Indirect / computed addressing and control

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?
Visit this user's website Find all posts by this user
Quote this message in a reply
03-10-2020, 12:15 AM
Post: #2
RE: Recognizing addressing features
(03-09-2020 10:13 PM)Orome Wrote:  The feature comparison tables refer to
  • Line number addressing
  • Global program label addressing
  • Local program label addressing
  • Indirect / computed addressing and control

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?

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)

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
03-10-2020, 01:17 PM (This post was last modified: 03-14-2020 01:06 PM by Orome.)
Post: #3
RE: Recognizing addressing features
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?
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




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