I want to color some letters using this proc:
markText proc
mov ax,data
mov ds,ax
mov es,ax
mov cx, M
mov dx, 1
push dx
mov Counter, 0
mov si, 0
colorText:
mov ah,13h ;SERVICE TO DISPLAY STRING WITH COLOR.
push ax
mov al,[CharMas+si]
cbw
mov bp, ax;STRING TO DISPLAY.
inc si
pop ax
mov bh,0 ;PAGE (ALWAYS ZERO).
mov bl,Color
mov L, cx
xor cx, cx
mov cx,1 ;STRING LENGTH.
mov dl,0 ;X (SCREEN COORDINATE).
mov dh,b.ColorRepeat ;Y (SCREEN COORDINATE).
int 10h ;BIOS SCREEN SERVICES.
mov cx, L
inc ColorRepeat
loop ColorText
mov AX,4C00h
int 21h
markText endp
In my array (CharMas) I have got smth like: 'a','b','c'. But there is just a black blank instead of colored letters. What is wrong with my code?
P.S. it works perfect if I change index of arr to 0 or 1, e.g:
mov bp, offset CharMas[0]