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

📄 gdt_new.inc

📁 John Fine的OS模型// 源代码// C & ASM// 英文
💻 INC
字号:
; gdt_new.inc   symbols and macros for building descriptors
; Version 2.3, Mar 16, 1998
; Sample code
; by John S. Fine  johnfine@erols.com
; I do not place any restrictions on your use of this source code
; I do not provide any warranty of the correctness of this source code
;_____________________________________________________________________________
;
;  Use gdt.inc to include this file.
;  This section was split out of gdt.inc because of a bug in NASM version
;  0.97 handling of macro definitions within an %if.
;
;  This varient of the macro definitions is used if my %00 feature is present
;  in NASM
;_____________________________________________________________________________

%macro start_gdt 0
%push table
%$startoftable:
	dw	%$limitoftable
	dd	%$startoftable
	dw	0
%endmacro

%macro end_gdt 0
%$limitoftable	equ	$-%$startoftable-1
%pop
%endmacro

%macro desc 3
%ifid %00
%00 equ $-%$startoftable
%endif
	GLOBAL	?fixD%%jloc
?fixD%%jloc:
	dd	(%2) + ( ( (%3) ^ D_PRESENT ) << 16 ) , (%1)
%endmacro

⌨️ 快捷键说明

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