home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c081_11 / 9.ddi / CHAPXMPL.ZIP / PLUSONE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-13  |  542 b   |  20 lines

  1. // Turbo Assembler    Copyright (c) 1988, 1991 By Borland International, Inc.
  2.  
  3. // PLUSONE.C - Example of inline assembler
  4.  
  5. // From the Turbo Assembler Users Guide - Interfacing Turbo Assembler
  6. //                                         with Borland C++
  7.  
  8.  
  9. #include <stdio.h>
  10.  
  11. int  main(void)
  12.  
  13. {
  14.    int  TestValue;
  15.  
  16.    scanf("%d",&TestValue);          /* get the value to increment*/
  17.    asm  inc  WORD PTR TestValue;    /* increment it (inassembler) */
  18.    printf("%d",TestValue);          /* print the incremented value */
  19. }
  20.