Atari ST series Technical Reference Manual page 286

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

Duplicate Standard File Handle
Fdup()
T h is f u n c t i o n is u s e d a s p a r t o f t h e file r e d i r e c t i o n p r o c e s s . I t c r e a t e s a
u s e r - d e s i g n a t e d file h a n d l e t h a t d u p l i c a t e s t h e f u n c ti o n o f o n e o f t h e s t a n ­
d a r d file h a n d l e s . T h is a l l o w s y o u to u s e F f o r c e ( ) ( t h a t o n l y w o r k s w i th
u s e r - d e s i g n a t e d file h a n d l e s ) w i t h s t a n d a r d d e v i c e s .
C macro format
i n t n e w h a n d l e , h a n d l e ;
n e w h a n d l e =
Machine language format
m o v e . w
h a n d l e , - (s p )
m o v e . w
# $ 4 5 - (s p )
t r a p
# 1
a d d q .l
# 4 , s p
Inputs
h a n d l e
w o r d
Results
DO
n e w h a n d l e
See also
F f o r c e ( )
278
Fdup
F d u p ( h a n d l e ) ;
O n e o f t h e s t a n d a r d d e v i c e h a n d l e s ( 0 - 5 ) .
w o r d
I f s u c c e s s f u l , a u s e r - d e s i g n a t e d file h a n d l e
( g r e a t e r t h a n 5 ) . If n o t , a G E M D O S e r r o r n u m ­
b e r .
Opcode = 69 ($45)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents