include io.inc
.model small
.stack
.data
.code
start:
mov al,10h
mov dx,283h
out dx,al
mov dx,280h
mov al,5
out dx,al
mov ah,al
again: call wait
in al,dx
cmp al,ah
jz again
push ax
call dispuib
call dispcrlf
pop ax
mov ah,al
cmp al,0
jnz again
.exit 0
wait proc
push cx
mov cx,1000
wait1: loop wait1
pop cx
ret
wait endp
end start
include io.inc
.model small
.stack
.data
.code
start:
mov dx,283h
mov al,36h
out dx,al
mov ax,1000
mov dx,280h
out dx,al
mov al,ah
out dx,al
mov dx,283h
mov al,76h
out dx,al
mov ax,1000
mov dx,281h
out dx,al
mov al,ah
out dx,al
.exit 0
end start
include io.inc
.model small
.stack
.data
msg byte 'one second passed !',0dh,0ah,0
counter byte 0
intseg word ?
intoff word ?
intimr byte ?
.code
start: mov ax,@data
mov ds,ax
mov ax,350bh
int 21h
mov intseg,es
mov intoff,bx
cli
push ds
mov dx,offset intproc
mov ax,seg intproc
mov ds,ax
mov ax,250bh
int 21h
pop ds
in al,21h
mov intimr,al
and al,0f7h
out 21h,al
mov dx,283h
mov al,36h
out dx,al
mov ax,1000
mov dx,280h
out dx,al
mov al,ah
out dx,al
mov dx,283h
mov al,76h
out dx,al
mov ax,1000
mov dx,281h
out dx,al
mov al,ah
out dx,al
mov byte ptr counter,0
sti
again: cmp byte ptr counter,5
jb again
cli
mov al,intimr
out 21h,al
mov dx,intoff
mov ax,intseg
mov ds,ax
mov ax,250bh
int 21h
sti
.exit 0
intproc proc
sti
push ax
push si
push ds
mov ax,@data
mov ds,ax
inc byte ptr counter
mov si,offset msg
call dpstri
mov al,20h
out 20h,al
pop ds
pop si
pop ax
iret
intproc endp
dpstri proc
push bx
disp1: mov al,[si]
test al,al
jz disp2
mov bx,0
mov ah,0eh
int 10h
inc si
jmp disp1
disp2: pop bx
ret
dpstri endp
end start
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· DeepSeek在M芯片Mac上本地化部署