Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

AIUTO codice assembler utilizzando turbo c

3 views
Skip to first unread message

JG

unread,
Jun 11, 2006, 5:59:20 PM6/11/06
to
Ciao ragazzi, vi chiedevo come è possibile inserire del codice assmbler
utilizzando turbo c della borland a 16 bit ( scopo puramente didattico ).
esempio

#include <stdio.h>
main()
{
int a=10;
int b;
asm {
mov ax,a
mov b,ax
}
printf (b);
}
alla fine mi dà questo errore ... in-line assembly not allowed in function
main.
Mi sapete aiutare ?
Oppure vi chiedo è possivbile scrivere codice asm puro con turbo c per forza
ci vuole turbo assembler... grazie mille a tutti


cod

unread,
Jun 17, 2006, 3:50:35 AM6/17/06
to
On Sun, 11 Jun 2006 23:59:20 +0200, "JG" <jur...@iol.it> wrote:

>alla fine mi dà questo errore ... in-line assembly not allowed in function
>main.
>Mi sapete aiutare ?
>Oppure vi chiedo è possivbile scrivere codice asm puro con turbo c per forza
>ci vuole turbo assembler... grazie mille a tutti

ti sta semplicemente dicendo che non puoi scrivere nel main codice
assembly.. sposta il tuo codice in un'altra funzione.

cod

0 new messages