asm change cmd background color

后端 未结 1 1197
醉梦人生
醉梦人生 2021-01-25 11:56

I wrote the part that changes the text color, but I can\'t find a way to change the background color, this code is for tasm assembly:

model small
stack 256
.data         


        
相关标签:
1条回答
  • 2021-01-25 12:51

    In BIOS function 6, BH contains an 8-bit color. Its lower 4 bits specify the foreground color while the upper 4 bits specify the background color. Try, for example, mov bh, 14h instead of mov bh, 4h. It should start writing red on blue instead of red on black.

    0 讨论(0)
提交回复
热议问题