tw0816.pp 662 B

1234567891011121314151617181920212223242526
  1. { %GRAPH }
  2. uses graph;
  3. var
  4. gd,gm:integer;
  5. testimage:array[1..50000] of byte; {this is plenty big}
  6. begin
  7. gd:=VESA;
  8. gm:=$100; { 640 x 400 x 256 }
  9. initgraph(gd,gm,'');
  10. if graphresult<>grOk then
  11. begin
  12. Writeln('Unable to open driver ',gd,' in mode ',gm);
  13. Halt(1);
  14. end;
  15. line(0,0,639,399);
  16. getimage(190,49,257,125,testimage);
  17. { a simple statement, and yet
  18. it throws a General Protection fault, but only with certain
  19. numbers for getimage. The numbers i have here do not produce
  20. too big an image for the array testimage, and yet it faults.
  21. Is this a bug in getimage, or is there something i am
  22. missing here?
  23. }
  24. closegraph;
  25. end.