program bmp2img; {$M 8192,0,0} { Leave memory for child process } uses dos,crt,open,graphics; var count,h, s, s2, m, hund : Word; mode : byte; begin mode:=1; if (paramstr(1)='/?') or (paramstr(1)='') then begin writeln; Writeln('BMP2IMG Written by Franz Ayestaran (c)1999'); writeln('-------'); writeln('The program loads a 320x200 256 colour <.bmp> file, then'); writeln('saves the image as a <.img> file and the palette as a'); writeln('<.pal> file.'); writeln; writeln('bmp2img '); writeln; end; if (paramstr(1)<>'/?') and (paramstr(1)<>'') then if Does_File_Exist(paramstr(1)+'.bmp') then begin if authentic_bitmap(paramstr(1)+'.bmp',mode) then begin asminitgraphics(mode); load_bitmap(paramstr(1)+'.bmp',mode); save320image(paramstr(1)+'.img',mode1addr,bitmap_height*320); save256palette(paramstr(1)+'.pal'); asmclosegraph; writeln(paramstr(1),'.bmp Converted to ',paramstr(1),'.img and ',paramstr(1),'.pal'); end; end else writeln('File not found!'); end.