Printing text to a specified location at the tcreen

I'm wondering how to for example print "A" to a specified location on the screen. Please give an example, don't just an explanation.

Thanks

Ivar Refsdal





Comments

  • : I'm wondering how to for example print "A" to a specified location on the screen. Please give an example, don't just an explanation.

    : Thanks

    : Ivar Refsdal


    That is very simple.

    The screen segment is called 0B800h. Write 0B800h to the ES register.


    MOV AX,0B800h

    MOV ES,AX


    Then calculate the offset, here is how it is done: offset = (160 * y) + (2*x). Write the offset to the DI register.


    Then you just write the A to the memory location.

    Here is how that is done:


    MOV es:[di],65








Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories