>Edit: A(djst C(py D(lete F(ind I(nsrt J(mp R(place Q(uit X(chng Z(ap  [1.2]    
Program Hello;                                                                  
                                                                                
var i;                                                                          
                                                                                
begin                                                                           
    for i:=0 to 10 do                                                             
    begin                                                                       
        writeln('Hello world');                                                  
    end;                                                                        
end.                                                                            

Compiling...                                                                    

                                                                                
                                                                                
Apple Pascal Compiler [1.2]                                                     
<   0>..                                                                        
                                                                                
var i; <<<<                                                                     
Line 2, error 6: <sp>(continue), <esc>(terminate), E(dit

Illegal symbol (maybe missing or extra ';' on line above) .  Type <sp>         
Program Hello;                                                                  
                                                                                
var i;                                                                          

begin                                                                           
    for i:=0 to 10 do                                                           
    begin                                                                       
        writeln('Hello world');                                                  
    end;                                                                        
end.                                                                            

Program Hello;                                                                  
                                                                                
var i : integer;                                                                
                                                                                
begin                                                                           
    for i:=0 to 10 do                                                           
    begin                                                                       
        writeln('Hello world');                                                 
    end;                                                                        
end.                                                                            
On peut lancer avec succès la compilation :
Apple Pascal Compiler [1.2]                                                     
<   0>.....                                                                     
HELLO    [ 2271 words]                                                          
<   5>....                                                                      
9 lines                                                                         
Smallest available space = 2271 words                                           

Command: E(dit, R(un, F(ile, C(omp, L(ink, X(ecute, A(ssem, ? [1.2]             
Running...                                                                      
Hello world                                                                     
Hello world                                                                     
Hello world                                                                     
Hello world                                                                     
Hello world                                                                     
Hello world                                                                     
Hello world                                                                     
Hello world                                                                     
Hello world                                                                     
Hello world                                                                     
Hello world

program Factorial;

type long_integer = integer[30];

procedure Calc(n : integer;var f : long_integer);
  var i : integer;
begin
  f := 1;
  for i:=1 to n do
    f := i * f;
end;

procedure FactTest;
   var number : integer;
   fact : long_integer;
begin
  repeat
  begin
    Write('n=?');
    Read(number);
    if number > 0 then
    begin
      Calc(number, fact);
      write(number);
      write('! = ');
      writeln(fact);
    end;
  end
  until number = 0;
end;

(* Entry Point *)
begin
  FactTest;
end.

Command: E(dit, R(un, F(ile, C(omp, L(ink, X(ecute, A(ssem, ? [1.2]             
Running...                                                                      
n=?8                                                                            
8! = 40320                                                                      
n=?18                                                                           
18! = 6402373705728000                                                          
n=?0 

program GraphDemo;

uses Transcend, TurtleGraphics;

type shape=packed array[0..7,0..10] of boolean;

var s : string;

procedure DrawStar(radius : integer; centerX : integer; centerY : integer);
var i, n, x, y : integer;
    angle : real;
begin
    n := 0;
    PenColor(none);
    for i:=0 to 24 do
    begin
        angle := n * 6.2831 / 24;
        x := centerX + round(radius * cos(angle));
        y := centerY + round(radius * sin(angle));
        MoveTo(x,y);
        PenColor(Orange);
        n := n + 13;
    end;
end;

procedure DrawMessage(s : string; startX : integer; startY : integer);
var i : integer;
begin
    for i:=1 to length(s) do
    begin
        PenColor(none);
        MoveTo(startX + 7 * i, startY + round(10 * sin((i-1)/2)));
        PenColor(white);
        Wchar(s[i]);
    end;
end;

procedure DrawShapes(x : integer; y : integer; n : integer);
    var sp1 : shape;
    procedure Parse(var sp : shape; row : integer; s : string);
        var col : integer;
    begin
        for col:=1 to length(s) do
          sp[row,col-1] := (s[col]<>' ');
    end;
begin
    Parse(sp1, 7, '  o     o  ');
    Parse(sp1, 6, '   o   o   ');
    Parse(sp1, 5, '  ooooooo  ');
    Parse(sp1, 4, ' oo ooo oo ');
    Parse(sp1, 3, 'ooooooooooo');
    Parse(sp1, 2, 'o ooooooo o');
    Parse(sp1, 1, 'o o     o o');
    Parse(sp1, 0, '   oo oo   ');
    for n:=1 to 10 do
        DrawBlock(sp1, 2, 0, 0, 11, 8, x + n * 20, y, 10);
end;

begin
    InitTurtle;
    DrawStar(50, 51, 102);
    DrawMessage('Hello world', 100, 150);
    DrawShapes(100, 120, 8);;
    read(s);
end.

program MemorySample;

type list=^node;
     node = record
         alloc : integer;
         memory : integer;
         next : list;
     end;

var i : integer;
    head, tail, temp : list;

begin
    head := nil;
    tail := nil;
    for i:=1 to 5 do
    begin
        new(temp);
        temp^.alloc := i;
        temp^.memory := memavail;
        temp^.next := nil;
        if head = nil then head := temp;
        if tail <> nil then
            tail^.next := temp;
        tail := temp;
    end;
    temp := head;
    while temp <> nil do
    begin
        write('After ');
        write(temp^.alloc);
        write(' allocations, available memory = ');
        writeln(temp^.memory);
        temp := temp^.next;
    end;
end.

Command: E(dit, R(un, F(ile, C(omp, L(ink, X(ecute, A(ssem, ? [1.2]             
Running...                                                                      
After 1 allocations, available memory = 19197                                   
After 2 allocations, available memory = 19194                                   
After 3 allocations, available memory = 19191                                   
After 4 allocations, available memory = 19188                                   
After 5 allocations, available memory = 19185           

Command: E(dit, R(un, F(ile, C(omp, L(ink, X(ecute, A(ssem, ? [1.2]             

Welcome APPL128, to Apple II Pascal 1.2                                         
                                                                                
Based on UCSD Pascal II.1                                                       
                                                                                
Current date is 17-Mar-81                                                       
                                                                                
Pascal system size is 128K                                                      
                                                                                
Copyright Apple Computer 1979,1980,1983                                         
Copyright U.C. Regents 1979                                                     

Command: E(dit, R(un, F(ile, C(omp, L(ink, X(ecute, A(ssem, ? [1.2]             
Running...                                                                      
After 1 allocations, available memory = 22268                                   
After 2 allocations, available memory = 22265                                   
After 3 allocations, available memory = 22262                                   
After 4 allocations, available memory = 22259                                   
After 5 allocations, available memory = 22256                                   

unit GraphStar;

interface
    uses Transcend, TurtleGraphics;
    procedure DrawStar(radius : integer; centerX : integer; centerY : integer);
    
implementation

procedure DrawStar;
var i, n, x, y : integer;
    angle : real;
begin
    n := 0;
    PenColor(none);
    for i:=0 to 24 do
    begin
        angle := n * 6.2831 / 24;
        x := centerX + round(radius * cos(angle));
        y := centerY + round(radius * sin(angle));
        MoveTo(x,y);
        PenColor(Orange);
        n := n + 13;
    end;
end;

begin
end.

program GraphMain;

(*$S+*)
(*$N+*)

uses Transcend, TurtleGraphics,
  (*$U #4:GraphStar.code*) GraphStar,
  (*$U #4:GraphText.code*) GraphText,
  (*$U #4:GraphShape.code*) GraphShape;

var s : string;

begin
    InitTurtle;
    DrawStar(50, 51, 102);
    DrawMessage('Hello world', 100, 150);
    DrawShapes(100, 120, 8);;
    read(s);
end.

program Perfs;

    uses applestuff, transcend;
    
procedure RealFact;
    var n, i, e : integer;
        fact, fract : real;
begin
    Note(100, 30);
    n := 300;
    fact := 0;
    for i:=2 to n do
        fact := fact + Log(i);
    write(n);
    write('! = ');
    e := trunc(fact);
    fract := fact - e;
    write(exp(fract * ln(10)));
    write('E');
    writeln(e);
    Note(100, 30);
end;

begin
    RealFact;
end.

Running...                                                                      
300! =  3.06040E614

10  PRINT  CHR$ (7)
20 N = 300
30 F = 0
40 L10 =  LOG (10)
50  FOR I = 2 TO N:F = F +  LOG (I): NEXT
60 F = F / L10
70 E =  INT (F)
80 FR = F – E
90  PRINT N;"! = "; EXP (FR * L10);"E";E
100  PRINT  CHR$ (7) 

program Selection;

uses applestuff;

var woody : text;
    i,j,n,best : integer;
    lines : array[1..100] of ^string;
    temp : ^string;

begin
    note(100, 50);
    { Turn off error checking so that program will do it }
    (*$I-*)
    reset(woody, 'woody.text');
    if ioresult <> 0 then begin
        writeln('Unable to open file');
        exit(program);
    end;
    { Turn on error checking }
    (*$I+*)
    n := 1;
    while not(eof(woody)) do
    begin
        new(lines[n]);
        readln(woody, lines[n]^);
        n := n + 1;
    end;
    n := n - 1;
    write(n);
    writeln(' lines');
    note(100, 50);
    for i :=1 to n-1 do
    begin
        best := i;
        for j:=best+1 to n do
            if lines[j]^ < lines[best]^ then
                best := j;
        if best <> i then
        begin
            temp := lines[i];
            lines[i] := lines[best];
            lines[best] := temp;
        end;
    end;
    note(100, 50);
    for i :=1 to n do
        writeln(lines[i]^);
    note(100, 50);
end.

10  PRINT  CHR$ (7)
20 D$ =  CHR$ (4):F$ = "WOODY.TXT"
30  PRINT D$"OPEN "F$
40  PRINT D$"READ "F$
50  DIM T$(100):N = 0
60  ONERR  GOTO 90
70  INPUT T$(N):N = N + 1
80  GOTO 70
90  PRINT D$"CLOSE "F$: ONERR  GOTO 0
100  PRINT N" TITLES"
110  PRINT  CHR$ (7)
120 N = N - 1
130  FOR I = 0 TO N
140 BE = I
150  FOR J = I + 1 TO N
160  IF T$(J) < T$(BE) THEN BE = J
170  NEXT
180  IF BE <  > I THEN A$ = T$(BE):T$(BE) = T$(I):T$(I) = A$
190  NEXT
200  PRINT  CHR$ (7)
210  FOR I = 0 TO N: PRINT T$(I): NEXT
220  PRINT  CHR$ (7)