home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / TASMSWAN.ZIP / TALLY.C < prev    next >
Text File  |  1989-07-17  |  404b  |  21 lines

  1. /******************************************************************
  2. tally.c
  3.     a short in-line assembly language example
  4.        NOTE: you must use the TCC comand-line compiler for this !
  5. ********/
  6.  
  7. #include <stdio.h>
  8.  
  9. main()
  10. {
  11.     int    votes;
  12.     int    tally;
  13.  
  14.     votes = 100;
  15.     tally = 500;
  16.     printf("Tally : %d\n", tally);
  17.     asm mov  ax,[votes]
  18.     asm add  [tally],ax
  19.     printf("Tally : %d\n", tally);
  20. }
  21.