马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
just for fun
很简单的一个小游戏 你们能在第几次猜中呢?
先附上我的代码include irvine32.inc
.data
array1 BYTE "Welcome to FishC.com",0
array2 BYTE "My name is xiaopao",0
array3 BYTE "^_^ Hope you can have fun!",0
array4 BYTE "Guess the number!(0-100)",0
array5 BYTE "Wrong number!guess it again!",0
array6 BYTE "^3^ congratulations!",0
.code
main PROC
mov eax,yellow+(blue*16) ;显示第一个字符串
call SetTextColor
mov edx,OFFSET array1
call WriteString
mov ecx,4
L1: call Crlf
loop L1
mov eax,cyan +(white*16) ;显示第二个字符串
call SetTextColor
mov edx ,OFFSET array2
call WriteString
mov ecx,4
L2: call Crlf
loop L2
mov eax,lightBlue+(brown*16) ;显示第三个字符串
call SetTextColor
mov edx ,OFFSET array3
call WriteString
mov ecx,4
L3: call Crlf
loop L3
mov eax,lightGray+(black*16)
call SetTextColor
call WaitMsg
call Clrscr
mov edx,OFFSET array4
call WriteString
L4: call ReadInt
cmp eax,12
jz L5
mov edx,OFFSET array5
call WriteString
call Crlf
loop L4
L5:mov edx,OFFSET array6
call WriteString
exit
main endp
end main
附加一个exe文件:
能不能用就看你们有没有那么环境了
test.zip
(4.84 KB, 下载次数: 44)
在来附加一个效果:
|