¦b³oÓªþ¿ýùØ¡A¤p¤ì°¸·Q¤¶²Ð¤@Ó¤p¤p¤u¨ãµ{¦¡¡A¯Â¤å¦r±Æª©µ{¦¡ ( ³o¬O¤p¤ì°¸¨úªº¦W¦r¡A¥i¯à¤£¤Ó¶K¤Á¡A¦ý§Ú¤~²¨¾Ç²L¡A¥HµLªk¦b·Q¥X§ó¦nªº¦WºÙ¤F )¡A¬ÝÓ¼ÐÃD¡A¥i¯à«Ü¤£®e©ö¤F¸Ñ¤p¤ì°¸¦b³oÓªþ¿ýùب쩳·Q¼g¤°»ò¼Ëªºµ{¦¡¡C©Ò¥H©³¤U¤p¤ì°¸¥ý¤jP»¡¤@»¡³oÓµ{¦¡ªº¨ÓÀs¥h¯ß¡C
¦b¦¥ýªº DOS ®É¥NùØ¡A¤j³¡¤Àªº¤å®Ñ³B²zµ{¦¡³B²z¯Â¤å¦rÀɮɡA³£¬OÂǥѨϥΪ̫ö¤U¡yEnter¡zÁä®Éªí¥Ü´«¦æ¡AµS¦p¥´¦r¾÷¤@¯ë¡C¨C¤@¦æ¦rªº§ÀºÝ³£¦³´«¦æ²Å¸¹ªí¥Ü´«¦æ¡A¦¹´«¦æ²Å¸¹¬O¥H¨âÓ¦r¤¸ªí¥Ü¡A¤@¯ë¦Ó¨¥¡A²Ä¤@Ó¦r¤¸¬O ASCII ¦r¤¸ªº 0DH¡A¥¦ªí¥ÜÂk¦ì ( carriage return ) ªº·N«ä¡A§Y´å¼Ð¦^¨ì¦¹¦æªº³Ì¥ªÃä¡C²Ä¤GÓ¦r¤¸¬O 0AH¡A¥¦ªí¥Ü line feed ªº·N«ä¡A¤]´N¬O¨ì¤U¤@¦æ ( °²¦p¦³¤U¤@¦æªº¸Ü ) ©Î¼W¥[¤@¦æ ( °²¦p¨S¦³¤U¤@¦æ¡A¤]´N¬O¦¹¦æ¬O³Ì«á¤@¦æªº¸Ü ) ªº·N«ä¡C¥H Internet Explorer 6 Service Pack 1 ªº readme.txt ÀÉ ( ¦b "C:\Program Files\Internet Explorer\readme.txt" ) ¬°¨Ò¡A·í§A¥Î°O¨Æ¥»¶}±Ò®É¡AµL½×¦p¦ó½Õ¾ã¡A¨C¤@¦æªº¼e«×³£¬O©T©wªº¡A©Ò¥H¥kÃä·|¦³¤@³¡¥÷ªÅ¥Õ¡C¦p¤U¹Ï¡J
C:\Program Files\Internet Explorer>debug readme.txt [Enter] -d 100 [Enter] 1670:0100 20 20 20 20 20 20 20 20-20 20 20 20 20 2D 2D 2D --- 1670:0110 2D 2D 2D 2D 2D 2D 2D 2D-2D 2D 2D 2D 2D 2D 2D 2D ---------------- 1670:0120 2D 2D 2D 2D 2D 2D 2D 2D-2D 2D 2D 2D 2D 2D 2D 2D ---------------- 1670:0130 2D 2D 2D 2D 2D 2D 2D 2D-2D 2D 2D 0D 0A 20 20 20 -----------.. 1670:0140 20 20 20 20 20 20 20 20-20 20 4D 69 63 72 6F 73 Micros 1670:0150 6F 66 74 20 49 6E 74 65-72 6E 65 74 20 45 78 70 oft Internet Exp 1670:0160 6C 6F 72 65 72 20 36 20-53 65 72 76 69 63 65 20 lorer 6 Service 1670:0170 50 61 63 6B 20 31 20 A4-CE 0D 0A 20 20 20 20 20 Pack 1 .... -d [Enter] 1670:0180 20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20 1670:0190 20 20 20 20 20 4F 75 74-6C 6F 6F 6B 28 54 4D 29 Outlook(TM) 1670:01A0 20 45 78 70 72 65 73 73-0D 0A 20 20 20 20 20 20 Express.. 1670:01B0 20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20 1670:01C0 20 20 20 20 20 20 20 20-20 C5 AA A7 DA C0 C9 AE ....... 1670:01D0 D7 0D 0A 20 20 20 20 20-20 20 20 20 20 20 20 20 ... 1670:01E0 20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20 1670:01F0 32 30 30 32 20 A6 7E 20-38 20 A4 EB 0D 0A 20 20 2002 .~ 8 ....
´N¥i¥H«Ü©úÅ㪺¬Ý¨ì¨C¤@¦æ¤§«á³£¦³ 0DH¡B0AH¡A¦]¬°¦³³o¨âÓ¦r¤¸¡A±j¢´«¦æ¡A©Ò¥H¦b Windows ¨t²Î©³¤Uªº¤å®Ñ³B²z¾¹¡A¦p WORD¡B¤p§@®a¡BWord Pro µ¥µ¥³£µLªk¶¶§Q±Æª©¡A§A¥i¥H¬Ý¨£§âµøµ¡½d³òÂX¤j«á¡A¥kÃ䤴¦³ªÅ¥Õ¡C´«¥y¸Ü»¡¡A³oÃþ¤å¦rÀɤ£¯àÂǥѧïÅÜ WORD µ¥¤å®Ñ³B²z¾¹ªºª©±©Î¯È±i¤j¤p¦Ó¦Û°Ê½Õ¾ã¨C¤@¦æªº¤å¦r¼Æ¥Ø¡C²{¦bÓ¤H¹q¸£¤Wªº§@·~¨t²Î¥D¬y¬O Windows¡A¨ä¤Wªº¤å®Ñ³B²z¾¹¥H Word ¦û¤j³¡¤À¡A§Y¨Ï¤£¥Î Word¡A¤]µLªk¶¶§Q°µ¨ì¦Û°Ê±Æª©¡A¨äì¦]´N¬O¨C¦æ«á±ªº 0DH¡B0AH §@©Ç¡C
³oÓªþ¿ýùØ¡A¤p¤ì°¸±N¹ê§@¤@Ó¤u¨ã¤pµ{¦¡¡ATXT2NOCR.ASM¡A¥¦¥i¥H§â³oºØ´«¦æ¦r¤¸°£¥h¡A³o¼Ë¦b Windows §@·~¨t²Î¤Uªº¤å®Ñ³B²z¾¹¯à¶¶§Q±Æª©¡C¦ý¬O¨Ã¤£¬O©Ò¦³ªº 0DH¡B0AH ³£n°£¥h¡A¦b¤@¯ë¯Â¤å¦rÀÉùØ¡A¨C¨âÓ¬q¸¨¤§¶¡¬O¥H¦h¹ïªº 0DH¡B0AH ªí¥Ü¬q¸¨¡A¹³³oºØªí¥Ü¬q¸¨ªº´«¦æ²Å¸¹´N¤£¥i°£¥h¡A¦Ó¬O¥H¤@¹ï 0DH¡B0AH ´«¦æ²Å¸¹¥N´À¡C
TXT2NOCR ªº¥Dn¥\¯à¬O§â¯Â¤å¦rÀɨC¤@¦æ«á±ªº´«¦æ²Å¸¹°£¥h¡A»P¤U¤@¦æ³s±µ¥H§Î¦¨¦P¤@Ó¬q¸¨¡C¦ý¬O«á¨Ó¤p¤ì°¸µo²{¦³¨Ç¯Â¤å¦rÀɨ䣬O¹³¤W± IE6 Service Pack 1 ªº readme.txt ¤@¼Ë¡A¨C¤@¦æ«á±ºò±µµÛ¤@¹ï´«¦æ²Å¸¹¦Ó¨C¤@¬q¸¨¤¤¶¡¬Û¹j¤@¦æ¡A¨Ò¦p¤p¤ì°¸¦b internet ¤W§ä¨ì¤@½g¡y¦è¹C°O²Ä 30 ¦^¡zªº 031.TXT Àɮ׬O¨C¤@¦æ¤§¶¡³£ªÅ¤@¦æ¡A¦Ó¨C¤@¬q¸¨ªº²Ä¤@¦æ¬O¥|ӪťըӤÀ¬q¡A¥¦ªº¼Ë¤l¹³³o¼Ë¡J
©Ò¥H¤p¤ì°¸¥[¤J¤@ӰѼơA¡y/N¡z¡A/N «á±±µ¤W¤@Ó 1¡ã9 ªº¼Æ¦r¡A¦¹¼Æ¦rªí¥Ün³sÄò¦h¤Ö¹ïªº´«¦æ²Å¸¹¥H¤º¡A·|³Q TXT2NOCR ³Q»{¬°¬O¦P¤@¬q¸¨¡A¥H 031.TXT ¦Ó¨¥¡AÀ³¸Ó¤U¡y/N2¡z°Ñ¼Æ¡ATXT2NOCR ´N·|§â³sÄò¨âÓ´«¦æ²Å¸¹µø¬°¦P¤@¬q¸¨¡CÅܦ¨
¦b 031.TXT ÀÉùØ¡A¨C¤@¬q¸¨¬O¥H 4 Ӫťն}©l¡A¦ý¨Ã¤£¬O©Ò¦³ªºÀɮ׳£¦p¦¹¡A©Ò¥H¤p¤ì°¸¦A¥[¤W¤@ӰѼơA¡y/S¡z¡A¦¹°Ñ¼Æ«ü©w¦h¤ÖӪťեH¤W¡A¤~³Q TXT2NOCR µø¬°¤@Ó¬q¸¨ªº¶}©l¡C/S ªº¤º©wȬO 2¡A·í¬Ù²¤¡y/S¡z®É¡A TXT2NOCR ¦Û°Ê¥H¨âÓªÅ¥Õ·í°µ¤@¬q¸¨ªº¶}©l¡C
¦ý¬O¡A¦pªGÀɮ׬O¹³³o¼Ë¡J
³Ì«á¬°¤F¼W¥[¤@¨Ç¼u©Ê¡A¤À¹j¬q¸¨ªº²Å¸¹¡A¤]¥i¥H¤£¥Î carriage return ©M line feed ³o¨âÓ¦r¤¸¡A¦Ó¥i¥H¦Û¦æ«ü©w¡A¦pªG·Q¦Û¦æ«ü©wªº¸Ü¡A¥Î¡y/P¡z°Ñ¼Æ¡A¦¹°Ñ¼Æ«á©Ò±µªº¦r¦ê³Qµø¬°¤À¹j¬q¸¨ªº¦r¦ê¡A·|¥[¦b¨C¤@Ó¬q¸¨ªº³Ì«e±¡A·íµM TXT2NOCR ¤]·|¦b³oÓ¦r¦ê«e¡A¤]´N¬O¤WÓ¬q¸¨ªº³Ì§ÀºÝ¡A¦Û°Ê¥[¤W¤@¹ï carriage return ©M line feed¡C¤p¤ì°¸¥[¤W¡y/P¡z°Ñ¼Æªºì¦]¬O¡A¥i¥H«Ü¤è«Kªº§âì¨Óªº¤å¦rÀÉÂà´«¦¨ HTML ÀÉ¡A¥un¥[¤W¡y/P<P>¡z§Y¥i¡A¬°¦ó¤£¥Î¡y/P<P>¡z´N¦n¤F©O¡Hì¨Ó¡y<¡z©M¡y>¡z¬O DOS «¾É¦r¤¸¡A¦pªG¥X²{¦b©R¥O¦C¦³¯S®í¥Î³~¡A©Ò¥H¤£ª½±µ¨Ï¥Î¡C°²¦p¬Ù²¤¡y/P¡z°Ñ¼Æªº¸Ü¡A¤º©wªº¤À¹j¬q¸¨¦r¦ê´N¬O 0dh¡B0ah¡C
n³Q TXT2NOCR ³B²zªºÀɮסA¥²¶·©ñ¦b²Ä¤@ӰѼơA¤£¶·¥H¡y/¡z¶}©l¡C³oÓn³Q³B²zªºÀɮסA¤p¤ì°¸ºÙ¬°¨Ó·½ÀÉ¡A¥¦¥i¥H¥]§tºÏºÐ¾÷¦WºÙ¡B¸ô®|¦WºÙ¡A¬Æ¦Ü¬O¸U¥Î¦r¤¸¡C¦]¬°¥i¥H¥]§t¸U¥Î¦r¤¸¡A©Ò¥H¯à¤@¦¸³B²z«Ü¦hÀɮסC
¨Ó·½Àɤ§«á¥i¥H±µ¥ØªºÀɦW¡A¥ØªºÀɬO«ü³Q³B²z¹L«áªº¸ê®Æn¦s©ñªºÀɮסA¥ØªºÀɤ]¥i¥H¬Ù²¤¡A¦pªG¬Ù²¤¥ØªºÀÉ¡ATXT2NOCR ·|¦Û°Ê¦a¦b¨Ó·½ÀɦW¤§«á¥[¤W¡y.000¡z§@¬°°ÆÀɦW¡A¥H«O¯dì©lÀÉ¡A¦¹®É¥ØªºÀÉ·|³Q©ñ¦b¥Ø«eªº¸ô®|ùØ¡C°²¦p¨Ó·½Àɧt¦³¸U¥Î¦r¤¸®É¡A¤£ºÞ¦³¨S¦³«ü©w¥ØªºÀÉ¡ATXT2NOCR ·|¦Û°Ê¦a¦b¥Ø«eªº¸ô®|¤¤¡A¬°¨CӲŦX¨Ó·½ÀɦWªºÀɮ׫إߥH¨Ó·½ÀɦP¦W¡A¦ý°ÆÀɦW¬°¡y.000¡zªº¥ØªºÀÉ¡C½è¨¥¤§¡A·í¨Ó·½ÀɦW§t¦³¸U¥Î¦r¤¸®É¡A«ü©w¥ØªºÀɬOµL®Äªº¡C
³Ì«á¾ã²z¤@¤U¡ATXT2NOCR ªº»yªk¬O¡J
TXT2NOCR ¨Ó·½ÀÉ [¥ØªºÀÉ] [/P¦r¦ê] [/S¼Æ¦r] [/I¼Æ¦r] [/N¼Æ¦r]
page ,132 ;ª©Åv©Ò¦³¡A½Ð¥ô·N´²§G¨Ï¥Î¡A¦ý¤£¥i¥X°â¹Ï§Q ;TXT2NOCR ¡Ð TeXT TO NO CaRrier character and line feed text ;¦¹µ{¦¡¬O±N¯Â¤å¦rÀɤ¤ªºÂk¦ì´«¦æ¦r¤¸®ø¥h¡A¤è«K¥i¥H¦b Windows §@·~¨t²Î¤¤ªº¤å®Ñ ;³B²z¾¹±Æª©¡C ;¥Îªk¡Jtxt2nocr ¨Ó·½ÀÉ [¥ØªºÀÉ] [/p¦r¦ê] [/n¼Æ¦r] [/i¼Æ¦r] [/s¼Æ¦r] ;¡@¨Ó·½ÀÉ:§Yªí¥Ün³B²zªºÀɮסA¥i¥Î¸U¥Î¦r¤¸¡C ;¡@¥ØªºÀÉ:¥ØªºÀɦW¡CY¬Ù²¤¡A«h©ñ¦b²{¦b¥Ø¿ý¡A¦ý³B²z«áªº°ÆÀɦW¬° .000 «O¦sìÀɮסC ;¡@¡@¡@¡@ Y¨Ó·½Àɧt¸U¥Î¦r¤¸¡A«h¥ØªºÀÉ»P¨Ó·½ÀɦP¦W¡A¦ý°ÆÀɦW¬° .000¡C ;¡@/p¡J¬q¸¨¤À¹j¦r¦ê¡C¦pªG¦³¡y/p¡z°Ñ¼Æ¡Aªí¥Ü¥H¨ä«á©Ò±µªº¡y¦r¦ê¡z¥[¦b¨CÓ¬q¸¨¤§ ;¡@¡@¡@«á¡C¦pªG¨S¦³¡y/p¡z°Ñ¼Æ¡A«h¨C¤@¦æªí¥Ü¤@Ó¬q¸¨¡A§Y¥H¤@¹ï 0dh¡B0ah ¬°¤À¹j ;¡@¡@¡@²Å¸¹¡C¦r¦êªø«×¤£¥i¶W¹L 32 Ӧ줸²Õ¡C¡y<¡z¡y>¡z³o¨âÓ¦r¤¸¡A©M DOS «·s ;¡@¡@¡@¾É¦Vªº¯S®í²Å¸¹¤@¼Ë¡A¤À§O¥H¡y<¡z¡B¡y>¡zªí¥Ü¡AY¡y&¡z¤§«á©Ò±µªº¤£¬O ;¡@¡@¡@¡yLT¡z©Î¡yGT¡z«h¸Ó¡y&¡z§Y¬°¯u¥¿¤§¡y&¡z¡A«D¯S®í²Å¸¹¤§«e¾É¡C ; /n¡J0dh¡B0ah ªº¼Æ¥Ø¡C¦b¦¹¼Æ¥Ø¤Î¨ä¥H¤U§¡³Q»{¬°¬O¦P¤@¬q¸¨¡AY¬Ù²¤¡A¤º©wȬ° 1 ; /i¡J©¿²¤¨C¦æ³Ì«e±ªº¦r¤¸¼Æ¡C¤º©wȬ° 0¡Aªí¥Ü¤£©¿²¤¡C ; /s¡Jºò±µ¦b 0dh¡B0ah ¤§«áªºªÅ¥Õ¦r¤¸µ¥©ó©Î¶W¹L¦¹¼Æ¡A¤]³Qµø¬°¬q¸¨¶}©l¡C¨Ò¦p¡y/S2 ; ¡zªí¥Ü¦pªG¤@¦æªº³Ì«e±¦³¨âөζW¹L¨âӪťզr¤¸¡A¤]ºâ¤@Ó¬q¸¨ªº¶}©l¡C tab equ 9 cr equ 0dh lf equ 0ah max equ 0f800h filedat struc f_attri dd ? ;ÀÉ®×ÄÝ©Ê f_create_time dq ? ;«Ø¥ß®É¶¡ lst_access_time dq ? ;³Ì«á¦s¨ú®É¶¡ lst_mdfy_time dq ? ;³Ì«áקï®É¶¡ f_size_h dd ? ;Àɮפj¤p¡A°ª¦ì¤¸ f_size_l dd ? ;Àɮפj¤p¡A§C¦ì¤¸ reserved dq ? full_name db 260 dup (?) short_name db 14 dup (?) filedat ends .386 ;*********************************************************** stack segment stack use16 dw 40h dup (0) stack ends ;*********************************************************** data segment use16 psp_param db 80h dup (0) cur_file filedat <0> para_str_len dw 0 ;¬q¸¨¤À¹j¦r¦êªø«× para_str db 32 dup (?) ;¬q¸¨¤À¹j¦r¦ê sr_fn db 260 dup (0) ;¨Ó·½ÀɦW¡A§t¸ô®|¦WºÙ tr_fn db 260 dup (0),0 ;¥ØªºÀɦW ext_of_tr_fn db '.000',0 ;¥ØªºÀɦW¤§°ÆÀɦW param_len dw ? ;©R¥O¦C¿é¤J¤§°Ñ¼Æªø«× sr_fn_addr dw ? ;¨Ó·½ÀɦW¦ì§} tr_fn_addr dw ? ;¥ØªºÀɦW¦ì§} tr_path_addr dw ? ;¥ØªºÀɸô®|¦W¶}©l¦ì§}¡A¶È¦b status ¤§ bit 7=1 ®É¦³¥Î tr_path_end dw ? ;¥ØªºÀɸô®|¦Wµ²§ô¦ì§}¡A¶È¦b status ¤§ bit 7=1 ®É¦³¥Î sr_handle dw ? ;¨Ó·½Àɤ§ÀÉ®×¥N½X tr_handle dw ? ;¥ØªºÀɤ§ÀÉ®×¥N½X seg_sr dw ? ;¦s©ñ¨Ó·½Àɤº®eªº°Ï¬q seg_tr dw ? ;¦s©ñ¥ØªºÀɤº®eªº°Ï¬q bytes_read dw ? ;¨C¦¸Åª¨ú¤§¦ì¤¸²Õ¼Æ bytes_store dw ? ;¦b¥ØªºÀɸê®Æ°Ïªº¦ì¤¸²Õ¼Æ source_pnter dw ? ;¨Ó·½Àɤº®e¤§«ü¼Ð findfile dw ? num_cr_lf dw 1 num_ignore dw 0 num_space dw 2 sp_begin_line dw 0 file_size dd ? file_size_pbcd dt ? tr_f_size dd ? ;¥ØªºÀɪø«× second_begin db ? ;µ{¦¡¶}©l®Éªº®É¶¡¡J¬í minute_begin db ? ;µ{¦¡¶}©l®Éªº®É¶¡¡J¤À hour_begin db ? ;µ{¦¡¶}©l®Éªº®É¶¡¡J®É day_begin db ? ;µ{¦¡¶}©l®Éªº®É¶¡¡J¤é month_begin db ? ;µ{¦¡¶}©l®Éªº®É¶¡¡J¤ë year_begin db ? ;µ{¦¡¶}©l®Éªº®É¶¡¡J¦~¡A¥Ñ 1980 ¦~°_¨ì²{¦bªº¦~¼Æ status db 0 ;bit0¡JY¬° 0¡Aªí¥Ü¨CÓ¬q¸¨¤§¶¡¨S¦³¤À¹j¦r¦ê¡A¥ç§Y¨C¤@¦æ´N¬O¤@Ó¬q¸¨ ; Y¬° 1¡Aªí¥Ü¨CÓ¬q¸¨¶¡¡A¦³¤À¹j¦r¦ê¡C¨Ò¦p¦b HTML ÀÉ¥H <p> §@¬°¬q¸¨¶}©l ;bit1¡JY¬° 0¡Aªí¥Üì©lÀɮש|¥¼Åª¨ú¦ÜÀɮקÀ ; Y¬° 1¡Aªí¥Üì©lÀɮפw¸gŪ¨ú¦ÜÀɮקÀ ;bit2¡J¦b¦L¥XÀɮפj¤p®É¡A¦¹¦ì¤¸¬° 0¡Aªí¥Ü«e±ªº 0 ¤£¦L¥X¡Aµ¥¨ì²Ä¤@Ó«D¹s¼Æ¦r®É¡A ; ¦¹¦ì¤¸¬° 1¡A«á±ªº¼Æ¦r¤£ºÞ¬O¤£¬O¹s¡A³£n¦L¥X¨Ó ;bit3¡JY¬° 0¡Aªí¥Ü¨Ó·½Àɤ£§t¸U¥Î¦r¤¸¡FY¬° 1¡Aªí¥Ü¨Ó·½Àɧt¦³¸U¥Î¦r¤¸ ;bit4¡JY¬° 0¡A¨Ï¥ÎªÌ¨S¦³¿é¤J¡y/I¡z°Ñ¼Æ¡CY¬° 1¡A¨Ï¥ÎªÌ«ü©w¡y/I¡z°Ñ¼Æ ;bit5¡JY¬° 0¡A¨Ï¥ÎªÌ¨S¦³¿é¤J¡y/N¡z°Ñ¼Æ¡CY¬° 1¡A¨Ï¥ÎªÌ«ü©w¡y/N¡z°Ñ¼Æ ;bit6¡JY¬° 0¡A¨Ï¥ÎªÌ¨S¦³¿é¤J¡y/S¡z°Ñ¼Æ¡CY¬° 1¡A¨Ï¥ÎªÌ«ü©w¡y/S¡z°Ñ¼Æ ;bit7¡JY¬° 0¡Aªí¥Ü¥ÎªÌ§¹¥þ¨S¦³«ü©w¥ØªºÀɩΦ³«ü©w¥]§t¸ô®|ªº¥ØªºÀɦW ; Y¬° 1¡Aªí¥Ü¨Ï¥ÎªÌ¶È¿é¤J¥ØªºÀɤ§¸ô®|©ÎºÏºÐ¾÷¦W¡A¨Ã¨S¦³¿é¤J¥ØªºÀɦW msg0 db 'ª©Åv©Ò¦³¡A½Ð¥ô·N´²§G¨Ï¥Î¡A¦ý¤£¥i¥X°â¹Ï§Q',cr,lf db 'TXT2NOCR ¡Ð TeXT TO NO CaRrier character and line feed text',cr,lf db '¦¹µ{¦¡¬O±N¯Â¤å¦rÀɤ¤ªºÂk¦ì´«¦æ¦r¤¸®ø¥h¡A¤è«K¥i¥H¦b Windows §@·~¨t²Î' db '¤¤ªº¤å®Ñ',cr,lf,'³B²z¾¹±Æª©¡C',cr,lf,cr,lf db '¥Îªk¡Jtxt2nocr ¨Ó·½ÀÉ [¥ØªºÀÉ] [/P¦r¦ê] [/N¼Æ¦r] [/I¼Æ¦r] [/S¼Æ¦r]' db cr,lf,cr,lf,'¡@¨Ó·½ÀÉ:§Yªí¥Ün³B²zªºÀɮסA¥i¥Î¸U¥Î¦r¤¸¡C',cr,lf db '¡@¥ØªºÀÉ:¥ØªºÀɦW¡CY¬Ù²¤¡A«h©ñ¦b²{¦b¥Ø¿ý¡A¦ý³B²z«áªº°ÆÀɦW¬° .000' db ' «O¦sìÀɮסC',cr,lf,'¡@¡@¡@¡@ Y¨Ó·½Àɧt¸U¥Î¦r¤¸¡A«h¥ØªºÀÉ»P¨Ó·½ÀÉ' db '¦P¦W¡A¦ý°ÆÀɦW¬° .000¡C',cr,lf db '¡@/P¡J¬q¸¨¤À¹j¦r¦ê¡C¦pªG¦³¡y/P¡z°Ñ¼Æ¡Aªí¥Ü¥H¨ä«á©Ò±µªº¡y¦r¦ê¡z¥[¦b' db '¨CÓ¬q¸¨¤§«e',cr,lf,'¡@¡@¡@¡C¦pªG¨S¦³¡y/P¡z°Ñ¼Æ¡A«h¨C¤@¦æªí¥Ü¤@Ó¬q' db '¸¨¡A¤º©w¤@¹ï 0dh¡B0ah ¬°¤À¹j²Å¸¹',cr,lf db '¡@¡@¡@¡C¦r¦êªø«×¤£¥i¶W¹L 32 Ӧ줸²Õ¡C¯S®í²Å¸¹¥H¡y&¡z¬°«e¾É¡A¥i¥Î' db 'ªº¯S®í²Å¸¹¦³',cr,lf,'¡@¡@¡@¡y<¡z¡y>¡z¡y&CR¡z¡y&LF¡z¤À§Oªí¥Ü¡y<' db '¡z¡y>¡z¡B0dh¡B0ah¡CY¡y&¡z¤§«á©Ò±µ',cr,lf,'¡@¡@¡@ªº¦r¤£¬O¤Wz¥|ºØ¡A' db '«h¸Ó¡y&¡z§Y¬°¯u¥¿ªº¡y&¡z¡A«D¯S®í²Å¸¹¤§«e¾É¡C',cr,lf db ' /N¡J³sÄò¥X²{ 0dh¡B0ah ¤§¹ï¼Æ¡A¦b¦¹¼Æ¤Î¨ä¥H¤U§¡³Q»{¬°¬O¦P¤@¬q¸¨¡A' db '¦¹¼Æ½d³ò¬° 1',cr,lf,' ¨ì 9¡AY¬Ù²¤¡A¤º©wȬ° 1¡A¤]´N¬O»¡¥H 1' db ' ¹ï 0dh¡B0ah ³s±µªº¨â¦æ·|§R¥h 0dh¡B',cr,lf,' 0ah ¦Ó³s±µ¦¨¦P¤@' db '¬q¸¨¡C',cr,lf,' /I¡J©¿²¤¨C¦æ³Ì«e±ªº¦r¤¸¼Æ¡C¤º©wȬ° 0¡Aªí¥Ü¤£©¿' db '²¤¡C',cr,lf,' /S¡Jºò±µ¦b 0dh¡B0ah ¤§«áªºªÅ¥Õ°£¥h /I «ü©w¤§¦r¼Æ«á' db 'µ¥©ó©Î¶W¹L¦¹¼Æ¡A¤]³Qµø¬°¬q',cr,lf,' ¸¨¶}©l¡C¨Ò¦p¡y/S2¡zªí¥Ü¦p' db 'ªG¤@¦æªº³Ì«e±¦³¨âөζW¹L¨âӪťզr¤¸¡A¤]ºâ¤@Ó',cr,lf db ' ¬q¸¨ªº¶}©l¡C',cr,lf,'«ö¥ô·NÁäÄ~ÄòÅã¥Ü¡K¡K$' msg1 db cr,lf,'¶}±ÒÀɮ׿ù»~¡C$' msg2 db cr,lf,'¥ØªºÀɤw¦s¦b¡C$' msg3 db cr,lf,'°O¾ÐÅ餣¨¬¡C$' msg4 db cr,lf,'«Ø¥ß¥ØªºÀÉ¿ù»~¡C$' msg5 db cr,lf,'§¹¦¨¡C$' msg6 db cr,lf,'YÀÉ®× LEE.TXT ¤º®e¬°¡J( ¶·ª`·N¨C¦æ«á±§¡¦³¤@¹ï¬Ý¤£¨£ªº' db ' 0dh¡B0ah )',cr,lf,'³ß¨£¥~§Ì¤S¨¥§O¡@§õ¯q' db cr,lf,cr,lf,'¤Q¦~Â÷¶Ã«á¡Aªø¤j¤@¬Û³{¡F',cr,lf db '°Ý©mÅåªì¨£¡AºÙ¦W¾Ð®e¡C',cr,lf,cr,lf,'§O¨Ó·É®ü¨Æ¡A»y½}¼Ç¤ÑÄÁ¡F' db cr,lf,'©ú¤é¤Ú³®¹D¡A¬î¤s¤S´X«¡C' db cr,lf,cr,lf,'°õ¦æ TXT2NOCR LEE.TXT /P<P>' db ' «áÅܦ¨¡J',cr,lf,'³ß¨£¥~§Ì¤S¨¥§O¡@§õ¯q',cr,lf db '<P>¤Q¦~Â÷¶Ã«á¡Aªø¤j¤@¬Û³{¡F°Ý©mÅåªì¨£¡AºÙ¦W¾Ð®e¡C',cr,lf db '<P>§O¨Ó·É®ü¨Æ¡A»y½}¼Ç¤ÑÄÁ¡F©ú¤é¤Ú³®¹D¡A¬î¤s¤S´X«¡C',cr,lf,cr,lf db '¤º©wȬ° /N1¡Aªí¥Ü³sÄò¥X²{ 1 ¹ï©Î 1 ¹ï¥H¤Uªº 0dh¡B0ah §¡¬°¦P¤@¬q¸¨' db '¡C´«¥y¸Ü»¡¡A',cr,lf,'n³sÄò 2 ¹ï 0dh¡B0ah ³s¦b¤@°_¡A¤~·|¤À¬q¡C' db '¬G²Ä¤@¦æ³æ¿W¤@¬q¸¨¡A3¡B4 ¦æ¬°¦P¬q¸¨¡A',cr,lf,'5¡B6 ¦æ¬°¥t¤@¬q¸¨¡C' db cr,lf,cr,lf,'°õ¦æ TXT2NOCR LEE.TXT /P<P> /N2 «áÅܦ¨¡J',cr,lf db '³ß¨£¥~§Ì¤S¨¥§O¡@§õ¯q¤Q¦~Â÷¶Ã«á¡Aªø¤j¤@¬Û³{¡F°Ý©mÅåªì¨£¡AºÙ¦W¾ÐÂÂ' db '®e¡C§O¨Ó·É®ü¨Æ¡A»y½}¼Ç¤ÑÄÁ¡F©ú¤é¤Ú³®¹D¡A¬î¤s¤S´X«¡C',cr,lf,cr,lf db '¦]«ü©w /N2¡A©Ò¥H¥þ³¡µø¬°¤@¬q¸¨¡C',cr,lf,'«ö¥ô·NÁäÄ~ÄòÅã¥Ü¡K¡K$' msg7 db cr,lf,'YÀÉ®× LEE.TXT ¤º®e¬°¡J( ¶·ª`·N¨C¦æ«á±§¡¦³¤@¹ï¬Ý¤£¨£ªº' db ' 0dh¡B0ah )',cr,lf,'³ß¨£¥~§Ì¤S¨¥§O¡@§õ¯q' db cr,lf,cr,lf,'¤Q¦~Â÷¶Ã«á¡Aªø¤j¤@¬Û³{¡F',cr,lf db '°Ý©mÅåªì¨£¡AºÙ¦W¾Ð®e¡C',cr,lf,cr,lf,'§O¨Ó·É®ü¨Æ¡A»y½}¼Ç¤ÑÄÁ¡F' db cr,lf,'©ú¤é¤Ú³®¹D¡A¬î¤s¤S´X«¡C',cr,lf,cr,lf,'°õ¦æ TXT2NOCR LEE.' db 'TXT /P<P> /I4 «áÅܦ¨¡J',cr,lf,'¥~§Ì¤S¨¥§O¡@§õ¯q',cr,lf db '<P>Â÷¶Ã«á¡Aªø¤j¤@¬Û³{¡FÅåªì¨£¡AºÙ¦W¾Ð®e¡C',cr,lf db '<P>·É®ü¨Æ¡A»y½}¼Ç¤ÑÄÁ¡F¤Ú³®¹D¡A¬î¤s¤S´X«¡C',cr,lf,cr,lf db '¦]¬° /I4 ©¿²¤«e 4 Ó¦r¡A©Ò¥H¡y³ß¨£¡z¡B¡y¤Q¦~¡z¡B¡y°Ý©m¡zµ¥³QºI°£¡C' db cr,lf,'( ¤@Ó¤¤¤å¦r¥Î¨âӦ줸²Õªí¥Ü )¡C',cr,lf,cr,lf db '°õ¦æ TXT2NOCR LEE.TXT «áÅܦ¨¡J',cr,lf db '³ß¨£¥~§Ì¤S¨¥§O¡@§õ¯q',cr,lf,'¤Q¦~Â÷¶Ã«á¡Aªø¤j¤@¬Û³{¡F°Ý©mÅåªì¨£¡A' db 'ºÙ¦W¾Ð®e¡C',cr,lf,'§O¨Ó·É®ü¨Æ¡A»y½}¼Ç¤ÑÄÁ¡F©ú¤é¤Ú³®¹D¡A¬î¤s¤S´X' db '«¡C',cr,lf,cr,lf,'¦]¬°¨S¦³ /P °Ñ¼Æ¡A¥Î¤º©wªº 0dh¡B0ah §@¬°¤À¬q¸¨' db 'ªº²Å¸¹¡C',cr,lf,'«ö¥ô·NÁäÄ~ÄòÅã¥Ü¡K¡K$' msg8 db cr,lf,cr,lf,cr,lf,'YÀÉ®× LEE.TXT ¤º®e¬°¡J',cr,lf,cr,lf db ' ³ß¨£¥~§Ì¤S¨¥§O¡@§õ¯q',cr,lf,' ¤Q¦~Â÷¶Ã«á¡Aªø¤j¤@¬Û³{¡F' db cr,lf,cr,lf,'°Ý©mÅåªì¨£¡AºÙ¦W¾Ð®e¡C',cr,lf,' §O¨Ó·É®ü¨Æ¡A' db '»y½}¼Ç¤ÑÄÁ¡F',cr,lf,'©ú¤é¤Ú³®¹D¡A¬î¤s¤S´X«¡C',cr,lf db cr,lf,'°õ¦æ TXT2NOCR LEE.TXT /S4 /Pxyz«áÅܦ¨¡J',cr,lf,cr,lf db 'xyz³ß¨£¥~§Ì¤S¨¥§O¡@§õ¯q',cr,lf,'xyz¤Q¦~Â÷¶Ã«á¡Aªø¤j¤@¬Û³{¡F',cr,lf db 'xyz°Ý©mÅåªì¨£¡AºÙ¦W¾Ð®e¡C',cr,lf,'xyz§O¨Ó·É®ü¨Æ¡A»y½}¼Ç¤ÑÄÁ¡F©ú' db '¤é¤Ú³®¹D¡A¬î¤s¤S´X«¡C',cr,lf,cr,lf,'¦] /S4 ªí¥Ü¨C¦æ«eªºªÅ¥Õ¶W' db '¹L©Îµ¥©ó 4 Ó´Nµø¬°¤@Ó¬q¸¨¡A©Ò¥H²Ä 1¡B3¡B6 ¦æ¦U¦æ§Î¦¨',cr,lf db '¤@¬q¸¨¡A¤S¦P®É¤º©w /N1¡A©Ò¥H²Ä 5 ¦æ¤]§Î¦¨¤@¬q¸¨¡C',cr,lf,cr,lf msg9 db cr,lf,'$' msga db ' ==> $' msgb db ' bytes)$' data ends ;*********************************************************** txt2ncr segment use16 assume cs:txt2ncr,ds:data ;----------------------------------------------------------- del_cr_lf proc near sub edx,edx push es mov tr_f_size,edx ;¨Ï¥ØªºÀɪø«×ÅÜ 0 read_sr_0: mov cx,max ;Ū¨ú¨Ó·½Àɤº®e¡A¦s©ñ©ó GS:0000 sub dx,dx read_sr_1: mov bx,sr_handle push ds mov ds,seg_sr mov ah,3fh int 21h pop ds cmp ax,cx ;¦pªG AX<CX ªí¥Ü¤w¸gŪ¦ÜÀɮקÀ jb last_rd and status,0fdh ;©|¥¼Åª¦ÜÀɮקÀ¡A²M°£ STATUS ªº BIT1 ¬° 0 jmp short save_bytes_rd last_rd: or status,2 ;Ū¦ÜÀɮקÀ¡A³]©w STATUS ªº BIT1 ¬° 1 save_bytes_rd: add ax,dx ;¥[¤W¥ý«e¥¼³B²zªº mov bytes_read,ax ;¹ê»ÚŪ¨úªº¦ì¤¸²Õ¼Æ¦s©ó bytes_read sub ax,ax mov gs,seg_sr mov bytes_store,ax mov source_pnter,ax mov di,ax mov es,seg_tr ;ES:DI=¥ØªºÀÉ«ü¼Ð line_deal: mov bx,source_pnter ;¶}©l³B²z³o¤@¦æ¤F¡A¥ýÀˬd³o¤@¦æªº¦r¼Æ¡A³o¤@¦æ sub cx,cx ;±q source_pnter ©Ò«ü¤§³B¶}©l mov si,bx ;CX=³o¤@¦æªº¦r¼Æ¡A¦ý¤£§t 0dh¡B0ah mov dx,bytes_read calc_n_char0: cmp byte ptr gs:[bx],cr je fnd_cr calc_n_char1: inc cx inc bx dec dx jz end_read_0 ;Y DX=0¡Aªí¥Ü¤w¸g³B²z§¹©ÒŪ¤Jªº¸ê®Æ¡A¦ýÀÉ®× jmp calc_n_char0 ;¨Ã«D¥H 0dh¡B0ah µ²§À¡A¸õ¨ìend_read_0 ³B end_read_0: test status,2 ;¥ýÀˬd¬O§_¤wŪ¨ú¨ìÀɮקÀ jnz end_read_1 mov bx,source_pnter ;Y©|¥¼Åª¨ú¦ÜÀɮקÀºÝ¡A«h§â³Ñ¤U¥¼³B²zªº¸ê®Æ²¾¨ì sub di,di ;GS:0000 ³B¡A¦A¼g¤J¥ØªºÀÉ»PŪ¨ú¨Ó·½ÀÉ move_remain: mov al,gs:[bx] ;§â³Ñ¤Uªº¸ê®Æ ( ¦b GS:BX ³B¡Aªø«× CX )²¾¨ì GS:00 mov gs:[di],al inc bx inc di loop move_remain push di call write pop dx mov cx,max sub cx,dx jmp read_sr_1 end_read_1: mov ax,dx ;¨Ó·½Àɤw¥þ³¡Åª¨ú§¹¡A¥B¨Ó·½Àɤ£¥H 0dh¡B0ah µ²§À jmp end_read_2 fnd_cr: cmp word ptr gs:[bx],0a0dh jne calc_n_char1 ;Àˬd¬O§_¥u¬O 0dh ¦Ó¤w¡A¯u¥¿´«¦æÀ³¸Ó¬O 0dh¡B0ah mov ax,2 ;0dh¡B0ah ¦@¦³¨âӦ줸²Õªø end_read_2: jcxz many_cr_lf ;CX=¦¹¦æ¦r¼Æ¡CY CX=0 ªí¥Ü¦¹¦æ¥u¦³ 0dh¡B0ah add source_pnter,cx ;§ä¨ì¸Ó¦æªºµ²§À¤F sub bytes_read,cx add source_pnter,ax ;¨Ï source_pnter «ü¦V¤U¤@¦æ¶}©l sub bytes_read,ax ;¨Ï bytes_read=³Ñ¤U¥¼³B²zªº¦ì¤¸²Õ¼Æ cmp cx,num_ignore ;Àˬd¦¹¦æ¦r¼Æ¬O§_¤ñ num_ignore ¤j jbe line_deal ;Y CX<=num_ignore¡A¦¹¦æ§R°£ add si,num_ignore ;Y CX>num_ignore¡A¦¹¦æ¤£§R°£ sub cx,num_ignore ;¡A¦ý©¿²¤«e± num_ignore Ó¦r mov bx,si ;BX «ü¦V¸Ó¦æ¥h°£ num_ignore «áªº²Ä¤@Ó¦r sub dx,dx nxt_space_char: cmp byte ptr gs:[bx],' ' ;ÀˬdªÅ¥Õ¦r¤¸¼Æ¡A¦s©ó DX jne not_space inc bx inc dx ;DX=¨C¦æ¦b¥h°£ num_ignore ¤§«áªºªÅ¥Õ¦r¼Æ jmp nxt_space_char not_space: cmp dx,num_space ;¤ñ¸û¸Ó¦æ³Ì«e±ªºªÅ¥Õ¦r¤¸¼Æ¡A¬O§_¤j©ó num_space jb no_para_str_0 ;YªÅ¥Õ¦r¼Æ¤ñ num_space ¤p¡A«h¤£¬O¬q¸¨¶}©l call insert_para_str ;YªÅ¥Õ¦r¼Æ¤ñ num_space ¤j¡A«h´¡¤J¬q¸¨¤À¹j¦r¦ê no_para_str_0: add si,dx ;¥h°£¸Ó¦æ«eªºªÅ¥Õ sub cx,dx nxt_char_save: mov al,gs:[si] ;§â¥h°£ªÅ¥Õ¤Î num_ignore Ó¦r«áªº¦r¡A¦s©ó ES:DI stosb inc si inc bytes_store loop nxt_char_save cmp bytes_store,max jb if_end_read call write if_end_read: cmp bytes_read,0 ;YÀɮפ£¥H 0dh¡B0ah µ²§À¡A¶·Àˬd bytes_read ¬O jz eof ;§_¬° 0¡AY¬° 0¡Aªí¥Ü¤wŪ¨ú¤§¸ê®Æ¤w³B²z§¹ jmp line_deal many_cr_lf: inc cx ;pºâ¦³´X¹ï 0dh¡B0ah¡A°O¿ý©ó CX calc_cr_n: cmp word ptr gs:[bx],0a0dh jne end_calc_cr_n inc cx add bx,ax sub bytes_read,ax jz eof jmp calc_cr_n end_calc_cr_n: cmp cx,num_cr_lf ;Y CX>num_cr_lf ®É¡A¤~´¡¤J¬q¸¨¤À¹j²Å¸¹ jbe no_para_str_1 call insert_para_str no_para_str_1: mov source_pnter,bx jmp line_deal eof: call write jc exit_del_cr test status,2 jnz finish_deal jmp read_sr_0 finish_deal: pop es clc ret exit_del_cr: pop es stc ret del_cr_lf endp ;--------------------------------------- insert_para_str proc near push cx push si mov cx,para_str_len mov si,offset para_str add bytes_store,cx rep movsb pop si pop cx ret insert_para_str endp ;----------------------------------------------------------- write proc near sub di,di mov ah,40h sub edx,edx ;«ü¦Vn¼g¤J¸ê®Æªº¦ì§} mov bx,tr_handle push ds mov cx,bytes_store mov ds,seg_tr int 21h mov dx,ax pop ds add tr_f_size,edx mov bytes_store,di ret write endp ;----------------------------------------------------------- ;ÀɮצWºÙ¦³®É¥]§t¸ô®|¦W©ÎºÏºÐ¾÷¦W¡A¦¹°Æµ{¦¡¤D¬O´M§ä¥DÀɦW©Ò¦b¦ì§} ;¿é¤J¡JDS:SI¡ÐÀɮצWºÙ¦ì§}¡AÀɦW²Å¦X ASCIZ ;¿é¥X¡JDS:SI¡Ð¥DÀɦW¦ì§} fnd_main_addr proc near push dx mov dx,si fnd_main_0: cmp byte ptr [si],0 ;¥Ñ¨Ó·½ÀÉÀɦW§ÀºÝ¦V«e´M§ä¨Ó·½Àɤ§¥D je fnd_main_1 ;ÀɦW¡A¦¹¥DÀɦW¤£§t¸ô®|»PºÏºÐ¾÷¦W inc si jmp fnd_main_0 fnd_main_1: dec si cmp byte ptr [si],'\' ;§ä¨ì¡y\¡z©Î¡y:¡z©ÎªÌ¨ì¹F sr_fn_addr je fnd_main_2 ;©Ò«üªº¦ì§}³B¡Aªí¥Ü§ä¨ì¥DÀɦW cmp byte ptr [si],':' je fnd_main_2 cmp si,dx je fnd_main_3 jmp fnd_main_1 fnd_main_2: inc si fnd_main_3: pop dx ret fnd_main_addr endp ;----------------------------------------------------------- ;·í¨Ï¥ÎªÌ¨S¦³«ü©w¥ØªºÀɩΨӷ½Àɧt¸U¥Î¦r¤¸®É¡A¥ØªºÀɧ¡©M¨Ó·½ÀɦP ;¦W¡A¥B¥ØªºÀÉ°ÆÀɦW¬°¡y.000¡z¡A³o¼Ë¨Ï±o¥ØªºÀɦs©ñ©ó¥Ø«e©Ò¦b¥Ø¿ý ;¿é¤J¡ÐSI¡J¨Ó·½ÀɦW(¥i§t¸ô®|¦W)¦ì§} fill_tr_fn1 proc near mov di,offset tr_fn fill_tr_fn1 endp fill_tr_fn0 proc near mov si,sr_fn_addr call fnd_main_addr ;§ä¨ì¥DÀɦW¡A¦ì©ó SI ©Ò«ü¦ì§} fill_tf_4: lodsb ;§â¨Ó·½ÀÉÀɦW¦s¤J DI ©Ò«ü¦ì§} or al,al jz fill_tf_5 stosb jmp fill_tf_4 fill_tf_5: mov si,offset ext_of_tr_fn ;¦A¦s¤J ¡y.000¡z·í§@¥ØªºÀÉ°ÆÀɦW mov cx,5 rep movsb mov tr_fn_addr,offset tr_fn ret fill_tr_fn0 endp ;--------------------------------------- get_number proc near lodsb dec cx sub al,'0' jbe num_err cmp al,9 ja num_err cbw clc ret num_err: stc ret get_number endp ;----------------------------------------------------------- ;Àˬd³oÓÀɮ׬O¤£¬Oµ{¦¡¶}©l«á¤~«Ø¥ßªº¡H check_just_now proc near mov bx,offset cur_file.lst_mdfy_time mov eax,[bx] rol eax,7 mov dl,al and dl,7fh cmp dl,year_begin ;¤ñ¸û²Å¦XÀÉ®×קï®É¶¡¬O§_¤ñµ{¦¡°õ¦æ®Éªº®É¨è¦ jb create_before ;Y¤ñ¸û¦¡A«h¸õ¥X°Æµ{¦¡¡AºX¼Ð¬° CY ja create_after ;Y¤ñ¸û±ß¡A¤]¸õ¥X°Æµ{¦¡¡AºX¼Ð¬° NC rol eax,4 mov dl,al and dl,0fh cmp dl,month_begin jb create_before ja create_after rol eax,5 mov dl,al and dl,1fh cmp dl,day_begin jb create_before ja create_after rol eax,5 mov dl,al and dl,1fh cmp dl,hour_begin jb create_before ja create_after rol eax,6 mov dl,al and dl,3fh cmp dl,minute_begin jb create_before ;°²¦p¬YÀÉ®×קï®É¶¡»P TXT2NOCR °õ¦æ®É¶¡¦P ja create_after ;¤ë¦P¤é¦P®É¦P¤À¡A«h³Q»{¬°¬O TXT2NOCR ¦]¬° sub eax,eax ;¸U¥Î¦r¤¸¦Ó«Ø¥ßªº¡A©Ò¥H¤£³B²z¸ÓÀÉ®× create_after: create_before: ret check_just_now endp ;--------------------------------------- ;¨ú±oµ{¦¡è°õ¦æ®Éªº®É¶¡ get_begin_time proc near mov ah,2ah int 21h sub cx,1980 mov year_begin,cl mov month_begin,dh mov day_begin,dl mov ah,2ch int 21h mov hour_begin,ch mov minute_begin,cl mov second_begin,dh ret get_begin_time endp ;--------------------------------------- pause proc near mov ah,0 int 16h ret pause endp ;--------------------------------------- print_string proc near mov ah,9 int 21h ret print_string endp ;--------------------------------------- ;¥H¤Q¶i¦ì¡A¦L¥X EAX ùتº¼Æ¦r ;status ªº bit2 ªí¥Ü«e±ªº 0 n¤£n¦L¥X¨Ó print_file_size proc near and status,0fbh ;¥ý°²³]°ª¦ì¤¸¬° 0 mov file_size,eax ;--ST---;--ST1--; fild file_size ; EAX ; fbstp file_size_pbcd mov bx,offset file_size_pbcd+9 nxt_b: mov dl,[bx] mov cl,1 ;CL=1 ªí¥Ü°ª¦ì¤¸¡ACL=0 ªí¥Ü§C¦ì¤¸ shr dl,4 jz n_zero or status,4 add dl,'0' call print_char high_b: mov dl,[bx] mov cl,0 ;CL=1 ªí¥Ü°ª¦ì¤¸¡ACL=0 ªí¥Ü§C¦ì¤¸ and dl,0fh jz n_zero or status,4 add dl,'0' call print_char low_b: dec bx cmp bx,offset file_size_pbcd jb pnt_over jmp nxt_b n_zero: test status,4 jz no_pnt add dl,'0' call print_char no_pnt: test cl,1 jz low_b jmp high_b pnt_over: ret print_file_size endp ;--------------------------------------- ;¦L¥X¡ybytes)¡z¦r¤¸¨Ó print_r_bracket proc mov dx,offset msgb call print_string ret print_r_bracket endp ;--------------------------------------- ;¦L¥X¡y(¡z¦r¤¸¨Ó print_l_bracket proc mov dl,'(' print_l_bracket endp ;--------------------------------------- print_char proc near mov ah,2 int 21h ret print_char endp ;--------------------------------------- print_filename proc near mov dl,[si] cmp dl,0 jz print_over call print_char inc si jmp print_filename print_over: ret print_filename endp ;--------------------------------------- ;¦L¥X¥¿¦b³B²zªºÀɦW¤Î¤j¤p print_info proc near mov dx,offset msg9 call print_string mov si,sr_fn_addr call print_filename call print_l_bracket mov eax,cur_file.f_size_l call print_file_size call print_r_bracket mov dx,offset msga call print_string mov si,tr_fn_addr call print_filename call print_l_bracket ret print_info endp ;----------------------------------------------------------- ;¦] AX=714E/714F ¦ü¥GµLªk¯u¥¿¨ú±o¨Ó·½ÀÉ¥þ¦W ( §t¸ô®|¦W )¡A¬G ;¥Ñ fill_sr_fn ¶ñ¤W¨Ó·½ÀÉ¥þ¦W fill_sr_fn proc near mov si,sr_fn_addr call fnd_main_addr mov dx,si mov di,offset sr_fn mov si,sr_fn_addr nxt_path_char: lodsb stosb cmp si,dx jnz nxt_path_char mov si,offset cur_file.full_name nxt_sr_name: lodsb stosb or al,al jnz nxt_sr_name ret fill_sr_fn endp ;----------------------------------------------------------- main proc far mem_not_enogh: mov dx,offset msg3 jmp some_error start: push ds sub ax,ax push ax mov dx,data mov es,dx ;¨Ï PSP °Ñ¼Æ°Ïªº 80 Ӧ줸²Õ²¾¨ì mov si,80h ;data °Ï¬q¤¤ psp_param cld mov cx,40h mov di,offset psp_param rep movsw mov ds,dx ;¨Ï DS=ES=data mov ax,cs add ax,1000h mov seg_sr,ax ;³]©w¦s©ñ¨Ó·½Àɤº®eªº¬q¦ì§} add ax,1000h cmp ax,9000h ja mem_not_enogh mov seg_tr,ax ;³]©w¦s©ñ¥ØªºÀɤº®eªº¬q¦ì§} and status,0eh ;¥ý³]©w¤º©wÈ¡JµL¡y/P¡z¡y/N¡z¡y/I¡z¤TÓ°Ñ¼Æ mov ax,0a0dh ;²M°£ status ªº BIT0¡A¨Ã¨Ï¥Î¤º©w¬q¸¨¤À¹j¦r mov di,offset para_str ;¦ê¡A0dh¡B0ah¡Apara_str_len=2 mov cx,2 stosw mov para_str_len,cx mov num_cr_lf,1 ;°£¦¹¤§¥~¡A³]©w num_cr_lf=1¡Anum_ignore=0 mov num_ignore,0 ;num_space=2 (§Y¦pªG¤@¦æªº³Ì«e±¦³¨âӪťզr mov num_space,cx ;¤¸©Î¶W¹L¤]ºâ¤@Ó¬q¸¨ªº¶}©l) finit mov si,offset psp_param lodsb cbw mov cx,ax mov param_len,ax jcxz no_param scan_slash: mov al,'/' ;´M§ä¡y/¡z mov di,si repne scasb je fnd_slash jmp get_time fnd_slash: mov si,di lodsb dec cx and al,0dfh cmp al,'N' je slash_n cmp al,'S' je slash_s cmp al,'P' je slash_p cmp al,'I' jne no_param slash_i: test status,10h ;§ä¨ì¡y/I¡z°Ñ¼Æ jnz no_param call get_number jc no_param mov num_ignore,ax or status,10h jmp short chck_slash_end slash_n: test status,20h ;§ä¨ì¡y/N¡z°Ñ¼Æ jnz no_param call get_number jc no_param mov num_cr_lf,ax or status,20h jmp short chck_slash_end no_param: mov dx,offset msg0 call print_string call pause mov dx,offset msg6 call print_string call pause mov dx,offset msg7 call print_string call pause mov dx,offset msg8 some_error: call print_string mov al,1 exit: mov ah,4ch int 21h slash_s: test status,40h ;§ä¨ì¡y/S¡z°Ñ¼Æ jnz no_param call get_number or status,40h mov num_space,ax chck_slash_end: cmp byte ptr [si],' ' je scan_slash cmp byte ptr [si],tab je scan_slash cmp byte ptr [si],'/' je scan_slash cmp byte ptr [si],cr jne no_param jmp short get_time slash_p: test status,1 ;§ä¨ì¡yP¡z°Ñ¼Æ¤F jnz no_param or status,1 mov dx,2 mov di,offset para_str+2 ;§â¡y/P¡z«á±±µªº¦r¦ê¦s©ó para_str ùØ get_para_str: lodsb dec cx cmp al,cr je get_time cmp al,' ' je finsh_para_str cmp al,'/' je finsh_para_str cmp al,'&' je special_char save_special: stosb inc para_str_len ;¼W¥[¬q¸¨¤À¹j¦r¦êªø«× jmp get_para_str special_char: lodsw sub cx,dx and ax,0dfdfh ;¡y/P¡z¤§«á©Ò±µªº¬q¸¨¤À¹j²Å¸¹§t¦³¡y&¡z¦r¤¸ cmp ax,544ch ;Àˬd¬O§_¡y>¡z©Î¡y<¡z je special_lt cmp ax,5447h je special_gt cmp ax,5243h je special_cr cmp ax,464ch je special_lf add cx,dx sub si,dx ;¦pªG¥u¬O¡y&¡z¡A¦Ó¨ä«á¨Ã«D¡yLT¡z©Î¡yGT¡z¡A mov al,'&' ;ªí¥Ü³o¬O¯u¥¿ªº¡y&¡z¨Ã«D¡y<¡z¡y>¡z¤§«e¾É jmp save_special special_lt: mov al,'<' ;¦pªG¬O¡y<¡z¡A¶È¦s¤J¡y<¡z jmp save_special special_gt: mov al,'>' ;¦pªG¬O¡y>¡z¡A¶È¦s¤J¡y>¡z jmp save_special special_cr: mov al,cr ;¦pªG¬O¡y&CR¡z¡A¶È¦s¤J 0dh jmp save_special special_lf: mov al,lf ;¦pªG¬O¡y&LF¡z¡A¶È¦s¤J 0ah jmp save_special finsh_para_str: jmp scan_slash get_time: call get_begin_time ;¨ú±o TXT2NOCR ¶}©l°õ¦æ®É¶¡ mov si,offset psp_param+1 nxt_param1: lodsb ;´M§ä²Ä¤@ÓÀÉ®×°Ñ¼Æ cmp al,' ' je nxt_param1 cmp al,tab je nxt_param1 cmp al,cr ;¦pªG²Ä¤@ӰѼƬO CR¡B¡y/¡z je no_param ;¡Aªí¥Ü¨Ï¥ÎªÌ¿é¤J¿ù»~ cmp al,'/' je no_param mov sr_fn_addr,si ;§äµÛ¤F¡A±N¨ä¦ì§}°O¿ý©ó sr_fn_addr ÅܼÆùØ dec sr_fn_addr nxt_param2: lodsb ;´M§ä²Ä¤@ӰѼƧÀºÝ cmp al,' ' je end_sr_fn cmp al,tab je end_sr_fn cmp al,cr ;¦pªG²Ä¤@ӰѼƤ§«á¬° CR jne nxt_param2 mov byte ptr [si-1],0 ;«h±N CR §ï¦¨ 0¡A¨Ã¸õ¦Ü no_tr_fn1 ³B jmp short no_tr_fn1 end_sr_fn: mov byte ptr [si-1],0 ;¦pªG²Ä¤@ӰѼƤ§«á¬°ªÅ¥Õ¡Aªí¥ÜÁÙ¦³¨ä nxt_param3: lodsb ;¥L°Ñ¼Æ§äµÛ¤F¡A±N¨ä§ÀºÝ§ï¦¨ 0¡A¨ÃÀˬd cmp al,' ' ;´M§ä²Ä¤GÓ°Ñ¼Æ je nxt_param3 cmp al,tab je nxt_param3 cmp al,'/' ;¦pªG²Ä¤GӰѼƥH¡y/¡z¡B je no_tr_fn1 ;0dh ¦r¤¸¡Aªí¥Ü¨S¦³¥ØªºÀɦW cmp al,cr je no_tr_fn1 mov tr_fn_addr,si ;§äµÛ¤F¡A±N²Ä¤GӰѼƤ§ dec tr_fn_addr ;¦ì§}°O¿ý©ó tr_fn_addr nxt_param4: lodsb ;´M§ä²Ä¤GӰѼƧÀºÝ cmp al,' ' je end_tr_fn0 cmp al,tab je end_tr_fn0 cmp al,cr je end_tr_fn0 cmp al,'/' jne nxt_param4 end_tr_fn0: dec si mov byte ptr [si],0 ;§äµÛ¤F¡A±N²Ä¤GӰѼƧÀºÝ§ï¦¨ 0 dec si ;SI «ü¦V²Ä¤GӰѼƪºË¼Æ²Ä¤GÓ¦r cmp byte ptr [si],'\' je no_tr_fn0 ;Àˬd¥ØªºÀɬO§_¥u¦³ºÏºÐ¾÷¦W©Î¸ô®|¦W cmp byte ptr [si],':' jne if_wild1 no_tr_fn0: mov dx,si ;¨Ï¥ÎªÌ¨S¿é¤J¥ØªºÀɦW¡A¶È¿é or status,80h ;¤J¥ØªºÀɤ§¸ô®|©ÎºÏºÐ¾÷¦W inc dx mov si,tr_fn_addr mov di,offset tr_fn mov tr_path_addr,si mov tr_path_end,dx nxt_tr_path0: lodsb stosb cmp si,dx jne nxt_tr_path0 call fill_tr_fn0 jmp short if_wild0 no_tr_fn1: call fill_tr_fn1 if_wild0: mov bx,sr_fn_addr ;Àˬd¨Ó·½ÀɬO§_§t¸U¥Î¦r¤¸ and status,0f7h ;°²©w¨Ó·½Àɤ£§t¸U¥Î¦r¤¸ if_wild1: cmp byte ptr [bx],'*' je fnd_wild_char cmp byte ptr [bx],'?' je fnd_wild_char cmp byte ptr [bx],0 je no_wild_0 inc bx jmp if_wild1 fnd_wild_char: or status,8 ;§t¸U¥Î¦r¤¸ no_wild_0: mov si,1 ;§ä²Ä¤@ӲŦXªºÀɦW mov di,offset cur_file mov dx,sr_fn_addr mov ax,714eh mov cx,202fh int 21h jc open_err test status,8 ;¤£§t¸U¥Î¦r¤¸®É¡A¸õ¨ì no_wild_1 jz no_wild_1 mov findfile,ax jmp short get_sr_fn nxt_file: mov si,1 ;§ä¤U¤@ӲŦXªº¨Ó·½ÀɦW mov di,offset cur_file mov ax,714fh mov bx,findfile int 21h cmp ax,12h je finish get_sr_fn: call fill_sr_fn ;·í¿é¤J¸U¥Î¦r¤¸®É¡A¶ñ¤J¨Ó·½ÀɦW mov sr_fn_addr,offset sr_fn call check_just_now jae nxt_file test status,80h jz no_tr_fn2 mov si,tr_path_addr ;·í¿é¤J¸U¥Î¦r¤¸¥B¶È¿é¤J¥ØªºÀɸô®|®É mov di,offset tr_fn ;¶ñ¤J¥ØªºÀÉ¥þ¦W nxt_tr_path1: lodsb stosb cmp si,tr_path_end jne nxt_tr_path1 call fill_tr_fn0 jmp short no_wild_1 no_tr_fn2: call fill_tr_fn1 ;¨Ï¥ÎªÌ¨S¦³¿é¤J¥Øªº¸ô®|¤ÎÀɦW no_wild_1: mov si,sr_fn_addr ;¶}±Ò¨Ó·½ÀÉ mov ax,716ch mov cx,20h sub bx,bx mov dx,1 int 21h jc open_err mov sr_handle,ax mov si,tr_fn_addr ;«Ø¥ß¥ØªºÀÉ mov ax,716ch mov cx,20h mov bx,2292h mov dx,10h int 21h mov tr_handle,ax jnc begin_del_cr mov ah,3eh ;¿ù»~²£¥Í¤F¡AÃö³¬¨Ó·½ÀÉ mov bx,sr_handle int 21h mov dx,offset msg4 jmp some_error mov dx,offset msg2 jmp some_error open_err: mov dx,offset msg1 jmp some_error begin_del_cr: call print_info ;¦L¥X¥¿¦b³B²zªºÀɮפÎÀɮפj¤p call del_cr_lf ;³B²z¤¤ mov eax,tr_f_size ;¦L¥X¥ØªºÀɤj¤p call print_file_size call print_r_bracket mov bx,tr_handle ;Ãö³¬¥ØªºÀÉ mov ah,3eh int 21h mov bx,sr_handle ;Ãö³¬¨Ó·½ÀÉ mov ah,3eh int 21h test status,8 ;Àˬd·í§t¸U¥Î¦r¤¸®É¡A¬O§_ jnz nxt_file ;©Ò¦³Àɮ׳£³B²z§¹²¦ finish: mov dx,offset msg5 ;§¹¦¨ mov ah,9 int 21h mov al,0 jmp exit mov al,0 jmp exit main endp ;----------------------------------------------------------- txt2ncr ends ;*********************************************************** end start
¥Î MASM 5.x ²ÕĶ®É
D:\HomePage\SOURCE>set path=G:\ASM;%path% [Enter] D:\HomePage\SOURCE>masm txt2nocr; [Enter] Microsoft (R) Macro Assembler Version 5.00 Copyright (C) Microsoft Corp 1981-1985, 1987. All rights reserved. 50642 + 354014 Bytes symbol space free 0 Warning Errors 0 Severe Errors D:\HomePage\SOURCE>link txt2nocr; [Enter] Microsoft (R) Personal Computer Linker Version 2.40 Copyright (C) Microsoft Corp 1983, 1984, 1985. All rights reserved. D:\HomePage\SOURCE>dir txt2nocr.exe [Enter] Volume in drive D is FAT32_DATA1 Volume Serial Number is 0CE7-3A6B Directory of D:\HomePage\SOURCE TXT2NOCR EXE 6,733 08-30-04 15:19 TXT2NOCR.EXE 1 file(s) 6,733 bytes 0 dir(s) 9,018.15 MB free D:\HomePage\SOURCE>
¥Î MASM 6.x ²ÕĶ®É
D:\HomePage\SOURCE>path g:\masm611\bin;%path% [Enter] D:\HomePage\SOURCE>ml /Zm txt2nocr.asm [Enter] Microsoft (R) Macro Assembler Version 6.11 Copyright (C) Microsoft Corp 1981-1993. All rights reserved. Assembling: txt2nocr.asm Microsoft (R) Segmented Executable Linker Version 5.31.009 Jul 13 1992 Copyright (C) Microsoft Corp 1984-1992. All rights reserved. Object Modules [.obj]: txt2nocr.obj Run File [txt2nocr.exe]: "txt2nocr.exe" List File [nul.map]: NUL Libraries [.lib]: Definitions File [nul.def]: D:\HomePage\SOURCE>
³oÓµ{¦¡¤Ó¤j¡A¤p¤ì°¸¤£¥´ºâ¸Ñ»¡¡C°²¦p¥L¦³¿ù»~¡A½Ð©M§Ú³sµ¸¡AÁÂÁ¡C