Помогите, кто знает как с этим работать
Проходим в универе встроенные в с++ ассемблер, накидал простейшую программку(ввод строки символов с клавиатуры и её же вывод на экран)
Собственно код:
#include <iostream>
using namespace std;
int main()
{
_asm
{
.data
string db 3, ?, 4 dup(?)
.code
Programm:
mov ax, @data
mov ds, ax
lea dx, string
mov ah, 10
int 21h
lea dx, string+2
mov string+5, '$'
mov ah, 4ch
int 21h
end Programm
}
system("pause");
}
Компилится не хочет, пишет:
source.cpp(7): error C2400: inline assembler syntax error in 'opcode'; found 'data'
source.cpp(8): error C2400: inline assembler syntax error in 'opcode'; found 'db'
source.cpp(9): error C2400: inline assembler syntax error in 'opcode'; found 'code'
source.cpp(11): error C2018: unknown character '0x40'
source.cpp(11): error C2443: operand size conflict
source.cpp(20): error C2400: inline assembler syntax error in 'opcode'; found 'Programm' |