delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/02/13:28:55

Message-Id: <m0yKog7-000S3MC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: 0513793479-0001 AT t-online DOT de (Juergen Gloeckner), djgpp AT delorie DOT com
Date: Thu, 2 Apr 1998 15:29:17 +0000
MIME-Version: 1.0
Subject: Re: Lables in an assembler statement inside an inline function
In-reply-to: <6fu4di$sb9$1@news02.btx.dtag.de>

0513793479-0001 AT t-online DOT de (Juergen Gloeckner) wrote:

> I've written (in 68000 asm) something like
> 
> extern inline int foo()
> {
>   asm("\
> ...
> lab:\
> ...
>   dbne %d0,lab");
> }
> 
> but when I use the function more than once in a module, the lable is
> also used more than once.
> It's also impossible to use something like
> 
> dbne %d0,%pc@(-6)
> 
> What can I do?

Use relative labels:

0:
  ....
  jmp 0b
  jmp 1f

1: 

SET
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019