Xref: news2.mv.net comp.os.msdos.djgpp:7639 Newsgroups: comp.os.msdos.djgpp From: hk AT bercos DOT de (Helge Kruse) Subject: Re: inline assembler question Sender: usenet AT bercos DOT de Organization: Bercos GmbH Message-ID: References: Date: Mon, 19 Aug 1996 15:25:54 GMT Lines: 35 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Orco wrote: >Just wondering how I would go about creating a self modifying label name >in DJGPP.. for example in MASM I could create a MACRO :- > > xxx MACRO x, y, z > LOCAL label1 > > ...... > label1: > ENDM > >How would I go about doing the same thing in DJGPP?? #define xxx(x,y,z) \ 1: That's all, but if you want to use the local label, you should reference it with a trailing f or b: #define xxx(x,y,z) \ mov x,%eax \ or %eax,%eax \ mov y,%eax \ jz 1f \ mov z,%eax \ 1: But beware of long macros! I found that gas cuts very long lines without a warning. Helge