mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-05 18:08:05 +02:00
Updated GO32 example; it contained errors
This commit is contained in:
parent
0382a5e92e
commit
facb2866e3
@ -373,6 +373,7 @@ calculated by adding the value returned by
|
|||||||
\begin{FPCList}
|
\begin{FPCList}
|
||||||
\item[Example]
|
\item[Example]
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
|
|
||||||
uses go32;
|
uses go32;
|
||||||
|
|
||||||
var VGAsel : word;
|
var VGAsel : word;
|
||||||
@ -386,17 +387,20 @@ begin
|
|||||||
VGAsel := allocate_ldt_descriptors(1);
|
VGAsel := allocate_ldt_descriptors(1);
|
||||||
{ allocate one descriptor to the VGA }
|
{ allocate one descriptor to the VGA }
|
||||||
set_segment_base_address(VGAsel,
|
set_segment_base_address(VGAsel,
|
||||||
get_linear_address($A0000,
|
get_linear_addr($A0000,$FFFF));
|
||||||
$FFFF));
|
|
||||||
{ set the base address to the VGA }
|
{ set the base address to the VGA }
|
||||||
set_segment_limit(VGAsel, $FFFF);
|
set_segment_limit(VGAsel, $FFFF);
|
||||||
{ set the limit of the descriptor }
|
{ set the limit of the descriptor }
|
||||||
{...}
|
{...}
|
||||||
seg_fillchar(VGAsel, 100*320+6, 1, 15);
|
seg_fillchar(VGAsel, 100*320+100, 1, #15);
|
||||||
|
|
||||||
|
|
||||||
{ put a pixel at (6/100) in color 15 }
|
{ put a pixel at (6/100) in color 15 }
|
||||||
readln;
|
readln;
|
||||||
{...}
|
{...}
|
||||||
free_ldt_descriptor(sel);
|
free_ldt_descriptor(VGAsel);
|
||||||
|
|
||||||
r.realeax := $3; realintr($10, r);
|
r.realeax := $3; realintr($10, r);
|
||||||
{ set textmode again }
|
{ set textmode again }
|
||||||
{...}
|
{...}
|
||||||
@ -460,7 +464,7 @@ begin
|
|||||||
{ set VGA mode 13h }
|
{ set VGA mode 13h }
|
||||||
VGASel := segment_to_descriptor($A000);
|
VGASel := segment_to_descriptor($A000);
|
||||||
{...}
|
{...}
|
||||||
seg_fillchar(VGAsel, 100*320+6, 1, 15);
|
seg_fillchar(VGAsel, 100*320+6, 1, #15);
|
||||||
{ put a pixel at (6/100) in color 15 }
|
{ put a pixel at (6/100) in color 15 }
|
||||||
readln;
|
readln;
|
||||||
{...}
|
{...}
|
||||||
|
Loading…
Reference in New Issue
Block a user