home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / tasm / otabclr.asm < prev    next >
Assembly Source File  |  1988-08-28  |  1KB  |  46 lines

  1.  
  2. ;    FILENAME: OTABCLR.ASM
  3. ;    Copyright (c) 1988 by Borland International, Inc.
  4. ;
  5. ;    Description: This module implements the routine TabClear. TabClear 
  6. ;    clears all tab stops. 
  7. ;    This module uses MASM mode syntax and standard segment directives. 
  8. ;    ASSEMBLY INSTRUCTIONS: To assemble this module use the following 
  9. ;    TASM command line. 
  10. ;        TASM otabclr
  11.  
  12. include globals.inc
  13.  
  14. _TEXT   segment
  15.  
  16.     TabClear proc
  17.  
  18.     ;    This procedure clears all tab stops contained in the input file.
  19.     ;
  20.     ;    Input
  21.     ;        TabTbl - starting location of the TAB table
  22.     ;        MAXLIN - maximum line length
  23.     ;    Output
  24.     ;        TabTbl - cleared and set to null
  25.     ;    Registers modified
  26.     ;        none
  27.  
  28.     push      ax
  29.     push      cx
  30.     push      di
  31.     sub       al, al          ;zero
  32.                               ;number of entries
  33.     mov       cx, MAXLIN      
  34.     lea       di, TabTbl      ;table location
  35.     rep       stosb           ;fill table
  36.     pop       di
  37.     pop       cx
  38.     pop       ax
  39.     ret
  40.     TabClear  endp
  41. _TEXT    ends
  42.  
  43. end
  44.