VC++ inline assembler error

Status
Not open for further replies.

anotherbrick

Full Member level 4
Joined
Jan 10, 2009
Messages
222
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
Istanbul , Turkey
Activity points
3,190
I am trying to compile this code with VC++6.0

Code:
__asm{
        mov   bl,9
        mov     ax,0204h
        int     31h
        mov     dword ptr [oldint09+0],edx
        mov     word ptr [oldint09+4],cx
        mov   ecx,cs
        mov     edx,offset int09
        mov     ax,0205h
        int     31h  }
but it gives error at this line
-----------------
mov ecx,cs error C2443: operand size conflict
-----------------
isnt the ECX and CS all 32 bit in pentium ?

why it gives error ?
 

As far as I know, CS is a 16-bit register, but used together with IP to point to a 32-bit address space (CS:IP is 32-bit).

Arthur
 

hello , thank you for your answer

what I am trying to do is
to capture an hardware interrupt
in protected mode

especially I must do this in VC++6.0 win32 console application with help of inline assembler - after I do this I will run the application in protected mode dos
anybody can give an example how to do this ?
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…