[SunRescue] Re: [SunRescue]Tiny executables

Paul Sladen rescue at sunhelp.org
Thu May 17 08:21:30 CDT 2001


I remember having plied several days into writing ASM (x86) PCX
displayers.

IIRC it:

  Switched the VGA in 320x200x8bit mode
  Read argv[1]
  Checked the file existed and was of the correct dimensions
  Decompessed (PCX is kinda RLE) the file to 0xa0000
  Bilted the Palette to the screen
  Quit on Keypress

I got mine down to 102 bytes; then I found someone else's 98byte one and
managed to shave another 1byte off that down to 97bytes!

Sad, Yeah, Yeah...
Paul

PHS, I also used to set the first three bytes of DOS .COM files to my
initials `PHS'.. I think they were two stack ops and a move?

On Thu, 17 May 2001, Ken Hansen wrote:

> In the Mainframe operating systems, starting with OS/360 back in th
> emid-sixties, they had utility called IEFBR14.
> 
> IEFBR14 was, simply, a Branch and Return, Register 14 instruction (aprox. 4
> bytes wide, IIRC the IBM 360 was 32-36 bit processor). Again, it's purpose
> was to provide an execution "stub" to give the OS a cahnce to do some file
> maint.
> 
> Later, the program *ballooned* to two instructions - an instruction was
> added to set the return register to zero, *then* Branch and Return, based on
> the value in register 14.
> 
> It is/was an extremely powerful utility for a mainframe JCL coder.
> 
> Ken
> 
> ----- Original Message -----
> From: "Paul Sladen" <paul at sladen.org>
> To: <rescue at sunhelp.org>
> Sent: Thursday, May 17, 2001 7:19 AM
> Subject: Re: [SunRescue] SS5 upgrade
> 
> 
> > On Wed, 16 May 2001, Dave Reader wrote:
> >
> > > As an interesting (or maybe not) deviation from the topic, a silly
> thread
> > > came up on another list i take today.. about the size of /bin/true (and
> > > how it really is bloated for something that does nothing). It was noted
> > > that SunOS and Solaris /bin/true is a shell script which just exits, and
> > > hence fires up a shell to do it. My linux boxen use a binary, so I
> looked
> > > at how it varies by platform...
> >
> > The Page to check out here is:
> >
> >   http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html
> >
> > How to build a 45 byte ELF binary executable /bin/true.
> >
> > Have Fun,
> > Paul
> >
> > (hint; what happens if you put the executable code *inside* the ELF header
> ;-)
> >
> > --
> > h: 0115 922 7162   w: 0115 953 1803
> >
> > _______________________________________________
> > rescue maillist  -  rescue at sunhelp.org
> > http://www.sunhelp.org/mailman/listinfo/rescue
> 
> _______________________________________________
> rescue maillist  -  rescue at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/rescue
> 

--
h: 0115 922 7162   w: 0115 953 1803




More information about the rescue mailing list