| delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
| From: | "Carey Evans" <carey DOT evans AT gmail DOT com> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: inline asm |
| Date: | 4 Jul 2005 15:29:25 -0700 |
| Organization: | http://groups.google.com |
| Lines: | 25 |
| Message-ID: | <1120516165.036560.290770@g47g2000cwa.googlegroups.com> |
| References: | <1d4 DOT 3f363c83 DOT 2ffa5b7e AT aol DOT com> |
| NNTP-Posting-Host: | 210.54.0.162 |
| Mime-Version: | 1.0 |
| X-Trace: | posting.google.com 1120516170 4366 127.0.0.1 (4 Jul 2005 22:29:30 GMT) |
| X-Complaints-To: | groups-abuse AT google DOT com |
| NNTP-Posting-Date: | Mon, 4 Jul 2005 22:29:30 +0000 (UTC) |
| In-Reply-To: | <1d4.3f363c83.2ffa5b7e@aol.com> |
| User-Agent: | G2/0.2 |
| Complaints-To: | groups-abuse AT google DOT com |
| Injection-Info: | g47g2000cwa.googlegroups.com; posting-host=210.54.0.162; |
| posting-account=a2Dz9g0AAAAQI7DN4N6e935Thq5XWCRh | |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
| Errors-To: | nobody AT delorie DOT com |
| X-Mailing-List: | djgpp AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
Sterten AT aol DOT com wrote:
> is there some utility, whicht converts the ATT-programs
> to NASM and vice versa ?
I haven't heard of one. However, you can compile NASM source to COFF
format and link it with GCC to create a DJGPP executable:
C:\src>nasm -fcoff bsf.asm
C:\src>gcc -O -oprogram.exe main.c bsf.o
You just need to include the correct section and global directives in
the source, as described in the NASM manual, something like this:
section .text
global _bsf
_bsf: bsf eax,[esp+4]
jz bsfz
inc eax
ret
bsfz: xor eax,eax
ret
--
Carey Evans
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |