Date : Thu, 11 Mar 1999 23:29:32 -0600
From : "Rick Galbraith" <rick_galbraith@...>
Subject: Re: Oswords.
In reply to "Christopher J Thornley" <C.J.Thornley@...>
message of Mon, 8 Mar 1999 10:44:40 +0000
Subject: [BBC-Micro] Oswords.
-----you wrote-----
Does anybody have a list of the Osword calls which are used with the DFS,
ADFS DDFS or any other disc filing system. The advanced and new advanced
user guide does not list them?
e.g osword &7F (DFS), &7F(ADFS), &7E(DFS), etc and how to use the calls
i.e Accumalator or X register as to be load with and output is given in
etc and any other new call i.e which appear with these Filing Systems
enabled i.e OSARGS or OSGPB etc
-----reply-----
I quote:
All OSWORD calls are entered at location &fff1 which indirects through &20c
...
OSWORD summary
A
0 Read a line from the current input stream to memory
1 Read the elapsed time clock
2 Write the elapsed time clock
3 Read interval timer
4 Write interval timer
5 Read a byte in the input/output processor memory
6 Write a byte in the input/output processor memory
7 Generate a sound
8 Define an envelope for use with the SOUND statement
9 Read pixel color at screen position X,Y
A Read dot pattern of a specific displayable character
B Read the palette value for a given logical color
End first quote
Further, there are specific instructions given for each one
Now with DFS, quote:
Read/write a sector
A=&7F indicates that a general read/write operation is required
On entry X (low byte) and Y (high byte) point to the instruction block:
Offset
0 --------------------------
Drive number
1-4 -----------
Start address inmemory of source or destination of the data
5 ------
Number of parameters
6 ----------
Command
7 -----------
onwards Parameters
----------------
Example:
Number of Parameters = 3
Command=&53 to read or &4B to write
Parameter 1=Track number
Parameter 2=Sector number
Parameter 3=&21 (specifies sector length of 256 bytes and 1 to be acted upon)
On exit
0 in the last parameter address +1 indicates a successful transfer. A failure is
indicated by a disk error number.
End quote
Hope this helps
Rick Galbraith, Winnipeg, Manitoba
rick_galbraith@...
The Spiritual Help Pages:
http://www.pangea.ca/~ricgal/spiritual.help.html
Personal Growth Online
http://members.tripod.com/~ricgal/