hDelay MACRO thetime:REQ
mov eax,thetime
call delay
ENDM
hDelay
3000


hGotoXY MACRO
X:REQ, Y,REQ
push edx
mov dh,X
mov dl,Y
call Gotoxy
pop edx
ENDM
hGotoXY
10,20


hShowMaxXY MACRO
.data
str1 byte
"the MAXScreen is : ",0
highs byte ?
lengths byte ?
dots byte
",",0
.code
push eax
push edx
mov edx,offset str1
call writestring
call GetMaxXY
mov highs,dh
mov lengths,dl
movzx eax,highs
call Writedec
mov edx,offset dots
call writestring
movzx eax,lengths
call Writedec
call crlf
pop edx
pop eax
ENDM


hReadChar MACRO
theChar:REQ
call ReadChar
mov theChar,al
ENDM

hSetTextColor MACRO
forecolor:REQ,background:REQ
push eax
mov eax,forecolor+(background*16)
call SetTextColor
pop eax
ENDM

MulTwo MACRO
num1:REQ,num2:REQ
push eax
push ebx
push edx
mov eax,num1
mov ebx,num2
mul ebx
.IF edx ==
0
call writehex
.ELSE
push eax
mov eax,edx
call writehex
pop eax
call writehex
.ENDIF
pop edx
pop ebx
pop eax
ENDM

相关文章: