home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / PROGRAM / ASM / ALIB30B / CRT3.ASM < prev    next >
Assembly Source File  |  1994-10-15  |  2KB  |  71 lines

  1.     page    66,132
  2. ;******************************** CRT3.ASM   *********************************
  3.  
  4. LIBSEG           segment byte public "LIB"
  5.         assume cs:LIBSEG , ds:nothing
  6.  
  7. ;----------------------------------------------------------------------------
  8. .xlist
  9.     include  mac.inc
  10.     INCLUDE  COMMON.INC
  11. .list
  12. ;----------------------------------------------------------------------------
  13.     EXTRN    REPEAT_PUT_CRT:FAR
  14.     EXTRN    $VERTICAL_REPEAT_CHR:NEAR
  15.     EXTRN    LIB_INFO:BYTE
  16. comment 
  17. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -( DISPLAY )
  18. TABULAR_DRAW - Subroutine to draw using a table   tabular_draw
  19. ;
  20. ;   inputs:    ah = color
  21. ;           ds:bx = table ptr
  22. ;                   table =    db repeat count (negative for columns)
  23. ;                              db char
  24. ;                              db column
  25. ;                              db row
  26. ;                       above blocks are repeated until ( dw -1) is found.
  27. ;
  28. ; output:  registers changed = ax,bx,cx,dx,si,di
  29. ;
  30. ; notes:  Each table entry can draw a line either horizontally or
  31. ;         vertically.
  32. ;* * * * * * * * * * * * * *
  33. 
  34.  
  35. dtbl    struc
  36.  dcnt    db    ?
  37.  dchar    db    ?
  38.  dcol    db    ?
  39.  drow    db    ?
  40. dtbl    ends
  41. ;-----------------------------
  42.     PUBLIC    TABULAR_DRAW
  43. TABULAR_DRAW    PROC    FAR
  44.     mov    dx,word ptr ds:[bx.dcol]
  45.     mov    al,[bx.dchar]
  46.     sub    cx,cx
  47.     mov    cl,[bx.dcnt]
  48.     test    cl,80h
  49.     jnz    tab_col        ;jmp if column repeat
  50.     call    repeat_put_crt
  51.     jmp    td_term
  52. tab_col:
  53.     and    cl,7fh        ;remove flag bit
  54.     mov    si,cx
  55.     push    bx
  56.     sub    bx,bx
  57.     mov    bl,lib_info.crt_columns
  58.     mov    cx,1
  59.     call    $vertical_repeat_chr
  60.     pop    bx
  61. td_term:    
  62.     add    bx,size dtbl
  63.     cmp    word ptr [bx],-1
  64.     jne    tabular_draw
  65.     retf
  66. TABULAR_DRAW    ENDP
  67.  
  68.  
  69. LIBSEG    ENDS
  70.     end
  71.