DATASEGMENTMSGDB'PLEASECHOOSEFUNCTIONS:',0DH,0AHDB'1:SENDLETTERS',0DH,0AHDB'2:RECEIVELETTERS',0DH,0AHDB'3:SENDFILES',0DH,0AHDB'4:RECEIVEFILES',0DH,0AH,'$'ERRDB'INPUTERROR!',0DH,0AH,'$'FILESDB'E:\SENT.TXT',00HFILERDB'E:\RECEIVED.TXT',00HSAVEDW0NUMDW0CACHEDB100DUP(0)BUFFERDB?DATAENDSCODESEGMENTASSUMECS:CODE,DS:DATAMAINPROCMOVAX,DATAMOVDS,AXCHOOSE:LEADX,MSG;Ñ¡Ôñ¹¦ÄÜMOVAH,09HINT21HMOVAH,01H;ɨÃè¼üÅÌÈ·¶¨Ñ¡Ôñ¹¦ÄÜINT21HCMPAL,31H;ÅжÏÊÇ·ñΪ¹¦ÄÜ1JBERRORJZFUNC1CMPAL,32H;ÅжÏÊÇ·ñΪ¹¦ÄÜ2JZFUNC2CMPAL,33H;ÅжÏÊÇ·ñΪ¹¦ÄÜ3JZFUNC3CMPAL,34H;ÅжÏÊÇ·ñΪ¹¦ÄÜ4JZFUNC4JAERROR;ÊäÈë´íÎóFUNC1:CALLSLTRJMPCHOOSEFUNC2:CALLRLTRJMPCHOOSEFUNC3:CALLSFLJMPCHOOSEFUNC4:CALLRFLJMPCHOOSEERROR:LEADX,ERRMOVAH,09HINT21HJMPCHOOSEMOVAH,4CHINT21HMAINENDPSLTRPROC;³õʼ»¯8250MOVDX,3FBHMOVAL,80HOUTDX,ALMOVDX,3F8HMOVAL,60HOUTDX,ALMOVDX,3F9HMOVAL,00HOUTDX,ALMOVDX,3FBHMOVAL,00011010BOUTDX,ALBEGIN1:MOVDX,3FDH;¶Á״̬×Ö£¬²âÊÔTxE룬ÈôΪ0Ôò¼ÌÐø¶Áȡ״̬×Ö²¢²âÊÔINAL,DXTESTAL,00100000BJZBEGIN1MOVAH,01HINT21HMOVDI,OFFSETBUFFER;½«Ð޸ĺóµÄ×Ö·ûËÍÈ뻺³åÇøMOV[DI],ALMOVDX,3F8H;ͨ¹ý8251Êý¾Ý¶Ë¿Ú·¢ËÍ×Ö·ûMOVAL,BUFFEROUTDX,ALJMPBEGIN1;·¢ËÍÏÂÒ»×Ö·ûRETSLTRENDPRLTRPROC;³õʼ»¯8250MOVDX,3FBHMOVAL,80HOUTDX,ALMOVDX,3F8HMOVAL,60HOUTDX,ALMOVDX,3F9HMOVAL,00HOUTDX,ALMOVDX,3FBHMOVAL,00011010BOUTDX,ALBEGIN2:MOVDX,3FDH;¶Á״̬×Ö£¬²âÊÔTxE룬ÈôΪ0Ôò¼ÌÐø¶Áȡ״̬×Ö²¢²âÊÔINAL,DXTESTAL,00000001BJZBEGIN2MOVDX,3F8H;´Ó8251Êý¾Ý¶Ë¿Ú½ÓÊÕÊý¾ÝINAL,DXMOVDL,AL;½«×Ö·ûÏÔʾÔÚÆÁÄ»MOVAH,02HINT21HJMPBEGIN2;½ÓÊÕÏÂÒ»×Ö·ûRETRLTRENDPSFLPROC;³õʼ»¯8250MOVDX,3FBHMOVAL,80HOUTDX,ALMOVDX,3F8HMOVAL,60HOUTDX,ALMOVDX,3F9HMOVAL,00HOUTDX,ALMOVDX,3FBHMOVAL,00011010BOUTDX,ALMOVAH,3DH;´ò¿ªÒª´«ÊäµÄÎļþMOVAL,0LEADX,FILESINT21HMOVSAVE,AXMOVAH,3FH;½«Îļþ¶ÁÈ뻺³åÇøÖÐMOVBX,SAVELEADX,CACHEMOVCX,50INT21HMOVNUM,AXMOVAH,3EH;¹Ø±ÕÎļþMOVBX,SAVEINT21HMOVDI,OFFSETCACHE;·¢ËÍÊý¾ÝµØÖ·ËÍDIMOVCX,50;·¢ËÍÊý¾Ý×Ö½ÚÊýBEGIN3:MOVDX,3FDH;¶Á״̬×Ö£¬²âÊÔTxE룬ÈôΪ0Ôò¼ÌÐø¶Áȡ״̬×Ö²¢²âÊÔINAL,DXTESTAL,20HJZBEGIN3MOVDX,3F8H;·¢ËÍÊý¾ÝMOVAL,[DI]PUSHDXMOVDL,ALMOVAH,02HINT21HPOPDXOUTDX,ALINCDI;Ð޸ĵØÖ·Ö¸ÕëLOOPBEGIN3;¼ÌÐø·¢ËÍRETSFLENDPRFLPROC;³õʼ»¯8250MOVDX,3FBHMOVAL,80HOUTDX,ALMOVDX,3F8HMOVAL,60HOUTDX,ALMOVDX,3F9HMOVAL,00HOUTDX,ALMOVDX,3FBHMOVAL,00011010BOUTDX,ALMOVDI,OFFSETCACHE;½ÓÊÕµ½Êý¾Ý´æÈ뻺³åÇøMOVCX,80H;½ÓÊÕÊý¾Ý×Ö½ÚÊýBEGIN4:MOVDX,3FDH;¶Á״̬×Ö£¬²âÊÔRxRDY룬ÈôΪ0Ôò¼ÌÐø¶Áȡ״̬×Ö²¢²âÊÔINAL,DXTESTAL,01HJZBEGIN4MOVDX,3F8H;´Ó8251Êý¾Ý¶Ë¿Ú½ÓÊÕÊý¾ÝINAL,DXMOV[DI],AL;½ÓÊÕµ½µÄÊý¾Ý´æÈëCACHEMOVDL,ALMOVAH,02HINT21HINCDI;Ð޸ĵØÖ·Ö¸ÕëLOOPBEGIN4;¼ÌÐø½ÓÊÕMOVAH,3CH;н¨ÎļþMOVCX,00HLEADX,FILERINT21HMOVSAVE,AXMOVAH,40H;½«»º³åÇøÄÚÈÝдÈëÎļþMOVBX,SAVEMOVCX,80HLEADX,CACHEINT21HMOVAH,3EH;¹Ø±ÕÎļþMOVBX,SAVEINT21HRETRFLENDPCODEENDSENDMAIN