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

  1.  
  2. ;    FILENAME: OBYTEHI.ASM
  3. ;    Copyright (c) 1988 by Borland International, Inc.
  4. ;
  5. ;    Description: This module implements the routine ByteHigh. ByteHigh
  6. ;    processes the current high byte value in al.
  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 obytehi
  11.  
  12. include globals.inc
  13.  
  14. _TEXT   segment
  15.  
  16.     ByteHigh proc
  17.  
  18.     ;    This procedure processes a high byte character 
  19.     ;    (ASCII value > 127) in al.
  20.     ;
  21.     ;    Input 
  22.     ;       al - high byte character
  23.     ;       EOL -  defined to be the end of line character
  24.     ;       InpSta - input status
  25.     ;       INP_EOL - designates an end-of-line condition
  26.     ;       Options - the options being used
  27.     ;       STR_HIB - designates high byte to be stripped
  28.     ;    Output 
  29.     ;       al - high byte processed
  30.     ;       cx - byte count incremented
  31.     ;    Registers modified 
  32.     ;       ax, cx
  33.  
  34.     ; Process high byte
  35.  
  36.     ;--- end of line
  37.  
  38.     cmp      al, EOL         ;check if end of line
  39.     jne      bythi1
  40.     or       InpSta, INP_EOL
  41.     ret
  42.  
  43.     ;--- remove high bytes
  44.  
  45. bythi1:
  46.     test     Options, STR_HIB ;test if remove high bytes
  47.     jz       bythi2
  48.     ret
  49.  
  50.     ;--- write byte
  51.  
  52. bythi2:
  53.     stosb
  54.     inc      cx
  55.     ret
  56.     ByteHigh endp
  57.  
  58. _TEXT    ends
  59.  
  60. end
  61.