汇编第二次实验计网112班田凯飞1107300215一、实验题目编写一个子程序嵌套结构的程序模块,分别从键盘输入姓名以及8个字符的电话号码,并以一定的格式显示出来。主程序TELIST:(1)显示提示符INPUT_NAME:;(2)调用子程序INPUT_NAME输入姓名;(3)显示提示符INPUTATELPHONENUMBER:;(4)调用子程序INPHONE输入电话号码;(5)调用子程序PRINTLINE显示姓名及电话号码。子程序INPUT_NAME:(1)调用键盘输入子程序GETCHAR,把输入的姓名存放在INBUF缓冲区内;(2)把INBUF中的姓名移入输出行OUTPHONE。子程序INPHONE:(1)调用键盘输入子程序GETCHAR,把输入的8位电话号码存放在INBUF缓冲区中;(2)把INBUF中的号码移入输入行OUTPHONE。子程序PRINTLINE:显示姓名及电话号码,格式为:NAMETELXXXXXX二、实验代码datasegmentinbufdb12dup('')outnamedb16dup('')outphonedb12dup(''),13,10,'$'hint1db'InputName:','$'hint2db'InputaTelephoneNumber:','$'hint3db'Name:',12dup(''),'Tel:',13,10,'$'crlfdb13,10,'$'dataendsstacksegmentdw100dup(?)toslabelwordstackendspromptmacromessagemovah,9leadx,messageint21hendmcodesegmenttelistprocfarassumecs:code,ds:data;,es:data,ss:stackstart:movax,stackmovss,axmovsp,offsettospushdssubax,axpushaxmovax,datamovds,axmoves,axprompthint1;提示输入姓名callinput_name;输入姓名prompthint2;提示输入电话号码callinphone;输入电话号码callprintline;输出姓名及电话号码rettelistendpinput_nameprocnearcallgetcharleasi,inbufleadi,outnamemovcx,12cldrepmovsbretinput_nameendpinphoneprocnearcallgetcharleasi,inbufleadi,outphonemovcx,12cldrepmovsbretinphoneendpgetcharprocnearmoval,20hmovcx,12leadi,inbufcldrepstosbmovcx,12movdi,0input:movah,1int21hcmpal,0dhjzquitmovinbuf[di],alincdiloopinputquit:promptcrlfretgetcharendpprintlineprocnearprompthint3promptoutnameretprintlineendpcodeendsendstart三、实验截图