From: SMTP%"MACRO32@WKUVX1.BITNET" 29-JUL-1993 11:14:40.16 To: EVERHART CC: Subj: Re: AMAC vs. computed JMP X-ListName: "VMS Internals, MACRO, & BLISS Discussions" Warnings-To: <> Errors-To: MacroMan@WKUVX1.BITNET Sender: MacroMan@WKUVX1.BITNET Date: Thu, 29 Jul 1993 17:07:45 +0100 From: Arne Vajhxj Reply-To: MACRO32@WKUVX1.BITNET Subject: Re: AMAC vs. computed JMP To: MACRO32@WKUVX1.BITNET, moeller@gwdgv1.dnet.gwdg.de Message-ID: <01H14EJQMSFM9LV9EB@kopc.hhs.dk> X-VMS-To: KOPC::IN%"MACRO32@WKUVX1.BITNET" X-VMS-Cc: IN::"moeller@gwdgv1.dnet.gwdg.de" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1 Content-Transfer-Encoding: 8BIT > The program is tranferring control via a table of (among other things) > jump adresses, like > > ... > .psect data > table: > .long code1 - table > ... > .psect code > .entry ... > ... > moval table,r10 > movl (r10)[index],r11 > jmp (r11)[r10] > ... > code1: > ... > ret > > How do I convince Alpha-MACRO32 that > (1) 'code1' is reachable at all, > (2) I do want the "PIC" address difference stored in 'table', > (3) I do want to get to 'code1' via JMP only (no prologue!) ?? I guess the MACRO32-compiler on AXP is DEC's revenge for all the poor MACRO32 they have seen through the years. It is excellent in giving mysterious error-messages whenever something unusually is done. I tried the following small test-version: .title z .psect $PDATA quad,pic,con,lcl,shr,noexe,nowrt table: .long code1 - table .long code2 - table .psect $CODE quad,pic,con,lcl,shr,exe,nowrt .entry z,^m movl #0,r9 moval table,r10 movl (r10)[r9],r11 jmp (r11)[r10] code1: movl #44,r0 ret code2: movl #1,r0 ret .end z It do give informational error-messages during compilation and chrashes at run-time. I have also tried the following small variant: .title z .psect $PDATA quad,pic,con,lcl,shr,noexe,nowrt table: .long code1 - table .long code2 - table .psect $CODE quad,pic,con,lcl,shr,exe,nowrt .entry z,^m movl #0,r9 moval table,r10 movl (r10)[r9],r11 jmp (r11)[r10] code1: .jsb32_entry movl #44,r0 ret code2: .jsb32_entry movl #1,r0 ret .end z It also gives informational error-messages during compilation, but it runs as it is supposed to. Conclusion: you could try with the .JSB32_ENTRY directive and see, if your code (just by pure luck) will work too. Arne Arne Vajhxj local DECNET: KO::ARNE Computer Department PSI: PSI%238310013040::ARNE Business School of Southern Denmark Internet: ARNE@KO.HHS.DK