jos/user/badsegment.c
Anish Athalye a9d7717cc4 Lab 3
2018-09-25 12:22:51 -04:00

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");
}