On Fri, 22 Sep 2000, Keith Owens wrote:

> On Thu, 21 Sep 2000 18:54:33 -0400 (EDT), 
> Byron Stanoszek <[EMAIL PROTECTED]> wrote:
> >On Fri, 22 Sep 2000, Keith Owens wrote:
> >> The idea is to write characters direct to the video screen during
> >> booting using a macro called VIDEO_CHAR.
> >
> >Why not just redirect printk() to output a string of characters one by one
> >using VIDEO_CHAR until the console subsystem is initialized. You can use a
> >statically defined int to keep track of what row & column you're on. There is
> >no need to be so cryptic about the readout.
> 
> Overhead and difficulty to use from assembler.  VIDEO_CHAR() generates
> a single mov instruction, calling printk and looping to do output does
> a lot more code. You can do the equivalent of VIDEO_CHAR direct from
> assembler without disturbing any registers, to call printk means saving
> registers around the call and constructing text strings in the
> assembler code.

It shouldn't be a big deal. It goes from a mov to a push/call. Readability
goes up enormously. I wrote a bootloader for an embedded box recently and
the first piece I wrote was an asm version of printf, followed by a
register dump (named doh).

--
 "Love the dolphins," she advised him. "Write by W.A.S.T.E.." 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to