21,459
社区成员
发帖
与我相关
我的任务
分享
.386
.model flat, stdcall
option casemap:none
include c:\masmplus\include\windows.inc
include c:\masmplus\include\kernel32.inc
includelib c:\masmplus\lib\kernel32.lib
include c:\masmplus\include\user32.inc
includelib c:\masmplus\lib\user32.lib
.data
MsgBoxCaption db "Result", 0
MsgBoxText db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
.code
start:
mov al, 97h
call ShowAL
invoke MessageBox, NULL, addr MsgBoxText, addr MsgBoxCaption, MB_YESNOCANCEL
invoke ExitProcess, NULL
ShowAL proc
mov dl, al
mov cl, 04
shr al, cl
mov cx, 02h
xor ebx, ebx
mov esi, offset MsgBoxText
;mov cx, 1
Low4bit:
;invoke MessageBox, NULL, addr MsgBoxText, addr MsgBoxCaption, MB_YESNOCANCEL
cmp al, 09
jbe larger
add al, 07h
larger:
add al, 30h
mov [esi], al
inc esi
mov al, dl
and al, 0fh
loop Low4bit
ret
ShowAL endp
end start
dec cx
cmp cx, 0
jne Low4bit