Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void outputClassCode(long regData) {
- fputs(" TASK 1\n", file);
- puts(" TASK 1");
- int classCode = (regData » 24) & 0xFF;
- char *classData;
- switch (classCode) {
- case 0:
- classData = "devices before classification";
- break;
- case 1:
- classData = "storage controllers";
- break;
- case 2:
- classData = "network controllers";
- break;
- case 3:
- classData = "display controllers";
- break;
- case 4:
- classData = "multimedia devices";
- break;
- case 5:
- classData = "memory controllers";
- break;
- case 6:
- classData = "bridges";
- break;
- case 7:
- classData = "communication controllers";
- break;
- case 8:
- classData = "system peripherals";
- break;
- case 9:
- classData = "input device controllers";
- break;
- case 10:
- classData = "docking stations";
- break;
- case 11:
- classData = "processors";
- break;
- case 12:
- classData = "serial bus controllers";
- break;
- case 13:
- classData = "wireless interface controllers";
- break;
- default:
- classData = "invalid class number";
- break;
- }
- fprintf(file, "Class name: %s\n", classData);
- printf( "Class name: %s\n", classData);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement