汇编关机代码

来源:互联网 发布:java获取系统当前时间 编辑:程序博客网 时间:2024/06/04 01:25
;$$ - start positionbits 16cpu 8086org 07c00hmov ax,csmov ds,axmov es,ax;output bootMsg -- first msgmov ax,bootMsg  ;input parameter msgmov cx,bootMsgLen;str lengthmov dh,00h ;第1行call ShowMsg;output str;不行;mov ax,5301h;xor bx,bx;int 15h;不行;MOV AX,530EH ;高级电源管理功能,配置连接设备的版本号 ;XOR BX,BX ;系统BIOS设备ID ;MOV CX,0102H ;CH主版本号CL从版本号 ;INT 15H ;关机代码成功MOV AX,5307H ;高级电源管理功能,设置电源状态 MOV BX,0001H ;设备ID,1:所有设备 MOV CX,0003H ;状态,3:表示关机 INT 15H jmp $ ;loop at current postionShowMsg:mov bp,axmov ax,01301hmov bx,000chmov dl,0 ;列 dh 是行int 10hretbootMsg: db "Hello,World!"bootMsgLen equ $-bootMsg;$ -current position times 510-($-$$) db 0dw 0xaa55

原创粉丝点击