public inbox for linux-8086@vger.kernel.org
 help / color / mirror / Atom feed
* Console output corruption
@ 2010-03-10 14:28 Dieter Kedrowitsch
  2010-03-10 17:53 ` Hans
  0 siblings, 1 reply; 13+ messages in thread
From: Dieter Kedrowitsch @ 2010-03-10 14:28 UTC (permalink / raw)
  To: linux-8086

Since I've made it past all the building errors I figured I'd start a
new topic for this.

I'm building elks 0.1.3 using mostly the default configuration except
for choosing PC-XT and 8088.

When I boot ELKS both in a VM and or my actual XT, every time a number
is displayed, it is displayed as a 32 digit integer with every digit
prior to the number being a zero.

So for example 3 is displayed as 00000000000000000000000000000003.

I am choosing the default of 'Direct' for the console.

Has anyone else dealt with this or could anyone offer some advice on
where to look to fix this?

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: Console output corruption
@ 2010-04-18 16:34 Hans
  2010-04-18 18:40 ` Phil Goembel
  0 siblings, 1 reply; 13+ messages in thread
From: Hans @ 2010-04-18 16:34 UTC (permalink / raw)
  To: linux-8086

----- Original Message ----- 
From: "Phil Goembel" <phil-goembel@wi.rr.com>
To: "Dieter Kedrowitsch" <dieter.kedrowitsch@gmail.com>
Cc: <linux-8086@vger.kernel.org>
Sent: Sunday, April 18, 2010 3:50 PM
Subject: Re: Console output corruption
 
> In elks/kernel/printk.c is the following code for parsing a format
> string (line 139, right after detecting a '%'):
> 
>    width = zero = '0';
>    if (c == '0')
>        zero++;
>    while (c >= '0' && c <= '9') {
>        width *= 10;
>        width += c - '0';
>        c = *fmt++;
>    }
> 
> Notice the width is being set to the value of an ASCII '0' character. I
> think it should have been set to the integer value 0 (zero) instead.
> 
> It looks like, by default, all fields will have a width of whatever the
> ASCII code for '0' (48?).
> 
> Phil
 
Phil you are the man!
 
I have just done a quick test and it seems to be fixed:
 
Booting......
 
ELKS Boot........:
Console: BIOS(15x25)
PC/XT class machine, 80188 CPU
640K base RAM.
ELKS kernel (-14544 text + 7044 data + -16516 bss)
Kernel text at 1002:0000, data at 1c75:0000
471 K of memory for user processes.
Serial driver version 0.02
ttyS0 at 0x3f8 (irq = 4) is a 16450
ttyS1 at 0x2f8 (irq = 3) is a 16450
rd driver Copyright (C) 1997 Alistair Riddoch
hd Driver Copyright (C) 1994 Yggdrasil Computing, Inc.
Extended and modified for Linux 8086 by Alan Cox.
doshd: found 0 floppy drives
ELKS version 0.1.3-pre1
Release not defined
VFS: Insert root floppy and press ENTER

Many thanks,

Hans
www.ht-lab.com



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-04-19 14:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-10 14:28 Console output corruption Dieter Kedrowitsch
2010-03-10 17:53 ` Hans
2010-03-10 18:25   ` Dieter Kedrowitsch
2010-04-18 14:50     ` Phil Goembel
2010-04-18 15:17       ` Mario Frasca
2010-04-18 15:45         ` Phil Goembel
2010-04-18 16:07           ` Mario Frasca
  -- strict thread matches above, loose matches on Subject: below --
2010-04-18 16:34 Hans
2010-04-18 18:40 ` Phil Goembel
2010-04-18 20:04   ` Mario Frasca
     [not found]     ` <v2w5a4d65ae1004181614m86200731mcc4a1fcab0cc3a56@mail.gmail.com>
2010-04-19  1:12       ` Kirn Gill
2010-04-19 14:05         ` Mario Frasca
2010-04-19 14:35           ` Mario Frasca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox