home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / misc1 / db-comm.lzh / OUTPORT.ASM < prev    next >
Encoding:
Assembly Source File  |  1986-10-09  |  929 b   |  62 lines

  1.  
  2.  
  3.     page    66, 120
  4.     title     DBASE III+ Com Port Handler V1.0
  5.     subttl    By Carl R. Weber
  6.  
  7. IF1
  8.     %out    Pass 1
  9. ENDIF
  10. IF2
  11.     %out    Pass 2
  12. ENDIF
  13.  
  14. ;======================================
  15. ;
  16. ;    output a DBASE III String to the com port
  17. ;
  18. ;    By C.R. Weber
  19. ;
  20. ;======================================
  21.  
  22.  
  23. comline    equ    0000h
  24.  
  25.  
  26. cseg    segment
  27.     assume cs:cseg
  28. outport    proc    far
  29.     push    dx
  30.     push     bx
  31.     push    ax
  32.  
  33.     cmp    bx,    0
  34.     jz    eout            ;no data if zero
  35.  
  36.     mov    dx,     comline        ;default comline
  37.  
  38. oloop    label    near
  39.     cmp    byte ptr [bx],0        ;EOS yet
  40.     jz    eout
  41.     mov    al,    byte ptr [bx]    ;else get character
  42.     inc    bx            ;point to next character
  43.     call    chout            ;output it
  44.     jmp    short oloop        ;and again
  45.  
  46. eout    label    near
  47.     pop    ax            ;return registers and return (FAR)
  48.     pop    bx
  49.     pop    dx
  50.     ret    
  51. outport    endp
  52.  
  53. chout    proc    near
  54.     mov    ah,    1        ;use bios com out procedure
  55.     int    14h
  56.     ret
  57. chout    endp
  58.  
  59.  
  60. cseg    ends
  61.     end                ;end of this assembly routine
  62.