add lab answers
This commit is contained in:
11
labcodes_answer/lab7_result/user/badsegment.c
Normal file
11
labcodes_answer/lab7_result/user/badsegment.c
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <stdio.h>
|
||||
#include <ulib.h>
|
||||
|
||||
/* try to load the kernel's TSS selector into the DS register */
|
||||
|
||||
int
|
||||
main(void) {
|
||||
asm volatile("movw $0x28,%ax; movw %ax,%ds");
|
||||
panic("FAIL: T.T\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user