Bitmaps crash win 96/98 but not NT

The following code causes win 95/98 to crash, while NT runs it just
fine. Why ? How can I make it run on Win 95/98?

Please help.

Thomas K

------------------------------------

To test the code below, you need a bitmap called ledr.bmp. The one I
uses was 12x12 pixels in 16 colors.

The code below is for a tbutton called start on the main form. Apart
from what you see, no other code is needed to run the test.

procedure TForm1.StartClick(Sender: TObject);
var
  x: integer;
  AImage: array[0..999] of timage;
  ABitmap: array[0..999] of tbitmap;
begin
  for X := 0 to 999 do begin
    ABitmap[X] := tbitmap.create;
    ABitmap[X].LoadFromFile('ledr.bmp');

    AImage[X] := timage.create(self);
    AImage[X].hide;
    AImage[X].parent := self;
    AImage[X].top := (x div 100)*10;
    AImage[X].left := (x mod 100)*10;
    AImage[X].AutoSize := true;
    AImage[X].picture.Bitmap.assign(ABitmap[X]);
    AImage[X].show;
    Start.caption := inttostr(x);
    application.processmessages;
  end;
  for X := 0 to 999 do
    ABitmap[X].free;
end;