home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / hamradio / wattcp.zip / SEMAPHOR.ASM < prev    next >
Assembly Source File  |  1990-05-16  |  713b  |  41 lines

  1. PAGE    66,132
  2. ;
  3. ;
  4. ;
  5. ;
  6. ;
  7. ;
  8. ;
  9. ;
  10. ;  semaphor
  11. ;
  12. ;  perform semaphor stuff
  13. ;
  14. ;  (c) 1990 University of Waterloo,
  15. ;           Faculty of Engineering,
  16. ;           Engineering Microcomputer Network Development Office
  17. ;
  18. ;
  19. ;
  20.     include masmdefs.hsm
  21.     include    model.hsm
  22.  
  23. codedef semaphor
  24. datadef
  25.  
  26. ;*************************************************************************
  27. ;  USAGE:  int sem_up( UINT far * p)
  28. ;       1 on failure
  29. ;       0 on success
  30. ;*************************************************************************
  31. cstart  semaphor
  32.  
  33. cpublic    sem_up
  34.     mov    AX, 1
  35.     les    DI, +@AB [BP]        ; get pointer
  36.     xchg    AX, word ptr ES:[DI]    ; perform swap
  37. creturn sem_up
  38.  
  39. cend    semaphor
  40.         end
  41.