home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / assemblr / disasm / re86 / beispiel.a00 next >
Encoding:
Text File  |  1993-07-27  |  9.1 KB  |  281 lines

  1.                    jmp l047Ah
  2.  
  3. l0103h             db 'DRV V2.00 (C) 1990-1992 Stefan Bion, enter DRV /H for'
  4.                    db ' help',0Dh,0Ah,0
  5. l0140h             db 'Invocation syntax: DRV [options]',0Dh,0Ah,0Dh,0Ah
  6.                    db 'options: /H    display this help information',0Dh,0Ah
  7.                    db '         /P    stop after each page',0Dh,0Ah,0Dh,0Ah
  8.                    db 'DRV sends a listing of the installed device drivers t'
  9.                    db 'o StdOut.',0Dh,0Ah
  10.                    db 'If you redirect the output, option /P has no effect.',0Dh
  11.                    db 0Ah,0
  12. l0230h             db 0Dh,0Ah
  13.                    db '            ┌────────────────── CHR',0Dh,0Ah
  14.                    db '            │┌───────────────── IOCTL',0Dh,0Ah
  15.                    db '            ││┌──────────────── NONIBM',0Dh,0Ah
  16.                    db '            │││┌─────────────── NETWORK',0Dh,0Ah
  17.                    db '            ││││┌────────────── OCRM (OPEN DEVICE, CL'
  18.                    db 'OSE DEVIVE,',0Dh,0Ah
  19.                    db '            │││││                     REMOVABLE MEDIA'
  20.                    db ')',0Dh,0Ah
  21.                    db '            │││││        ┌───── CLOCK',0Dh,0Ah
  22.                    db '            │││││reserved│┌──── NUL',0Dh,0Ah
  23.                    db '            │││││   │    ││┌─── STDOUT',0Dh,0Ah
  24.                    db '            │││││┌┬┬┴┬┬┬┐│││┌── STDIN',0Dh,0Ah
  25.                    db '            ││││││││ ││││││││',0Dh,0Ah
  26.                    db ' Header     ││││││││ ││││││││   Strategy    Interrupt'
  27.                    db '   Name',0Dh,0Ah,0Dh,0Ah,0
  28. l0444h             db '   ',0
  29. l0448h             db ' Blockdr',0Dh,0Ah,0
  30. l0453h             db '        ',0Dh,0Ah,0
  31. l045Eh             db 0
  32. l045Fh             db 0
  33. l0460h             db 0
  34. l0461h             db 0Fh
  35. l0462h             db 'Interrupted',0Dh,0Ah
  36.                    db '$'
  37. l0470h             db ' - key -',0Dh
  38.                    db '$'
  39.  
  40. l047Ah:            push dx
  41.                    mov dx,offset l0103h
  42.                    call l05C2h
  43.                    pop dx
  44.                    mov ax,offset l2523h   ;'%#'
  45. l0484h             equ $-1
  46.                    mov dx,offset l0653h
  47.                    int 21h
  48.                    push ds
  49.                    xor ax,ax
  50.                    mov ds,ax
  51.                    mov al,b[l0484h]
  52.                    pop ds
  53.                    mov b[l0460h],al
  54.                    mov si,81h   ;'ü'
  55.                    cld
  56. l049Ah:            lodsb
  57.                    cmp al,0Dh
  58.                    je l04C0h
  59.                    cmp al,2Fh   ;'/'
  60.                    jne l049Ah
  61.                    lodsb
  62.                    cmp al,0Dh
  63.                    je l04C0h
  64.                    and al,0DFh
  65.                    cmp al,48h   ;'H'
  66.                    jne l04B5h
  67.                    mov b[l045Eh],1
  68.                    jmp short l049Ah
  69.  
  70. l04B5h:            cmp al,50h   ;'P'
  71.                    jne l049Ah
  72.                    mov b[l045Fh],1
  73.                    jmp short l049Ah
  74.  
  75. l04C0h:            cmp b[l045Eh],1
  76.                    jne l04D4h
  77.                    push dx
  78.                    mov dx,offset l0140h
  79.                    call l05C2h
  80.                    pop dx
  81.                    mov ax,offset l4C00h
  82.                    int 21h
  83. l04D4h:            push ds
  84.                    mov bx,34h   ;'4'
  85.                    lds bx,d[bx]
  86.                    cmp b[bx+1],1
  87.                    pop ds
  88.                    je l04E6h
  89.                    mov b[l045Fh],0
  90. l04E6h:            push dx
  91.                    mov dx,offset l0230h
  92.                    call l05C2h
  93.                    pop dx
  94.                    mov ah,52h   ;'R'
  95.                    int 21h
  96.                    add bx,22h   ;'"'
  97.                    jae l04FEh
  98.                    mov ax,es
  99.                    add ax,offset l1000h
  100.                    mov es,ax
  101. l04FEh:            call l0518h
  102.                    es mov ax,w[bx]
  103.                    cmp ax,offset lFFFFh
  104.                    je l0513h
  105.                    es mov dx,w[bx+2]
  106.                    mov bx,ax
  107.                    mov es,dx
  108.                    jmp short l04FEh
  109.  
  110. l0513h:            mov ax,offset l4C00h
  111.                    int 21h
  112. l0518h:            mov ax,es
  113.                    call l05F9h
  114.                    mov ah,2
  115.                    mov dl,3Ah   ;':'
  116.                    int 21h
  117.                    mov ax,bx
  118.                    call l05F9h
  119.                    push dx
  120.                    mov dx,offset l0444h
  121.                    call l05C2h
  122.                    pop dx
  123.                    es mov ax,w[bx+4]
  124.                    xchg al,ah
  125.                    call l0635h
  126.                    push ax
  127.                    mov ah,2
  128.                    mov dl,20h   ;' '
  129.                    int 21h
  130.                    pop ax
  131.                    xchg al,ah
  132.                    call l0635h
  133.                    push dx
  134.                    mov dx,offset l0444h
  135.                    call l05C2h
  136.                    pop dx
  137.                    mov ax,es
  138.                    call l05F9h
  139.                    mov ah,2
  140.                    mov dl,3Ah   ;':'
  141.                    int 21h
  142.                    es mov ax,w[bx+6]
  143.                    call l05F9h
  144.                    push dx
  145.                    mov dx,offset l0444h
  146.                    call l05C2h
  147.                    pop dx
  148.                    mov ax,es
  149.                    call l05F9h
  150.                    mov ah,2
  151.                    mov dl,3Ah   ;':'
  152.                    int 21h
  153.                    es mov ax,w[bx+8]
  154.                    call l05F9h
  155.                    push dx
  156.                    mov dx,offset l0444h
  157.                    call l05C2h
  158.                    pop dx
  159.                    es mov ax,w[bx+4]
  160.                    test ax,offset l8000h
  161.                    jne l05A0h
  162.                    es mov al,b[bx+0Ah]
  163.                    xor ah,ah
  164.                    call l05D7h
  165.                    push dx
  166.                    mov dx,offset l0448h
  167.                    call l05C2h
  168.                    pop dx
  169.                    call l0663h
  170.                    ret
  171.  
  172. l05A0h:            mov di,bx
  173.                    add di,0Ah
  174.                    mov si,offset l0453h
  175.                    mov cx,4
  176. l05ABh:            es mov ax,w[di]
  177.                    mov w[si],ax
  178.                    inc di,di,si,si
  179.                    loop l05ABh
  180.                    push dx
  181.                    mov dx,offset l0453h
  182.                    call l05C2h
  183.                    pop dx
  184.                    call l0663h
  185.                    ret
  186.  
  187. l05C2h:            push ax,si
  188.                    mov si,dx
  189.                    mov ah,2
  190.                    cld
  191. l05C9h:            lodsb
  192.                    cmp al,0
  193.                    je l05D4h
  194.                    mov dl,al
  195.                    int 21h
  196.                    jmp short l05C9h
  197.  
  198. l05D4h:            pop si,ax
  199.                    ret
  200.  
  201. l05D7h:            push ax,bx,cx,dx
  202.                    mov bx,0Ah
  203.                    xor cx,cx
  204. l05E0h:            xor dx,dx
  205.                    div bx
  206.                    add dl,30h   ;'0'
  207.                    push dx
  208.                    inc cx
  209.                    or ax,ax
  210.                    jne l05E0h
  211.                    mov ah,2
  212. l05EFh:            pop dx
  213.                    int 21h
  214.                    loop l05EFh
  215.                    pop dx,cx,bx,ax
  216.                    ret
  217.  
  218. l05F9h:            push ax,bx,cx,dx,si
  219.                    mov cx,4
  220. l0601h:            mov si,ax
  221.                    and si,0Fh
  222.                    mov bl,b[si+l0625h]
  223.                    push bx
  224.                    shr ax,1
  225.                    shr ax,1
  226.                    shr ax,1
  227.                    shr ax,1
  228.                    loop l0601h
  229.                    mov cx,4
  230.                    mov ah,2
  231. l061Ah:            pop dx
  232.                    int 21h
  233.                    loop l061Ah
  234.                    pop si,dx,cx,bx,ax
  235.                    ret
  236.  
  237. l0625h             db '0123456789ABCDEF'
  238.  
  239. l0635h:            push ax,bx,cx,dx
  240.                    mov bl,al
  241.                    mov cx,8
  242.                    mov ah,2
  243. l0640h:            rcl bl,1
  244.                    jb l0648h
  245.                    mov dl,0F9h
  246.                    jmp short l064Ah
  247.  
  248. l0648h:            mov dl,31h   ;'1'
  249. l064Ah:            int 21h
  250.                    loop l0640h
  251.                    pop dx,cx,bx,ax
  252. l0652h:            ret
  253.  
  254. l0653h:            mov ax,cs
  255.                    mov ds,ax
  256.                    mov ah,9
  257.                    mov dx,offset l0462h
  258.                    int 21h
  259.                    mov ax,offset l4C01h
  260.                    int 21h
  261. l0663h:            cmp b[l045Fh],0
  262.                    je l0652h
  263.                    inc b[l0461h]
  264.                    mov al,b[l0461h]
  265.                    cmp al,b[l0460h]
  266.                    jb l0652h
  267.                    mov b[l0461h],0
  268.                    mov ah,9
  269.                    mov dx,offset l0470h
  270.                    int 21h
  271.                    mov ah,8
  272.                    int 21h
  273.                    ret
  274.  
  275. l1000h             equ $+978h
  276. l2523h             equ $+1E9Bh
  277. l4C00h             equ $+4578h
  278. l4C01h             equ $+4579h
  279. l8000h             equ $+7978h
  280. lFFFFh             equ $+0F977h
  281.