home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 181.img / TASM-101.ZIP / OTABSET.ASM < prev    next >
Assembly Source File  |  1989-05-02  |  1KB  |  45 lines

  1.  
  2. ;    FILENAME: OTABSET.ASM
  3. ;    Copyright (c) 1988, 1989 by Borland International, Inc.
  4. ;
  5. ;    Description: This module implements the routine TabSet. TabSet 
  6. ;    sets a tap stop at a specified column location. 
  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 otabset
  11.  
  12. include globals.inc
  13.  
  14. _TEXT   segment
  15.  
  16.     TabSet   proc
  17.  
  18.     ;    This procedure sets a tab stop. The value passed in bx
  19.     ;    represents the column number in which the tab is to be placed.
  20.     ;    A tab is represented by the number 1 in the tab table.
  21.     ;    Input
  22.     ;        bx - column number
  23.     ;        TabTbl - starting location of the tab table
  24.     ;        TabEnd - ending location of the tab table
  25.     ;    Output
  26.     ;        TabTbl - cleared and set to null
  27.     ;    Registers modified
  28.     ;        none
  29.  
  30.     push    bx
  31.     lea     bx, [TabTbl + bx]       ;get address
  32.     cmp     bx, TabEnd              ;check if past end
  33.     jae     tabset1
  34.     mov     BYTE PTR [bx], 1        ;set to non-zero
  35. tabset1:
  36.     pop     bx
  37.     ret
  38.     TabSet  endp
  39.  
  40. _TEXT    ends
  41.  
  42. end
  43.