EasyManua.ls Logo

Atari ST series - Page 187

Atari ST series
420 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Rwabs
Read/Write Disk Sectors
Rwabs() Opcode = 4
T his fu nctio n allo w s y o u to re a d o r w rite to th e disk , a se cto r at a tim e.
C macro format
in t m o d e , se cto rs, s ta rt, d riv en u m ;
lo n g bu ffer, sta tu s;
sta tu s = R w a b s(m od e, b uffer, se cto rs , sta rt, d riv en u m );
Machine
m o v e .w
m o v e.w
m o v e.w
m o v e.l
m o v e .w
m o v e.w
tra p
ad d q.l
Inputs
d riv e n um
sta rt
se cto rs
bu ffer
m o d e
language format
# d r iv e n u m , - (sp )
# s ta r t, - (sp )
# s e c to r s , - (sp )
b uffer, - (sp )
# m o d e , - (sp )
# 4 , - (sp )
# 1 3
# 1 4 ,s p
w o rd T h e n u m b er o f th e driv e to us e for th e
re ad o r w rite o p era tio n (0 = d riv e A :,
1 = d riv e B :, an d so o n ),
w o rd T h e startin g se cto r n u m b er for th e tran s
fer
w o rd T h e n u m b e r of se cto rs to be tra n sfe rred
lo n g A p o in te r to th e m e m o ry are a u se d as a
d isk se cto r bu ffer. T his bu ffer sh ou ld
sta rt at an ev e n a d d re ss , a n d sh o u ld h av e
5 1 2 b y te s allo cated to it for ea ch se cto r to
b e re ad o r w ritte n ,
w o rd A flag th at in dica tes w h e th er yo u w ish to
rea d o r w rite secto rs:
0 = R ea d secto rs
1 = W rite secto rs
2 = R ead se cto rs w ith o u t affectin g m e
d ia ch an ge sta tu s
3 = W rite se cto rs w ith o u t affectin g m e
dia c h a n g e statu s
Results
DO statu s
lo n g A n er r o r c o d e th at in d icate s w h e th er th e tran sfe r w a s
su cce ss fu l. A ze ro sta tu s m e an s n o erro r o ccu rre d .
O th e rw ise , a n eg ativ e G EM D O S e rro r n u m b er is re
tu rn ed . S ee A p p e n d ix D for a list o f G E M D O S erro r
co d es.
179

Related product manuals