entry.s

来自「jos lab3代码」· S 代码 · 共 38 行

S
38
字号
#include <inc/mmu.h>#include <inc/memlayout.h>.data// Define the global symbols 'envs', 'pages', 'vpt', and 'vpd'// so that they can be used in C as if they were ordinary global arrays.	.globl envs	.set envs, UENVS	.globl pages	.set pages, UPAGES	.globl vpt	.set vpt, UVPT	.globl vpd	.set vpd, (UVPT+(UVPT>>12)*4)// Entrypoint - this is where the kernel (or our parent environment)// starts us running when we are initially loaded into a new environment..text.globl _start_start:	// See if we were started with arguments on the stack	cmpl $USTACKTOP, %esp	jne args_exist	// If not, push dummy argc/argv arguments.	// This happens when we are loaded by the kernel,	// because the kernel does not know about passing arguments.	pushl $0	pushl $0args_exist:	call libmain1:      jmp 1b

⌨️ 快捷键说明

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