home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 245.lha / FastGro_v1.0 / IsMessageWaiting.asm < prev    next >
Assembly Source File  |  1989-04-09  |  518b  |  27 lines

  1. ; IsMessageWaiting.asm    Copyright ©1987 Doug Houck
  2. ;
  3. ; NAME        IsMessageWaiting        test for message at port
  4. ; SYNOPSIS
  5. ;        boo = IsMessageWaiting( MsgPort );
  6. ;
  7. ; FUNCTION
  8. ;        return non-zero if a message is waiting
  9. ;
  10. ; INPUT        struct MsgPort *msgport        port to examine
  11. ;
  12. ; RESULT    non-zero if message waiting at port
  13. ;        result in D0
  14. ;
  15.     far    code
  16.     far    data
  17.     public    _IsMessageWaiting
  18.  
  19. _IsMessageWaiting:
  20.     movea.l    4(sp),a0    ; a0 -> MsgPort
  21.     movea.l    $14(a0),a0    ; a0 = lh_Head
  22.     move.l    (a0),d0        ; is head's successor nil?
  23.     rts
  24.  
  25.     END
  26.