| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| 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 |
| Subject: | RE: Assembler |
| Date: | Tue, 17 Feb 2004 15:12:05 -0500 |
| Message-ID: | <AE2AA130827456459AA497E8C9D6EA00412C02@pauex2ku02.agere.com> |
| X-MS-Has-Attach: | |
| X-MS-TNEF-Correlator: | |
| From: | "Williams, Gerald S (Jerry)" <gsw AT agere DOT com> |
| To: | <cygwin AT cygwin DOT com> |
| X-OriginalArrivalTime: | 17 Feb 2004 20:12:05.0263 (UTC) FILETIME=[4FFEB9F0:01C3F592] |
| X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id i1HKCJ4q011569 |
Krzysztof Duleba wrote:
> What about Linux syscalls? Will Cygwin emulation layer match
> it?
I just Googled "int 0x80". So THAT'S what you're
trying to do. :-)
No, I think your experiment shows that Cygwin is
not emulating Linux syscalls at that level. Nor
would I have expected it to.
On the other hand, you can get at DOS functions,
at least if you build your executable correctly.
For example, the following:
; hello.asm
[ORG 0x100]
section .text
global _start
_start: mov ah,9
mov dx, hello
int 0x21
mov ax,0x4c00
int 0x21
section .data
hello db 'Hello, World', 13, 10, '$'
can be converted into a .COM file and run via:
nasm -o hello.com hello.asm
chmod +x hello.com # to avoid "Permission denied"
./hello.com
> Is there a way I could force Cygwin's ld to work the way
> Linux ld used to?
I don't know about that, but you can specify the
entry point explicitly:
ld -e _start hello.o
-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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |