⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 system.h

📁 别人的根据linux0.11改的一个小的操作系统
💻 H
字号:
/*
 * system.h
 * 
 */
#ifndef	_SYSTEM_H
#define	_SYSTEM_H

/* move into user mode. */
#define move_to_user_mode()\
	asm(\
		"movl	%%esp,%%eax;"\
		"pushl	$0x17;"\
		"pushl	%%eax;"\
		"pushfl;"\
		"pushl	$0x0f;"\
		"pushl	$L;"\
		"iret;"\
		"L:;"\
		"movl	$0x17,%%eax;"\
		"movw	%%ax,%%ds;"\
		"movw	%%ax,%%es;"\
		"movw	%%ax,%%fs;"\
		"movw	%%ax,%%gs;"\
		::)

void set_tss_desc(int, char *);         /* Set tss descriptor. */
void set_ldt_desc(int, char *);         /* Set ldt descriptor. */
void set_ldt(char *_ldt, unsigned long limit, char *addr);
                                        /* Set ldt. */
void memcopy(char *, char *, long);     /* copy memory from source to destination. */

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -