# include #include extern "C"{void far stampa(char far stringa[]);} main () { char stringa[11]; clrscr(); cout<<"inserisci la stringa(max10 caratteri)\n"; cin>>stringa; cout<<"ok\n"; stampa( stringa); return 0; } ;da linkare con passastr.cpp sseg segment para stack 'stack' top dW 10 dup('M') sseg ends dseg segment public buf db 10 dup('?'),'$' dseg ends cseg segment public assume cs:cseg assume ds:dseg public _stampa _stampa proc far push ax push bx push cx push dx push di push si push ds push es push bp mov ax,dseg mov ds,ax assume ds: dseg mov bp,sp mov bx,word ptr[bp+22] mov si,bx;carico l'offset di stringa mov ax,word ptr [bp+24] mov es,ax;carico il segment di stringa lea ax, buf mov di,ax mov cx,10 ciclo: mov dl,byte ptr es:[si] mov byte ptr [di],dl mov byte ptr [di],'*' inc di inc si loop ciclo lea dx,buf mov ah,9 int 21h pop bp pop es pop ds pop si pop di pop dx pop cx pop bx pop ax ret _stampa endp cseg ends end