Program PutPixel;

Uses crt;

Var x   : Integer;
       y   : Integer;
       c   : Byte;

PROCEDURE SetMCGA;
  BEGIN
    asm
       mov        ax,0013h    { Mueve 0013h al registro ax }
       int        10h                { Llama a la interrupción 10h }
    end;
  END;

PROCEDURE SetText;
  Begin;
    asm
       mov        ax,0003h    { Mueve 0003h al registro ax }
       int        10h               { Llama a la interrupción 10h  }
    end;
  End;
 

Begin;
  setmcga;                                       { Setea la pantalla al modo 13h, 320x200x256 }

    x:=100;                                       { Desplazamiento del pixel en X }
    y:=50;                                         { Desplazamiento del pixel en Y }
    c:=2;                                           { Color del Pixel}

    mem[$A000:x+y*320]:=c;          { Coloca el pixel en las coordenadas (x,y) con el color c }
 

  Readkey;
  SetText;
End.