// This data structure is the interface between the simulated CPU and the // simulated disk. The CPU passes a "DiskTask" to request an action // from the disk; the disk returns the same "DiskTask" when that action // has been completed. public class DiskTask { int diskAddress, // Address on disk memAddress, // address in RAM size; // number of words to read; boolean write; // true if the request is to write to disk; false if // request is to read from disk public DiskTask (int da, int mem, int s, boolean wr) { diskAddress = da; memAddress = mem; size = s; write = wr; } }