program bars; uses crt,graphics,mouse; var mode,colour : byte; i, code, pause_ : integer; direction : boolean; scroll : boolean; exit : boolean; begin mode:=1; direction:=true; scroll:=false; exit:=false; pause_:=50; asminitgraphics(mode); rgbw_palette; if paramstr(1)='0' then palettegraph(mode); if paramstr(1)='2' then dump_palette(mode); if paramstr(1)='' then dump_palette(mode); pause_:=5; if paramstr(2)<>'' then begin Val(ParamStr(2), i, code); if (i < 11) and (i > -1 ) then pause_:=i; end; OutTextXYuser(38,10,255,'*** RGB Palette Scroller ***',seg(mode1addr^)); OutTextXYuser(26,20,255,'Written By Franz Ayestaran 1997',seg(mode1addr^)); OutTextXYuser(25,150,255,'Click Top Of Screen To Scroll UP',seg(mode1addr^)); OutTextXYuser(1,160,255,'Click Bottom Of Screen To Scroll Down',seg(mode1addr^)); OutTextXYuser(1,170,255,'Click Middle Of Screen To Stop Scroll',seg(mode1addr^)); OutTextXYuser(45,180,255,'Click Top Left Screen Exit',seg(mode1addr^)); if init_mouse then begin set_pointer_limits(0,0,620,184); repeat Get_Pointer_location(false,0,2,false); if (Mousex=0) and (Mousey=0) and (MouseButton=1)then exit:=true; if (Mousey=0) and (MouseButton=1)then begin scroll:=true; direction:=true; end; if (Mousey=184) and (MouseButton=1)then begin scroll:=true; direction:=false; end; if (Mousey<>184) and (MouseY<>00) and (MouseButton=1)then begin scroll:=false; end; if (Mousey<>184) and (MouseY<>00) and (MouseButton=2)then begin colour:=asmgetpixel(mousex,mousey); setRGB(0,getred(colour),getgreen(colour),getblue(colour)); end; if scroll then begin shift_palette_one(1,254,direction); delay(pause_*10); end; until exit; end; asmclosegraph; end.