📄 fill.asm
字号:
;
; GRDP
;
; Copyright(c) LADsoft
;
; David Lindauer, camille@bluegrass.net
;
;
; FILL.ASM
;
; Function: Fill memory
;
;MASM MODE
.MODEL SMALL
.386
include eprints.inc
include einput.inc
include emtrap.inc
include eoptions.inc
PUBLIC fill
.CODE
;
; fill command
;
fill PROC
call WadeSpace
jz errx
call ReadAddress ; read start address
jc errx
call defDS ; Get DS
call WadeSpace
jz errx
call ReadNumber ; read length
jc errx
mov ecx,eax
sub ecx,ebx
jc errx
call WadeSpace
mov al,0 ; default fill = 0
jz gotfill
call ReadNumber ; else read a fill val
jc errx
push ax
call WadeSpace
pop ax
jnz errx
test [optdwordcommand],1
jnz gotfill
movzx ebx,bx
movzx ecx,cx
gotfill:
push es ; fill mem
mov es,dx
mov edi,ebx
db 67h
rep stosb
pop es
clc
ret
errx:
stc
ret
fill endp
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -