home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 4 / AACD04.ISO / AACD / Programming / powerd / lib / PowerD / Inp.ass < prev    next >
Encoding:
Text File  |  1999-09-28  |  301 b   |  22 lines

  1. ; (4,a7) - fh
  2.  
  3.     xdef    _Inp
  4.  
  5. _Inp    movem.l    d2-d3/a6,-(a7)
  6.     move.l    (4+12,a7),d1
  7.     moveq    #1,d3
  8.     lea    (4+12,a7),a0
  9.     move.l    a0,d2
  10.     move.l    _DOSBase,a6
  11.     jsr    (-42,a6)        ; Read()
  12.     movem.l    (a7)+,d2-d3/a6
  13.     tst.l    d0
  14.     beq.s    .error
  15.     moveq    #0,d0
  16.     move.b    (4,a7),d0        ; no +12!
  17.     rts
  18. .error    moveq    #-1,d0
  19.     rts
  20.  
  21.     xref    _DOSBase
  22.