Using the data storage type defined on this page for raster images, and the draw_line function defined in this one, draw a quadratic bezier curve
(definition on Wikipedia).

include c:\cxpl\codes;          \intrinsic 'code' declarations
 
proc Bezier(P0, P1, P2);        \Draw quadratic Bezier curve
real P0, P1, P2;
def  Segments = 8;
int  I;
real T, A, B, C, X, Y;
[Move(fix(P0(0)), fix(P0(1)));
for I:= 1 to Segments do
        [T:= float(I)/float(Segments);
        A:= sq(1.-T);
        B:= 2.*T*(1.-T);
        C:= sq(T);
        X:= A*P0(0) + B*P1(0) + C*P2(0);
        Y:= A*P0(1) + B*P1(1) + C*P2(1);
        Line(fix(X), fix(Y), $00FFFF);          \cyan line segments
        ];
Point(fix(P0(0)), fix(P0(1)), $FF0000);         \red control points
Point(fix(P1(0)), fix(P1(1)), $FF0000);
Point(fix(P2(0)), fix(P2(1)), $FF0000);
];
 
[SetVid($112);          \set 640x480x24 video graphics
Bezier([0., 0.], [80., 100.], [160., 20.]);
if ChIn(1) then [];     \wait for keystroke
SetVid(3);              \restore normal text display
]