Problem with Color Print routine

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
KieranFoot

Problem with Color Print routine

Post by KieranFoot »

Pseudo code for print screen routine...

Code: Select all

Save registers
zero addr
Loop:
   load character
   if character = 0h then goto FinishPrint
   if character = ah or dh or 1Bh then goto Loop  
      'Skip special characters, more to come...
   poke B800h, addr, characeter
   inc addr
   poke B800h, addr, 1Fh ' Bright white on Blue text
   inc addr
   goto Loop
FinishPrint:
Restore Registers
ManOfSteel

Re:Problem with Color Print routine

Post by ManOfSteel »

And what's exactly your problem?

Code: Select all

poke B800h, addr, characeter
If you're running under protected mode, you should use B8000h.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Problem with Color Print routine

Post by Candy »

KieranFoot wrote: Pseudo code for print screen routine...

Code: Select all

   if character = ah or dh or 1Bh then goto Loop  
You might want to make that 0ah and 0dh, you confused me at first. You might've confused your assembler too :)
KieranFoot

Re:Problem with Color Print routine

Post by KieranFoot »

Sorry guys i forgot to say what the problem is,

In bochs the code work fine, but :P when i run the routine on my pc with my kernel it just displays a neverending string of 1Fh
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re:Problem with Color Print routine

Post by Brendan »

Hi,

When you say it prints a never-ending string of 0x1F, do you mean that it prints a triangle instead characters, and that the triangles are all different colours?

Or does it display "1fh1fh1fh1fh1fh1fh1fh1fh1fh1fh1fh1fh..."?


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
KieranFoot

Re:Problem with Color Print routine

Post by KieranFoot »

the later...
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Problem with Color Print routine

Post by Pype.Clicker »

i fail to see how that can be done with "regular" assembler ... can we see the real sources and know what assembler you use ?
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

Re:Problem with Color Print routine

Post by Neo »

where's your source?
Only Human
KieranFoot

Re:Problem with Color Print routine

Post by KieranFoot »

sorry guys, but the problem no longer exists :P
Post Reply