Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Subject: RE: Assembler Date: Tue, 17 Feb 2004 11:41:29 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Williams, Gerald S (Jerry)" To: X-OriginalArrivalTime: 17 Feb 2004 16:41:29.0334 (UTC) FILETIME=[E464F960:01C3F574] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id i1HGfs43013909 Krzysztof Duleba wrote: > I wanted to test some of my linux assembler code on my > Windows-Cygwin box. > Is it possible at all? I don't know about using BIOS calls, etc., but I've assembled and linked a few NASM assembly functions. I didn't use ELF format, though. There's a gnuwin32 format that works with Cygwin. I've only ever linked them as functions called via the C environment, but if you take the following: ; standalone.asm section .text extern _printf global _main _main: push ebp mov ebp,esp push dword [value] push dword format call _printf add esp, byte 8 leave ret segment .data value dd 0x87654321 format db 'Should be 87654321: %0lx',10,0 and assemble, link, and run it as follows: nasm -f gnuwin32 standalone.asm gcc standalone.o ./a.exe It does the right thing. :-) -Jerry -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/