3 PUBLIC
int sys_physcopy(src_proc
, src_seg
, src_vir
,
4 dst_proc
, dst_seg
, dst_vir
, bytes
)
5 int src_proc
; /* source process */
6 int src_seg
; /* source memory segment */
7 vir_bytes src_vir
; /* source virtual address */
8 int dst_proc
; /* destination process */
9 int dst_seg
; /* destination memory segment */
10 vir_bytes dst_vir
; /* destination virtual address */
11 phys_bytes bytes
; /* how many bytes */
13 /* Transfer a block of data. The source and destination can each either be a
14 * process number or SELF (to indicate own process number). Virtual addresses
15 * are offsets within LOCAL_SEG (text, stack, data), REMOTE_SEG, or BIOS_SEG.
16 * Physicall addressing is also possible with PHYS_SEG.
21 if (bytes
== 0L) return(OK
);
22 copy_mess
.CP_SRC_ENDPT
= src_proc
;
23 copy_mess
.CP_SRC_SPACE
= src_seg
;
24 copy_mess
.CP_SRC_ADDR
= (long) src_vir
;
25 copy_mess
.CP_DST_ENDPT
= dst_proc
;
26 copy_mess
.CP_DST_SPACE
= dst_seg
;
27 copy_mess
.CP_DST_ADDR
= (long) dst_vir
;
28 copy_mess
.CP_NR_BYTES
= (long) bytes
;
29 return(_taskcall(SYSTASK
, SYS_PHYSCOPY
, ©_mess
));