Apart from anything else, your function table entries have problems:
This simply will not assemble correctly:
DC 'INIT 'A(INIT_DSP)
So I assume you probably meant:
DC C'INIT ',A(INIT_DSP)
Even so, when assembled, this will result in the assembler generating
three items:
* The 10-character string
* A 2-byte filler of zeros so as to properly align the address
* A 4-byte address
So later on, when you use an offset of 10 to locate the address, you
will actually be pointing to the filler bytes.
Ray
On 10/2/2015 13:57, Scott Ford wrote:
All:
I am building a branch table like this:
FUNC DS CL10
FUNCTBL DS 0H
DC 'INIT 'A(INIT_DSP)
......etc
TBLENT DS F'5'
------------------------------------------------------------------------------
LA R4,FUNCTBL
L R5,TBLENT
LOOPTBL DS 0H
CLC FUNC,0(R4)
BE FOUND_IT
FOUND_IT DS 0H
LA R4,10(R4)
L R14,R4
BALR R14,R15
Is my logic correct ? or did i miss something ?
Regards,
Scott