# Printing on screen in protected mode[15 points]

Status
Not open for further replies.

##### Full Member level 5
Hello,
can anyone help me to find an assembly code in tasm for writing to screen in protected mode of operation of x86 cpus?

#### Pinczakko

##### Full Member level 2
Hello,
can anyone help me to find an assembly code in tasm for writing to screen in protected mode of operation of x86 cpus?

hey, it's not that hard. Just switch to protected mode with flat memory model, then write directly to address range of the video buffer (0xB8000 - 0xBFFFF).

a rudimentary example would look like:
Code:
   ;switch to P-Mode here, fill ds descriptor with 4GB address range
mov ax, 'H'
mov [0xB8000], ax  ; write 'H' to screen

Next time don't ask others to solve your homework. Only hints, or you'll be banned by the moderators.

Points: 2

##### Full Member level 5
Thank you very much !

#### sp

##### Full Member level 6
Pinczakko said:
Next time don't ask others to solve your homework. Only hints, or you'll be banned by the moderators.

hi, no offense... but i dont think there is a rules for tht....

regards,
sp

#### Pinczakko

##### Full Member level 2
__BEGIN__OOT

hi sp.

I'm not so sure about it too. But IIRC, back in 2004, some new members ask a lot about their homework here and the moderators and "old members" are warning about such a penalty.

Anyway, I'm not too active in this forums in the last 1 year. Thus, I don;t know much about the current state . Nevertheless, I guess everyone agreed that no direct answer to "homework type question" is better for this community. Hints are better, since they encourage people to learn more effectively rather than feeding the direct answer to them :wink:.

__END__OOT

Status
Not open for further replies.