use a register for destination
mov ax,0
mov di,03c8H
mov word ptr [di],ax
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
So sorry -- I was thinking of mov not out.
Are you writing inline code in a C program? I see you are using 0x3c8, which is C styly way or writing a hexidecimal number, instead of 03c8H, which is assembly way of writing it.
What C compiler are you using? out istruction is not valid with any 32-bit compiler but ok with 16-bit compilers such as Turbo C.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
The out instruction outputs just one byte -- such as al. In the code you originally posted change out ax to out al
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343