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

📄 mospdr.inc

📁 MMURTL(tm) Computer Operating System Ver x0.8, source code.
💻 INC
字号:
;   MMURTL Operating System Source Code
;   Copyright 1991,1992,1993, Richard A. Burgess
;   ALL RIGHTS RESERVED
;   Version x0.8
;This is MMURTL's page directory and initial page table.
;The page directory has one entry in it which is the linear address
;of it's only page table.  The page table has just enough entries
;in it to cover the OS Data, Stack and Code.
;Note that the page directory actual becomes assigned to the Monitor program
;because the OS code isn't actually a task.  Remember, OS code runs in OTHER
;job's tasks.  The monitor is the first true job launched, which can
;install services, launch programs, report errors on termination, etc.

;The page directory is 4K and is ALWAYS PAGE ALIGNED
;We fill in the first page directory entry statically, then the
;InitMem routine fills in the page table for us.
;
;A page directory or table entry with all zeros means "not used yet."
;
;The AVL bits are for OS use and are defined as follows:
;	A - 1 = Alias of someone elses physical memory
;	V - 1 = Undefined (use later for virtual memory mgmt)
;	L - 1 = Undefined (use later for virtual memory mgmt)
;The other bits are Hardware defined and set as follows:
;	D - 1 = Dirty (written to) since created.  CPU sets this.
;	A - 1 = Accessed since created. CPU sets this.
;	U - 1 = User,  0 = Supervisor. OS sets this.
;	W - 1 = Writable for user (super pages are always writable to the OS)
;	P - 1 = Present. CPU will not read or mod entry if this is Zero
;
;
;			20 Bit Address		AVL00DA00UWP
;			|					|  | ||  |||
PDir1	DD	00000000000000000011000000000101b	;PT physical address
		DD  511 DUP (0)							;511 BLANK entries

		DD	00000000000000000011000000000000b	;Shadow for PT Linear address
		DD  511 DUP (0)							;255 BLANK entries

PTbl1	DD  1024 DUP (0)						;1024 blank entries

;Some equates (MASKS) for PT Management

;             20 Bit Address      AVL00DA00UWP
MEMALIAS EQU  00000000000000000000100000000111b	;User Writable
MEMUSERD EQU  00000000000000000000000000000111b	;User Writable (Data)
MEMUSERC EQU  00000000000000000000000000000101b	;User Readable (Code)
MEMSYS   EQU  00000000000000000000000000000101b	;System Read/Write
ALIASBIT EQU  00000000000000000000100000000000b
PRSNTBIT EQU  00000000000000000000000000000001b

;-------------------- END OF MODULE ----------------------

⌨️ 快捷键说明

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