خرید بک لینک

how to draw line with assembly language in c language in both terminal and xwindow?

Code:

martin@ubuntu:~/Downloads$ gcc -o main main.c
main.c: Assembler messages:
main.c:4: Error: too many memory references for `mov'
main.c:5: Error: too many memory references for `mov'
main.c:6: Error: junk `h' after expression
main.c:6: Error: operand size mismatch for `int'
main.c:7: Error: too many memory references for `mov'
main.c:8: Error: too many memory references for `mov'
main.c:9: Error: too many memory references for `mov'
main.c:11: Error: invalid char '[' begiing operand 1 `[bx]'
main.c:12: Error: no instruction mnemonic suffix given and no register operands; can't size instruction
main.c:13: Error: too many memory references for `cmp'

Code:

#include<stdio.h>
 
void main() {
__asm("mov ah,00h");
__asm("mov al,13h");
__asm("int 10h");
__asm("mov ds,40960");
__asm("mov ax, 44h");
__asm("mov bx,0000");
__asm("START:");
__asm("mov [bx],ax");
__asm("inc bx");
__asm("cmp bx,20");
__asm("JL START");
}

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 17 خرداد 1395 ساعت: 15:37

صفحه بندی