0

I have a small question: I have a subroutine that receives a letter (let's say "A") from the stack, and I want to jump to a label with the same name.

For example:

main: mov -(sp), r1
  br r1
A: mov r0,@#tpb

r1 will hold the value "A" which he got from the stack. then I want it to branch into label "A".

Thanks.

Bruno Koga
  • 3,864
  • 2
  • 34
  • 45
Eli Biham
  • 41
  • 1
  • 1
  • 5

1 Answers1

0

First, you'll have to make sure A is an exported symbol. Then, figure out how to look up the symbol table from your executable, search for the matching entry in the table, and then jump to the provided address. Wikipedia says that the PDP11 uses the a.out executable file format.

Carl Norum
  • 219,201
  • 40
  • 422
  • 469