home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / SOURCE.ZIP / MIME1294.ZIP / M-GEN.ASM < prev    next >
Assembly Source File  |  1994-12-01  |  2KB  |  86 lines

  1. .286
  2. .model  small
  3. .code
  4.          org     0100h
  5.  
  6. msg_addr equ     offset msg - offset proc_start- 3
  7.  
  8.          extrn   mime:near,emime:near
  9.  
  10.                       ; ÑHñU╡{ªííA░úñF¡n¬`╖N¬║ªañΦª│¬`╕╤íA¿ΣѪ│íÑ≈ª█ñv¼π¿s
  11.  
  12. start:
  13.          mov     ah,09h
  14.          mov     dx,offset dg_msg
  15.          int     21h
  16.  
  17.          mov     ax,offset emime+000fh ; Ñ╗╡{ªí + mime+000fh ñº½ß¬║ª∞º}
  18.                                    ; ¡Y┤ε 0100h ½hª¿¼░Ñ╗╡{ªí + mime ¬║¬°½╫
  19.  
  20.          shr     ax,4
  21.          mov     bx,cs
  22.          add     bx,ax
  23.  
  24.          mov     es,bx                   ; │] es Ñ╬¿╙⌐±╕╤╜X╡{ªí⌐M│Q╜s╜X╕Ω«╞
  25.                                                 ; ╕╤╜X╡{ªí│╠ñj¼░ 1024 bytes
  26.                                 ; ¡YÑ╬ªb▒`╛n╡{ªí«╔íA½h╢╖¬`╖Nñ└░t¬║░O╛╨┼Θñjñp
  27.  
  28.          mov     cx,50
  29. dg_l0:
  30.          push    cx
  31.          mov     ah,3ch
  32.          xor     cx,cx
  33.          mov     dx,offset file_name
  34.          int     21h
  35.          xchg    bx,ax
  36.  
  37.          mov     cx,offset proc_end-offset proc_start    ; │Q╜s╜X╡{ªí¬║¬°½╫
  38.  
  39.          mov     si,offset proc_start         ; ds:si -> ¡n│Q╜s╜X¬║╡{ªíª∞º}
  40.          xor     di, di
  41.  
  42.          push    bx                                      ; ½Oªs file handle
  43.  
  44.          mov     bx, 100h                                ; com ╝╥ªí
  45.  
  46.          call    mime
  47.  
  48.          pop     bx
  49.  
  50.          mov     ah,40h        ; ¬≡ª^«╔ ds:dx = ╕╤╜X╡{ªí + │Q╜s╜X╡{ªí¬║ª∞º}
  51.          int     21h     ; cx = ╕╤╜X╡{ªí + │Q╜s╜X╡{ªí¬║¬°½╫íA¿ΣѪ╝╚ªs╛╣ñú┼▄
  52.  
  53.          mov     ah,3eh
  54.          int     21h
  55.  
  56.          push    cs
  57.          pop     ds                                          ; ▒N ds │]ª^¿╙
  58.  
  59.          mov     bx,offset file_num
  60.          inc     byte ptr ds:[bx+0001h]
  61.          cmp     byte ptr ds:[bx+0001h],'9'
  62.          jbe     dg_l1
  63.          inc     byte ptr ds:[bx]
  64.          mov     byte ptr ds:[bx+0001h],'0'
  65. dg_l1:
  66.          pop     cx
  67.          loop    dg_l0
  68.          mov     ah,4ch
  69.          int     21h
  70.  
  71. file_name db     '000000'
  72. file_num db      '00.com',00h
  73.  
  74. dg_msg   db      'generates 50 mime encrypted test files.',0dh,0ah,'$'
  75.  
  76. proc_start:
  77.          call    $+0003h
  78.          pop     dx
  79.          add     dx,msg_addr
  80.          mov     ah,09h
  81.          int     21h
  82.          int     20h
  83. msg      db      'This is <MIME> test file.$'
  84. proc_end:
  85.          end     start
  86.