Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug in MetaKernel

3 views
Skip to first unread message

Arnaud AMIEL

unread,
Dec 14, 1999, 3:00:00 AM12/14/99
to
I just found a bug in MK 2.2. Maybe it has already been reported.
The BZ decompressor is bugged for instance, try to compress 45 once you
decompress it you get -45 if you compress "HELLO" you get "HELL." and
so on.
Is it present on other versions of MK, on the 49?

--
Arnaud AMIEL
------------
http://www.chez.com/amiel


Sent via Deja.com http://www.deja.com/
Before you buy.

aven...@epita.fr

unread,
Dec 14, 1999, 3:00:00 AM12/14/99
to
Hello.

There is no built-in decompressor in the MetaKernel, only an ML entry-
points that uncompress data in a similar way as BZ..

so maybe it's your BZU program that is buggy...

In article <835bed$trk$1...@nnrp1.deja.com>,

-=UssU=-

unread,
Dec 14, 1999, 3:00:00 AM12/14/99
to
The "bug" happens calling directly it by typing in the cammand line: d
BZUExt (the Sysrpl entry point) on a BZ compressed sting without the "BZ"
start.

Why is this?

Josu Orella

<aven...@epita.fr> escribió en el mensaje de noticias
835umc$c6p$1...@nnrp1.deja.com...

aven...@epita.fr

unread,
Dec 15, 1999, 3:00:00 AM12/15/99
to
Hello.

It is not possible to type MetaKernel entry points directly from the
command line. Or in fact, any entry points with an address above #80000h

The reason, is when calling the RPL compiler, it will do a NEWOB on
each command if the command's address is above 80000.

So either you call the BZUext entry point using the SYSEVAL command, or
you used MASD to compile your program.

not directly from the command line.

In order to further explain the problem, try this:
With MASD create the following list:
"!NO CODE
!RPL
{ BZUext }
@"
ASM
You will get a list
Do:
DUP LIST-> and immediately after ->LIST
Try SAME, you will see that you don't get the same list, as TOTEMPOB
was applied on the entry points... And of course this will not work
anymore.

Actually, if it works "a little bit" when using the command line,
you're really lucky, it could completely crash your calculator.

Hope this help
Jean-Yves

In article <8366v0$2n...@eui1nw.euskaltel.es>,


"-=UssU=-" <m...@mi.mi> wrote:
> The "bug" happens calling directly it by typing in the cammand line: d
> BZUExt (the Sysrpl entry point) on a BZ compressed sting without
the "BZ"
> start.
>
> Why is this?
>
> Josu Orella
>
> <aven...@epita.fr> escribió en el mensaje de noticias
> 835umc$c6p$1...@nnrp1.deja.com...
> > Hello.
> >
> > There is no built-in decompressor in the MetaKernel, only an ML
entry-
> > points that uncompress data in a similar way as BZ..
> >
> > so maybe it's your BZU program that is buggy...
> >
> >
> >
> > In article <835bed$trk$1...@nnrp1.deja.com>,
> > Arnaud AMIEL <aam...@my-deja.com> wrote:
> > > I just found a bug in MK 2.2. Maybe it has already been reported.
> > > The BZ decompressor is bugged for instance, try to compress 45
once
> > you
> > > decompress it you get -45 if you compress "HELLO" you get "HELL."
and
> > > so on.
> > > Is it present on other versions of MK, on the 49?
> > >

-=UssU=-

unread,
Dec 15, 1999, 3:00:00 AM12/15/99
to
I think I didnt express correctly myself. In the last part of the manual
there additional sysrpl entry points and one of those is BZUExt.
Additionally there is a command (--> + d ) that allows to type the entry
point. This is what I actually did.


<aven...@epita.fr> escribió en el mensaje de noticias

8388kv$1gu$1...@nnrp1.deja.com...

Arnaud AMIEL

unread,
Dec 16, 1999, 3:00:00 AM12/16/99
to
I have tryed BZUExt from inside a program and got the bug. But just one
thing is that I could only produce it using objects that compress to
bigger objects than they were at first 45 or "HELLO" for instance. For
bigger objects I didn't find any problem yet.

In article <838rk6$nb...@eui1nw.euskaltel.es>,

--


Arnaud AMIEL
------------
http://www.chez.com/amiel

aven...@epita.fr

unread,
Dec 16, 1999, 3:00:00 AM12/16/99
to
What is even more strange is that your compressor allow you to compress
object like "HELLO"

When using BZ (the library) you get an error message : Unable to
compress..

Maybe your object was incorrectly compress.

Because if I'm 100% sure of something, is that BZUext is not buggy..
It is used everywhere in the MetaKernel v2.0 (CHARS, CHOOSE, etc...)

Jean-Yves


In article <83aj9v$ofg$1...@nnrp1.deja.com>,

Arnaud AMIEL

unread,
Dec 16, 1999, 3:00:00 AM12/16/99
to
In article <83avov$19f$1...@nnrp1.deja.com>,

aven...@epita.fr wrote:
> What is even more strange is that your compressor allow you to
compress
> object like "HELLO"
>
> When using BZ (the library) you get an error message : Unable to
> compress..
>
> Maybe your object was incorrectly compress.
>
> Because if I'm 100% sure of something, is that BZUext is not buggy..
> It is used everywhere in the MetaKernel v2.0 (CHARS, CHOOSE, etc...)
>
I am using the standalone BZ by Mika, not the library, and if I use the
BZU by Mika I compress and uncompress without problem.
If, once the first two letters "BZ" have been removed, I use BZUext
then I get some problem. And I am 100% sure of this. I am also 100%
sure that I haven't found any bug yet when compression leads to
reduction of size that is I think what is used in MK because the other
case is useless but can happen with programs that automaticaly compress
any output.

If you think that you are right, just tell me how to do to make it
working fine, I will be pleased to know and I don't think it will take
you very long. Maybe less time than typing this message.

At least I just wanted to warn anyone that there could be some problem
(like getting -45 when at first you had 45) maybe avoided by
compressing only when needed.

Thank you

aven...@epita.fr

unread,
Dec 16, 1999, 3:00:00 AM12/16/99
to

Hello.

I've just wondered...

How do you get rid of the 2 letters BZ at the beginning of the
string ???

Jean-Yves

In article <83b4ng$5b5$1...@nnrp1.deja.com>,


Arnaud AMIEL <aam...@my-deja.com> wrote:
> I am using the standalone BZ by Mika, not the library, and if I use
the
> BZU by Mika I compress and uncompress without problem.
> If, once the first two letters "BZ" have been removed, I use BZUext
> then I get some problem. And I am 100% sure of this. I am also 100%
> sure that I haven't found any bug yet when compression leads to
> reduction of size that is I think what is used in MK because the other
> case is useless but can happen with programs that automaticaly
compress
> any output.
>
> If you think that you are right, just tell me how to do to make it
> working fine, I will be pleased to know and I don't think it will take
> you very long. Maybe less time than typing this message.
>
> At least I just wanted to warn anyone that there could be some problem
> (like getting -45 when at first you had 45) maybe avoided by
> compressing only when needed.
>
> Thank you

Joėl Bourquard

unread,
Dec 16, 1999, 3:00:00 AM12/16/99
to
> Hello.
>
> I've just wondered...
>
> How do you get rid of the 2 letters BZ at the beginning of the
> string ???
>
> Jean-Yves

I guess JYA is right: BZ can generate strings of any length, including an
odd number of nibbles, and if you apply 3 OVER SIZE SUB on such a
"string", it will corrupt the last nibble of the last literal. Thus the
wrong result !

This is assumption only - can't verify this (I don't have MK2)

Joėl

Arnaud AMIEL

unread,
Dec 17, 1999, 3:00:00 AM12/17/99
to

> Hello.
>
> I've just wondered...
>
> How do you get rid of the 2 letters BZ at the beginning of the
> string ???
>
> Jean-Yves
>
I am using THREE LAST$
But it also happen with "BZ" "" SREPL DROP

This could be what Joël Bourquard is explaining but I have no idea how
BZ is working and I would be more than glad to get the correct way to
take off the BZ letters or maybe I have to find a BZ that does not put
the BZ letters or change BZ myself.
If anyone could give me the correct way to take of the letters I would
be very happy


--
Arnaud AMIEL
------------
http://www.chez.com/amiel

ben wheeler

unread,
Dec 17, 1999, 3:00:00 AM12/17/99
to

Joėl Bourquard <numl...@hotmail.com> wrote in message
news:83bhnb$dti$1...@news1.sunrise.ch...

> I guess JYA is right: BZ can generate strings of any length, including
an
> odd number of nibbles, and if you apply 3 OVER SIZE SUB on such a
> "string", it will corrupt the last nibble of the last literal. Thus the
> wrong result !
>
> This is assumption only - can't verify this (I don't have MK2)
>
> Joėl

And you are just NOW finding this out? What a dip!


aven...@epita.fr

unread,
Dec 17, 1999, 3:00:00 AM12/17/99
to
Hello

SREPL works byte by byte, so if your string has an odd size it won't
work properly.

To remove the BZ header, try this (you can't use SUB$ neither SUB !!):
I'm writing it on the fly, so check it :)
Work both on the HP49/48

"SAVE
A=DAT1.A D1=A D1+5 C=DAT1.A C-9.A GOC .err R1=C.W
D1+5 A=0.A A=DAT1.4
C=0.A LCASC(2)BZ
?A#C.A -> { %Not a BZ file
*.err
LOAD
GOSBVL 04FBB %Insuff mem error (I can't remember the mnemonic)
}
C=R1.W GOSBVL MAKE$N AD0EX D1=A
GOSBVL D0=DSKTOP
A=DAT0.A D0=A D0+14 %Skip prologue, size and BZ
C=R1.W GOSBVL MOVEDOWN
LOAD A=R0.W DAT1=A.A RPL
@"


Cheers
Jean-Yves


In article <83d78p$i7s$1...@nnrp1.deja.com>,


Arnaud AMIEL <aam...@my-deja.com> wrote:
>
> > Hello.
> >
> > I've just wondered...
> >
> > How do you get rid of the 2 letters BZ at the beginning of the
> > string ???
> >
> > Jean-Yves
> >
> I am using THREE LAST$
> But it also happen with "BZ" "" SREPL DROP
>

> This could be what Joėl Bourquard is explaining but I have no idea how

Barry

unread,
Dec 17, 1999, 3:00:00 AM12/17/99
to
I wrote a program for my company that had a bug. This program processed
several million records daily for seven years. It proved itself to be so
reliable that everyone began to always assume if there was a problem, that
it couldn't possibly be my program.

Then it found a record it didn't like. When no other problems could be
found I was called in to take a look. Still, no-one thought it was my
program. I looked at the record it choked on and my source and there it
was. That one unlikely combination that I had overlooked and had to happen
someday.

I guess that bug is one of the things I'm most proud of in a 35 year
programming carreer. :)

Barry

ben wheeler <whee...@msn.com> wrote in message
news:83djr7$386$1...@ionews.ionet.net...

aven...@epita.fr

unread,
Dec 17, 1999, 3:00:00 AM12/17/99
to
Hello.

Well... Here I still think that there is no bug in my BZU program :)
If this is a bug, then as you, I'm really proud of it...

Jean-Yves


In article <5Nt64.33967$43.3...@dfw-read.news.verio.net>,


"Barry" <bar...@yahoo.com> wrote:
> I wrote a program for my company that had a bug. This program
processed
> several million records daily for seven years. It proved itself to
be so
> reliable that everyone began to always assume if there was a problem,
that
> it couldn't possibly be my program.
>
> Then it found a record it didn't like. When no other problems could
be
> found I was called in to take a look. Still, no-one thought it was my
> program. I looked at the record it choked on and my source and there
it
> was. That one unlikely combination that I had overlooked and had to
happen
> someday.
>
> I guess that bug is one of the things I'm most proud of in a 35 year
> programming carreer. :)
>
> Barry

Arnaud AMIEL

unread,
Dec 17, 1999, 3:00:00 AM12/17/99
to
I see the point now. I will try this and give you the result or maybe I
will go on hollidays and give you the result later.
I was just hoping there would be a simpler solution. To this point, it
is nearly better to use Mika's UBZ. Anyway, it is worth a try.
Thank you

In article <83dtdn$2h1$1...@nnrp1.deja.com>,

> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

--


Arnaud AMIEL
------------
http://www.chez.com/amiel

Arnaud AMIEL

unread,
Dec 18, 1999, 3:00:00 AM12/18/99
to
I haven't tryed the code yet but I cut the string by editing the result
of ->H and the H-> again and now it is working. So no bug, just a lack
of knowledge from me of the BZ strings or a lack of warning in the MK
docs. Surely both.
Anyway, thank you for the help. It has been very useful


In article <83dtdn$2h1$1...@nnrp1.deja.com>,
aven...@epita.fr wrote:
> Hello
>
> SREPL works byte by byte, so if your string has an odd size it won't
> work properly.
>
> To remove the BZ header, try this (you can't use SUB$ neither SUB !!):
> I'm writing it on the fly, so check it :)
> Work both on the HP49/48
>
> "SAVE
> A=DAT1.A D1=A D1+5 C=DAT1.A C-9.A GOC .err R1=C.W
> D1+5 A=0.A A=DAT1.4
> C=0.A LCASC(2)BZ
> ?A#C.A -> { %Not a BZ file
> *.err
> LOAD
> GOSBVL 04FBB %Insuff mem error (I can't remember the mnemonic)
> }
> C=R1.W GOSBVL MAKE$N AD0EX D1=A
> GOSBVL D0=DSKTOP
> A=DAT0.A D0=A D0+14 %Skip prologue, size and BZ
> C=R1.W GOSBVL MOVEDOWN
> LOAD A=R0.W DAT1=A.A RPL
> @"
>
> Cheers
> Jean-Yves
>

0 new messages