In my introductory classes, I introduced absolute addressing
before B-D addressing.
The instructions were specified in hexadecimal.
The program then executed at address zero using a simulator.
Pseudo instructions of one word were used for input and output.

----- Original Message ----- From: "glen herrmannsfeldt" <[email protected]>
To: <[email protected]>
Sent: Saturday, May 16, 2015 11:47 AM
Subject: absolute addressing example doesn't work


In the HLASM release 5 manual, there is an example:

"If a register is specified with base address zero, the assembler will use it in preference to the default use of register zero. For example:

  | USING 3,0
  | LA 7,5
| generates the instruction X'41703005'; in the absence of | the USING statement, the generated instruction would | be X'41700005'.

I suppose that works if it said  "USING 0,3" but what I
really want to know how to do is to generate real absolute
addresses.

Did you try   USING 0,0 ?

I now have an example from Tachyonsoft that looks like:

MYCODE   START  1000
        USING MYCODE,0
LOOP     MP X,Y
        DP X,Z
        ZAP X,X(13)
        B LOOP
X        DC PL16'8000'
Y        DC PL3'8001'
Z        DC PL3'8000'
        END  LOOP

which seems to work. It does generate offsets from zero, instead of from 1000 that it looks like it would.
I still don't know why it doesn't subtract 1000 from the
displacements.

---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com

Reply via email to