Mail Archives: djgpp/2006/01/23/09:46:15
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f
|
From: | "Cristiano" <cristiano DOT pi AT NSquipo DOT it>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Converting Intel code
|
Lines: | 35
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Newsreader: | Microsoft Outlook Express 6.00.2900.2670
|
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2900.2670
|
X-RFC2646: | Format=Flowed; Original
|
NNTP-Posting-Host: | $$_ewgnldmsdvl.x-privat.org
|
Message-ID: | <43d4e943_2@x-privat.org>
|
Organization: | X-Privat NNTP Server - http://www.x-privat.org
|
X-Authenticated-User: | $$g656buj-7nk5btgknyi-m
|
X-Complaints-To: | abuse AT x-privat DOT org
|
Date: | 23 Jan 2006 15:34:09 +0100
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
I need to translate this (it should read the same timer used by Win API
QueryPerformanceCount):
unsigned short val;
cli
xor al,al
out 43h,al
in al,40h
mov bl,al
in al,40h
mov bh,al
mov [val],bx
sti
return val;
into AT&T syntax (for DJGPP). I wrote this:
asm(
"cli\n\t"
"xor %al,%al\n\t"
"out %al,$0x43\n\t"
"in $0x40,%al\n\t"
"mov %al,%bl\n\t"
"in $0x40,%al\n\t"
"mov %al,%bh\n\t"
"mov %bx,$val\n\t"
"sti"
);
but I get: "Assembler messages: 20: Error: suffix or operands invalid for
`mov'".
Please, could somebody help me?
Thanks
Cristiano
- Raw text -