Programming Forums
User Name Password Register
 

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

Reply
 
Thread Tools Display Modes
Old May 17th, 2005, 11:26 AM   #1
LindaW567
Newbie
 
Join Date: Feb 2005
Location: Near London, England
Posts: 5
Rep Power: 0 LindaW567 is on a distinguished road
Problem with variable in inline assembler

I am calling this routine in a shared library (DLL) of mine which contains inline assembler.

This compiles and links ok.

When I build a program which calls this routine, when linking I get:

./libxis.so: undefined reference to `pSource'

this is talking about the variable in the second line of the assembler code as if it cannot see it in the function declaration.
I get this line for all of the passed variables.

Any ideas

Linda

[code]
void asmOffsetCorrection (WORD *pData, WORD *pDest, WORD *pOffsetCorrImage1, int nCount)
{
asm(".intel_syntax noprefix\n"
" mov esi, pData\n"
" mov edi, pOffsetCorrImage1\n"
" mov ecx, nCount\n"
" mov edx, pDest\n"
" Start1:\n"
" mov eax, 0\n"
" mov ax,[esi]\n" // Grauwert nach ax
" cmp ax,0xFFFA\n"
" ja SetWhite1\n" // 28.08.00 Ar
" mov bx,[edi]\n" // Offset nach
" sub ax,bx\n" // hieren
" jc SetBlack1\n" //
" mov [edx], ax\n" // Nein :
" jmp SetCount1\n"
" SetWhite1:\n"
" mov word ptr [edx], 0xFFFF\n" //
" jmp SetCount1\n" // 28.8.00 Ar
" SetBlack1:\n" // Ja: auf schwarz setzen
" mov word ptr [edx], 0x0\n"
" SetCount1:\n"
" inc esi\n" // Zeiger und
" inc esi\n" // n
" inc di\n"
" inc edi\n"
" inc edx\n"
" inc edx\n"
" dec x\n"
" cmp ecx,0"
" jg \n"
" mov eax,0");

}

[code]
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 5:23 AM.

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