Buggy inline assembler
Unknown W. Brackets
unknown at simplemachines.org
Wed Aug 23 00:33:29 PDT 2006
What version of TASM are you using? Is it producing an old DOS
executable or a Win32 one?
-[Unknown]
> "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