mirror of
https://github.com/SmallPond/MIT6.828_OS.git
synced 2026-02-03 02:53:21 +08:00
12 lines
224 B
C
12 lines
224 B
C
// program to cause a general protection exception
|
|
|
|
#include <inc/lib.h>
|
|
|
|
void
|
|
umain(int argc, char **argv)
|
|
{
|
|
// Try to load the kernel's TSS selector into the DS register.
|
|
asm volatile("movw $0x28,%ax; movw %ax,%ds");
|
|
}
|
|
|