Buggy inline assembler

Heinz malagana15 at yahoo.es
Tue Aug 22 19:31:42 PDT 2006


"The problem has nothing to do with the inline assembler. You can use
OBJ2ASM to verify that the correct instructions are generated. The
problem is that executing IN and OUT instructions under Win32 will
generated an operating system exception."...Walter.

Thanks Walter for your answer, you're almost right, executing IN and OUT in Win32
throws exceptions BUT why if i insert this code into TASM it works perfect?

.model small
.stack
.data
string1 db"hello world$"

.code

start:
mov al, 182;
out 43h, al;

mov AX, 4560;
out 42h, AL;
mov AL, AH;
out 42h, AL;

in AL, 61h;
or AL, 3h;
out 61h, AL;

in AL, 61h;
and AL, 252;
out 42h, AL;

end start

This code does not do anything, it's just for testing in/out to ports.

Heinz



More information about the Digitalmars-d-bugs mailing list