home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / assemblr / disasm / re86 / beispiel.a01 < prev    next >
Text File  |  1993-07-27  |  9KB  |  284 lines

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