home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / batch / library / batutl2 / wait.asm < prev    next >
Assembly Source File  |  1988-04-20  |  1KB  |  52 lines

  1. TITLE    WAIT    1-1-80    [4-19-88]
  2. ;Toad Hall Disassembly, tweak
  3.  
  4. ;INITIAL VALUES :    CS:IP    0000:0100
  5. ;            SS:SP    0000:FFFF
  6. CodeSeg    SEGMENT
  7.     ASSUME DS:CodeSeg,SS:CodeSeg,CS:CodeSeg,ES:CodeSeg
  8.     ORG    100H
  9.  
  10. _Wait    proc    near
  11.     JMP    SHORT    Outer_Delay
  12.  
  13. bcntr_103    DB    3        ;outer loop counter (constant)
  14. wcntr_104    dw    0        ;middle loop counter
  15.  
  16. Outer_Delay:
  17.     MOV    DL,bcntr_103        ;load outer loop counter
  18.     OR    DL,30H            ;Asciify
  19.     MOV    AH,2            ;display char
  20.     INT    21H
  21.     MOV    DL,'.'            ;display some dots
  22.     INT    21H            ;...3 of them
  23.     INT    21H
  24.     INT    21H
  25.     MOV    WORD PTR wcntr_104,10H    ;refresh middle counter
  26. Middle_Delay:
  27.     MOV    CX,0FFH            ;inner loop counter
  28. Inner_Delay:
  29.     MOV    AH,0BH            ;check kbd status
  30.     INT    21H
  31.     CMP    AL,0FFH            ;anything there?
  32.     JNZ    Relup136        ; nope, reloop
  33.      MOV    DL,0FFH            ;output char
  34.      MOV    AH,6            ;direct kbd/display
  35.      INT    21H
  36.      CMP    AL,1BH            ;was it an Escape char?
  37.      JNZ    Exit            ; nope, go exit
  38.      INT    23H            ; yep, do the DOS Break interrupt
  39.  
  40. Relup136:
  41.     LOOP    Inner_Delay        ; loop inner counter
  42.     DEC    WORD PTR wcntr_104    ;decrement middle loop counter
  43.     JNZ    Middle_Delay        ;not elapsed, keep looping
  44.     DEC    BYTE PTR bcntr_103    ;decrement outer loop counter
  45.     JNZ    Outer_Delay        ; not elapsed, keep looping
  46. Exit:    INT    20H
  47.  
  48. _Wait    endp
  49.  
  50. CodeSeg    ENDS
  51.     END    _Wait
  52.