求大神C语言转汇编语言用stack
诚不敢 2020-07-05 09:12:50 C程序翻译成一个8086汇编语言程序。 使用stack将变量从主程序传递给子程序,并使用AL将结果从过程返回给主程序。
#include
char max (char *s)
{ char c;
int i;
if ( s=='\n' ) return '\n';
c=*s;
while ( *(s+1)!='\n') {
if (c<(s+1) ) c=*(s+1);
s++;
}
return c;
}
void main()
{
char buffer[100], m;
int i=0;
printf("Please enter a character string: ");
do {
buffer[i] = getchar();
} while (buffer[i++] != '\n');
m=max(buffer);
printf("\nthe maxium charater is : %c", m);
}