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

📄 lesson6.asm

📁 自己动手写的操作系统文档
💻 ASM
字号:
;----------------------------------------------------------------------; Hello World Operating System;; Joel Gompert 2001;; Disclaimer: I am not responsible for any results of the use of the contents;   of this file;----------------------------------------------------------------------; --------------------------------------------;  Here is the operating system entry point; --------------------------------------------begin:	mov	ax, cs		; Get the current segment	mov	ds, ax		; The data is in this segment	cli			; disable interrupts while changing stack	mov	ss, ax		; We'll use this segment for the stack too	mov	sp, 0xfffe	; Start the stack at the top of the segment	sti			; Reenable interrupts	mov	si, msg		; load address of our message	call	putstr		; print the messagehang:	jmp	hang		; just loop forever.; --------------------------------------------; data for our programmsg	db	'Hello, World!', 0; ---------------------------------------------; Print a null-terminated string on the screen; ---------------------------------------------putstr:	lodsb		; AL = [DS:SI]	or al, al	; Set zero flag if al=0	jz putstrd	; jump to putstrd if zero flag is set	mov ah, 0x0e	; video function 0Eh (print char)	mov bx, 0x0007	; color	int 0x10	jmp putstrputstrd:	retn

⌨️ 快捷键说明

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