[fpc-pascal] Segmentation Error using VideoBuf

mokashe.ram at gmail.com mokashe.ram at gmail.com
Tue May 20 14:25:20 CEST 2014


Hi,

I am trying use VideoBuf Variable available in 'Video' unit but getting
error *"Program Received Signal SIGSEGV Segmentation fault". *

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

PROCEDURE blank_window(top_left_x,
                       top_left_y,
                       width,
                       height,
                       colour     : BYTE);

VAR
   x_offset,
   y_offset : BYTE;
   code     : WORD;

BEGIN
     FOR y_offset:=top_left_y TO (top_left_y+height) DO
     BEGIN
          FOR x_offset:=top_left_x TO (top_left_x+width) DO
          BEGIN
              {* MEM[$B800:(x_offset-1)*2
                        +(y_offset-1)*160]:=32;
               MEM[$B800:(x_offset-1)*2
                        +(y_offset-1)*160+1]:=colour*16; *}

              * VideoBuf^[(x_offset-1)*2
                        +(y_offset-1)*ScreenWidth]:=Ord(32);
               VideoBuf^[(x_offset-1)*2
                        +(y_offset-1)*160+1]:=Ord(colour*16);*
          END;
     END;
          UpdateScreen(false);
END;

----------------------------------------------------------------------
Thanks 
Sudarshan



--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Segmentation-Error-using-VideoBuf-tp5719293.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.



More information about the fpc-pascal mailing list