qc.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
_emit
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Keyword:   _emit
 
  Syntax:    _asm _emit byte
 
  Summary:   Defines a single immediate <byte> at the current
             location.
 
     The _emit pseudoinstruction is similar to the DB directive of the
     Microsoft Macro Assembler. It allows definition of a single
     immediate <byte> at the current location in the current code
     segment. However, _emit can define only one byte at a time, and it
     can only define bytes in the code (_TEXT) segment. It uses the
     same syntax as the INT instruction.
 
     One use for _emit is to define 80386-specific instructions, which
     the in-line assembler does not support. The following fragment
     defines the 80386 CWDE instruction:
 
          // Macro for cwde instruction assumes 16-bit mode
          #define cwde _asm _emit 0x66 _asm _emit 0x98
           . . .
          _asm
          {
              . . .          ; Assembly instructions
              cwde           ; Macro to generate CWDE
              . . .          ; More instructions
          }
 
     See also: _asm
                                    -♦-