Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 8th, 2005, 3:23 AM   #1
LindaW567
Newbie
 
Join Date: Feb 2005
Location: Near London, England
Posts: 5
Rep Power: 0 LindaW567 is on a distinguished road
Intel assembly in Linux

Hello
I have 2 new questions.
I am assembing with gcc in Linux.


With this code I get 2 errors.

void asm128Sort( short *pSource, short *pDest, UINT Rows, UINT Cols, UINT nPxlPitch)
{
int nOffset = Cols * 4 +4;

asm(".intel_syntax noprefix\n"
" mov esi, pSource\n"
" add edi, nOffset\n"
" mov ecx, Cols\n"
" dec ecx \n"
....
" dec nRows\n"
....);
}

Error 1
asmsort.c:67: warning: unused variable `nOffset'
It seems I have to declare it as a global outside of my function. Is that right? Any way I can declare it within my function.

Error 2
asmsort.s:71: Error: no instruction mnemonic suffix given and no register operands; can't size instruction

The line dec nRows causes the problem. It does not seem to know that nRows is declared as a UINT.
This code compiles ok in Visual C

Please help I am stuck.

Linda
LindaW567 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:50 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC