R. Clayton (rclayton@monmouth.edu)
(no date)
The hardware-architecture page says that there is 4 possible values for the
disk_status_register, but Memory.h has only 3. Is one missing?
Sort of. But you're looking in the wrong place. Memory::status describes only
the result of Memory::fetch() and Memory::store() calls; Memory::status doesn't
describe the results of disk operations.
The status::responses values defined in system.h describe the results of disk
operations (and system calls, and so on). However, it seems that
status::bad_memory_address described in the hardware-architecture page has
mutated into status::bad_address in system.h; I've updated the
hardware-architecture page. Thanks for pointing it out and apologies for the
inconvenience.
When i check the disk_status_register, it returns a 1. I'm assuming my read
was ok, so does this 1 correspond to status::ok and so on?
Do not replace named constants with their associated values. Always use the
named constants in preference to their associated values; to do otherwise is
just bad programming.
I'll be adding new constants to various enumerations as we go along (defining
new new system calls, for example). If you assume, for example, that
system_call::yield is 5 in your code, you're going to be in rough shape when I
add some new system calls before yield.
This archive was generated by hypermail 2.0b3 on Fri Dec 03 2004 - 12:00:06 EST