; Testing Colors (colors.asm)
; Testing SetTextColor and GetTextColor.
INCLUDE Irvine32.inc
.data
str1 BYTE "Sample string, in color",0dh,0ah,0
.code
main PROC
mov ax,blue + (yellow * 16) ;ax存儲顏色,最終顯示的效果,他的值爲 前景色+背景色*16
call SetTextColor ;設置控制檯輸出的前景色以及背景色
mov edx,OFFSET str1 ;設置WriteString所需要的參數edx
call WriteString
call GetTextColor
call DumpRegs ;以十六進制的形式顯示EAX,EBX,EDX,ESI,EDI,EBP,ESP,EFLAGS,EIP寄存器
call WaitMsg
exit
main ENDP
END main
028.使用動態鏈接庫控制控制檯輸出的前景色以及背景色
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.