home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD2.img
/
d4xx
/
d471
/
molewt
/
iowords.4th
< prev
next >
Wrap
Text File
|
1991-04-17
|
949b
|
42 lines
\ IOWords.4th
\ Useful words for using IO library calls
\ J. Kennan 2-15-88
Find IOWords NOT
IFTRUE : IOWords ;
." Compiling IOWords.4th" CR
OTHERWISE Prior.Stream
IFEND
: CreateExtIO ( ioReplyPort\size -- IORequest ) \ RKM V2 Appendix F
LOCALS| size IOReplyPort |
IOReplyPort IF
size MEMF_CLEAR MEMF_PUBLIC OR AllocMem
?DUP IF
NT_MESSAGE OVER +IOMessage +mnNode +lnType C!
size OVER +IOMessage +mnLength w!
IOReplyPort OVER +IOMessage +mnReplyPort !
ELSE 0 THEN
ELSE 0 THEN ;
: DeleteExtIO ( ioExt -- ) \ RKM V2 Appendix F
?DUP IF
255 OVER +IOMessage +mnNode +lnType C!
-1 OVER +IODevice +!
-1 OVER +IOUnit +!
DUP +ioMessage +mnLength W@ Freemem
THEN ;
: CheckIO ( ioRequest -- flag )
!a1 exec@ 78 ;
: SendIO ( ioRequest -- )
!A1 exec 77 ;
: AbortIO ( ioRequest-- )
!a1 exec 80 ;
: WaitEvent ( --IDCMPFlags )
CurrentWindow @ +wdUserPort @ eWaitPort Drop GetEvent ;