Code: Select all
XOR eax, eax ;Clear EAX for calculation
MOV al, dh ;Load the accumulator with start row
MOV cx, 80 ;Load cx with 80 because MUL require source
MUL cl ;Multiply by Screen Width - result is a word in AX
MOV cl, dl ;Load cx with the column
ADD ax, cx ;Adding the column to the result
MOV cl, 2 ;Multiply the result by two because
MUL cl ;every symbol is two bytes - one ASCII and one attribute
ADD eax, 0xB8000 ;Adding base address of Video Mem
P.S. Sorry for the bad english