given the code
Code:
struct DISK_REGISTER {
unsigned ready:1;
unsigned error_occured:1;
unsigned disk_spinning:1;
unsigned write_protect:1;
unsigned head_loaded:1;
unsigned error_code:8;
unsigned track:9;
unsigned sector:5;
unsigned command:5;
}
can i have
Code:
struct DISK_REGISTER *disk_reg = &DISK_REGISTER_MEMORY;
on the link
gd.tuwien.ac.at/languages/c/programming-dmarshall/node13.html
instead of the second piece of code, we have
Code:
struct DISK_REGISTER *disk_reg = (struct DISK_REGISTER *)DISK_REGISTER_MEMORY;