Asembler w VS c++
Chciałem programować port ltp w VC c++, ale miałem z tym problemy. Znalazłem stronę:
http://www.elportal.pl/index.php?module=ContentExpress&func=display&ceid=150
i mam problem z kompilacją w VS c++.
Oto błędy:
> c:\...\Form1.h(85) : see declaration of 'cc::Form1::button1_Click'
> c:\...\Form1.h(85) : error C3862: 'cc::Form1::button1_Click': cannot compile an unmanaged function with /clr:pure or /clr:safe
> The function uses inline assembler or an unsupported intrinsic function
> c:\...\ : error C3821: 'void cc::Form1::button1_Click(System::Object ^,System::EventArgs ^)': managed type or function cannot be used in an unmanaged function
presence of '__asm' or '_setjmp' makes a function unmanaged
kod:
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
__asm{
mov dx, 0x378
mov al, 0
out dx, al
}
}
};