clrmem.asm
来自「一个朋友写的操作系统源码」· 汇编 代码 · 共 47 行
ASM
47 行
include comstruc.inc
cseg segment para public 'code'
assume cs:cseg
public clrmem
;/============================================================================
;
; clrmem
;
;============================================================================/
clrmem proc near ; clear 128k memory kernel will occupy
push ds
push es
mov ax,es_sym
mov es,ax
mov di,di_sym
xor ax,ax
mov cx,0ffffh
cld
repnz stosb
mov ax,es_sym
add ax,1000h
mov es,ax
mov di,di_sym
xor ax,ax
mov cx,0ffffh
cld
repnz stosb
pop es
pop ds
ret
clrmem endp
cseg ends
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?