What did I do?

Tomislav Greguric greguric at stud.uni-frankfurt.de
Thu Jun 22 11:47:35 PDT 2000


Hi Georg!

On Thu, 22 Jun 2000, Georg Wilckens wrote:

> On Thu, Jun 22, 2000 at 03:33:28PM +0100, Sam BC wrote:
> > Every computer program has at least one bug somewhere... ask any
> > programmer... (at least the honest ones)
> 
> Hmmm...
> 
> Every program has at least one bug and can be shortened by at least
> one instruction -- from which, by induction, one can deduce that every
> program can be reduced to one instruction which doesn't work.

OK, proof it... ;-)

Let's take an assembler program, for example the following one. It is
in MIPS assembler. If you want to test it, get the SPIM (an assembly
language MIPS R2000/R3000 simulator) by James R. Larus and run it
there. Or compile it on a real MIPS machine. Or just trust me that it
does indeed print ``Shorten me :-)'', followed by a newline, onto the
screen.

--< cut here >--

        .data
titel:  .asciiz "Shorten me :-)\n"

	.text
main:
	li $v0, 4
	la $a0, titel
	syscall

--< cut there >--


> Georg Wilckens <durandal at nfinity.de>

Tomislav
--
Mail archive: http://www.pcrdallas.com/mail-archives/lfs-discuss
IRC access: server: irc.linuxfromscratch.org port: 6667 channel: #LFS
Unsubscribe: email lfs-discuss-request at linuxfromscratch.org and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)



More information about the lfs-dev mailing list