Dead Hackers Society
Other BBSes »
 
 
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
 
Re: PC addressing mode
Posted by: ggn Apr,15.2013-22:35 

bxx instructions are PC-relative by definition (if you take a look at the generated opcodes it'll be clear).

Anyway, a cheap-but-not-so-elegant solution for the other two instructions is:

lea clip_RRR_05(pc),a6
move.w d0,(a6)
subq.w #1,(a6)

yep, wastes a register but at least it works :).




(another nastier solution would be to do the relocation yourself after copying the code someplace else, but that depends on how small you want to make your code or how many cycles you want to save).







[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
PC addressing mode Sallafranque/Thadoss Apr,15.2013-21:42
  Re: PC addressing mode ggn Apr,15.2013-22:35
    Re: PC addressing mode Sallafranque/Thadoss Apr,15.2013-22:46
      Re: PC addressing mode ggn Apr,15.2013-23:10
        Re: PC addressing mode Sallafranque/Thadoss Apr,15.2013-23:36
    Re: PC addressing mode Sallafranque/Thadoss Apr,15.2013-23:07
  Re: PC addressing mode mikro Apr,16.2013-02:47
  Re: PC addressing mode Defjam Apr,17.2013-17:43
    Re: PC addressing mode Sallafranque/Thadoss Apr,19.2013-00:21
      Re: PC addressing mode Mr. Styckx Apr,19.2013-14:27
        Re: PC addressing mode Defjam Apr,19.2013-18:35
          Re: PC addressing mode dml May,29.2013-00:25
            Re: PC addressing mode evil May,29.2013-14:54
              Re: PC addressing mode Cyprian Jun,01.2013-16:17
                Re: PC addressing mode evil Jun,01.2013-20:00


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

What's the anti-troll code?
That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson