error C2443: operand size conflict 
Author Message
 error C2443: operand size conflict

The following code is copied directly from MSDN. But I get a compile error
on line 'move ch, 8;' said ERROR C2443: Operand Size Conflict. Anyone got
the solution? I am using VC6

Interrupt 21h Function 440Dh Minor Code 49h
Ejects the specified media.

mov ax, 440Dh     ; generic IOCTL
mov bx, DriveNum  ; see below
mov ch, 8         ; device category
mov cl, 49h       ; Eject Removable Media
int 21h

jc  error



Tue, 03 Feb 2004 11:51:17 GMT  
 error C2443: operand size conflict
Try

                mov ax, 440Dh             ; Generic IOCTL

                mov bx, 01h                          ;DriveNum

                mov ch, 08h                              ;DeviceCat

                mov cl, 49h                          ; Eject Removable
Media

                int 21h



Quote:
> The following code is copied directly from MSDN. But I get a compile
error
> on line 'move ch, 8;' said ERROR C2443: Operand Size Conflict. Anyone
got
> the solution? I am using VC6

> Interrupt 21h Function 440Dh Minor Code 49h
> Ejects the specified media.

> mov ax, 440Dh     ; generic IOCTL
> mov bx, DriveNum  ; see below
> mov ch, 8         ; device category
> mov cl, 49h       ; Eject Removable Media
> int 21h

> jc  error



Wed, 04 Feb 2004 00:29:17 GMT  
 error C2443: operand size conflict
or

            unsigned short DriveNum = 0x01;

            __asm

            {

                        mov ax, 440Dh              ; Generic IOCTL

                        mov bx, DriveNum            ;DriveNum

                        mov ch, 08h
;DeviceCat

                        mov cl, 49h                              ; Eject
Removable Media

                        int 21h

            }


Quote:
> Try

>                 mov ax, 440Dh             ; Generic IOCTL

>                 mov bx, 01h                          ;DriveNum

>                 mov ch, 08h                              ;DeviceCat

>                 mov cl, 49h                          ; Eject Removable
> Media

>                 int 21h



> > The following code is copied directly from MSDN. But I get a compile
> error
> > on line 'move ch, 8;' said ERROR C2443: Operand Size Conflict.
Anyone
> got
> > the solution? I am using VC6

> > Interrupt 21h Function 440Dh Minor Code 49h
> > Ejects the specified media.

> > mov ax, 440Dh     ; generic IOCTL
> > mov bx, DriveNum  ; see below
> > mov ch, 8         ; device category
> > mov cl, 49h       ; Eject Removable Media
> > int 21h

> > jc  error



Wed, 04 Feb 2004 00:34:11 GMT  
 error C2443: operand size conflict
No.. it doesn't work. I still get the same error.


Quote:
> or

>             unsigned short DriveNum = 0x01;

>             __asm

>             {

>                         mov ax, 440Dh              ; Generic IOCTL

>                         mov bx, DriveNum            ;DriveNum

>                         mov ch, 08h
> ;DeviceCat

>                         mov cl, 49h                              ; Eject
> Removable Media

>                         int 21h

>             }



> > Try

> >                 mov ax, 440Dh             ; Generic IOCTL

> >                 mov bx, 01h                          ;DriveNum

> >                 mov ch, 08h                              ;DeviceCat

> >                 mov cl, 49h                          ; Eject Removable
> > Media

> >                 int 21h



> > > The following code is copied directly from MSDN. But I get a compile
> > error
> > > on line 'move ch, 8;' said ERROR C2443: Operand Size Conflict.
> Anyone
> > got
> > > the solution? I am using VC6

> > > Interrupt 21h Function 440Dh Minor Code 49h
> > > Ejects the specified media.

> > > mov ax, 440Dh     ; generic IOCTL
> > > mov bx, DriveNum  ; see below
> > > mov ch, 8         ; device category
> > > mov cl, 49h       ; Eject Removable Media
> > > int 21h

> > > jc  error



Wed, 04 Feb 2004 14:56:27 GMT  
 error C2443: operand size conflict
I tried compiling your code and also got the operand size conflict
error.  The problem is not, I think, with the mov ch, 8 but with the
line before.  When I changed DriveNum to unsigned short (2 bytes), or
used a value (01h) the code compiles.



Quote:
> No.. it doesn't work. I still get the same error.



> > or

> >             unsigned short DriveNum = 0x01;

> >             __asm

> >             {

> >                         mov ax, 440Dh              ; Generic IOCTL

> >                         mov bx, DriveNum            ;DriveNum

> >                         mov ch, 08h
> > ;DeviceCat

> >                         mov cl, 49h                              ;
Eject
> > Removable Media

> >                         int 21h

> >             }



> > > Try

> > >                 mov ax, 440Dh             ; Generic IOCTL

> > >                 mov bx, 01h                          ;DriveNum

> > >                 mov ch, 08h
;DeviceCat

> > >                 mov cl, 49h                          ; Eject
Removable
> > > Media

> > >                 int 21h



> > > > The following code is copied directly from MSDN. But I get a
compile
> > > error
> > > > on line 'move ch, 8;' said ERROR C2443: Operand Size Conflict.
> > Anyone
> > > got
> > > > the solution? I am using VC6

> > > > Interrupt 21h Function 440Dh Minor Code 49h
> > > > Ejects the specified media.

> > > > mov ax, 440Dh     ; generic IOCTL
> > > > mov bx, DriveNum  ; see below
> > > > mov ch, 8         ; device category
> > > > mov cl, 49h       ; Eject Removable Media
> > > > int 21h

> > > > jc  error



Wed, 04 Feb 2004 23:29:30 GMT  
 error C2443: operand size conflict
Yes, VC6 is off by one with all line number reports for inline code


Quote:
> I tried compiling your code and also got the operand size conflict
> error.  The problem is not, I think, with the mov ch, 8 but with the
> line before.  When I changed DriveNum to unsigned short (2 bytes), or
> used a value (01h) the code compiles.



> > No.. it doesn't work. I still get the same error.



> > > or

> > >             unsigned short DriveNum = 0x01;

> > >             __asm

> > >             {

> > >                         mov ax, 440Dh              ; Generic IOCTL

> > >                         mov bx, DriveNum            ;DriveNum

> > >                         mov ch, 08h
> > > ;DeviceCat

> > >                         mov cl, 49h                              ;
> Eject
> > > Removable Media

> > >                         int 21h

> > >             }



> > > > Try

> > > >                 mov ax, 440Dh             ; Generic IOCTL

> > > >                 mov bx, 01h                          ;DriveNum

> > > >                 mov ch, 08h
> ;DeviceCat

> > > >                 mov cl, 49h                          ; Eject
> Removable
> > > > Media

> > > >                 int 21h



> > > > > The following code is copied directly from MSDN. But I get a
> compile
> > > > error
> > > > > on line 'move ch, 8;' said ERROR C2443: Operand Size Conflict.
> > > Anyone
> > > > got
> > > > > the solution? I am using VC6

> > > > > Interrupt 21h Function 440Dh Minor Code 49h
> > > > > Ejects the specified media.

> > > > > mov ax, 440Dh     ; generic IOCTL
> > > > > mov bx, DriveNum  ; see below
> > > > > mov ch, 8         ; device category
> > > > > mov cl, 49h       ; Eject Removable Media
> > > > > int 21h

> > > > > jc  error



Thu, 05 Feb 2004 19:41:21 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. error C2443:optrand size conflict

2. _asm operand size conflict

3. illegal size for operand

4. Inline C Operand Type Error

5. error [130] incompatible operands when using constants

6. Sorting Array Error - left operand must be L-value

7. operands of : have incompatible types error

8. operands of : have incompatible types error message

9. avoiding type-conflicting error

10. itoa function caused "conflicting types" error

11. HELP-Conflicting types and casting float to NULL errors on GCC 2.7.0 Linux

12. !!! ODBC/DAO/Error 3197/Write Conflict/ANSI_NULL/TimeStamp !!!

 

 
Powered by phpBB® Forum Software