Initial release
# Bitte geben Sie eine Commit-Beschreibung für Ihre Änderungen ein. Zeilen,
# die mit '#' beginnen, werden ignoriert, und eine leere Beschreibung
# bricht den Commit ab.
#
# Auf Branch main
#
# Initialer Commit
#
# Zum Commit vorgemerkte Änderungen:
#	neue Datei:     .gitignore
#	neue Datei:     README.md
#	neue Datei:     bin/aps1demo.dat
#	neue Datei:     build.sh
#	neue Datei:     images/aps-welcome.gif
#	neue Datei:     images/balken.gif
#	neue Datei:     images/plotsin.gif
#	neue Datei:     images/tropfen.gif
#	neue Datei:     images/uhr.gif
#	neue Datei:     src/aps1-hp41-balken.txt
#	neue Datei:     src/aps1-hp41-plotsin.txt
#	neue Datei:     src/aps1-hp71-uhr.txt
#	neue Datei:     src/aps1-hp7x-lissajous.txt
#	neue Datei:     src/aps1-hp7x-sterne.txt
#	neue Datei:     src/aps1-hp7x-tropfen.txt
#
# ------------------------ >8 ------------------------
# Ändern oder entfernen Sie nicht die obige Zeile.
# Alles unterhalb von ihr wird ignoriert.
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6ec3f9b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+.DS_Store
+.github/copilot-instructions.md
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..b603d47
--- /dev/null
+++ b/README.md
@@ -0,0 +1,74 @@
+# Advanced Pac Screen 1.1 – Demo Programs
+
+This archive contains the example programs from the Advanced Pac Screen 1.1 manual. Some programs differ slightly from the version printed in the manual due to minor bugs I've found while trying them out.
+
+Please note that the program listings for the HP-41 use the common notation `>"SomeText"` for appending text.
+
+![Advanced Pac Screen 1.1 Welcome Screen](./images/aps-welcome.gif)
+
+## LIF Image
+
+The LIF image `./bin/aps1demo.dat` contains all programs described below. Note that the HP-71/HP-75 programs are stored as text files. After loading the text file from the image, you have have to convert them into a Basic file, using a command like:
+
+`TRANSFORM "NAME" INTO BASIC` 
+
+## PLOTSIN (HP-41)
+
+### Usage
+1. Select the APS plotter device: `"PAC-PLOT" FINDID SELECT`
+2. Run the program.
+
+### Output
+
+![PLOTSIN Output](./images/plotsin.gif)
+
+### Program Listing
+
+See: [PLOTSIN Listing](src/aps1-hp41-plotsin.txt?raw=true).
+
+## BALKEN (HP-41)
+
+### Usage
+1. Select the APS plotter device:
+   `"PAC-PLOT" FINDID SELECT`
+2. Run the program.
+
+## Output
+
+![BALKEN Output](./images/balken.gif)
+
+### Program Listing
+
+See [BALKEN Listing](./src/aps1-hp41-balken.txt?raw=true).
+
+## TROPFEN (HP-71, HP-75)
+
+### Usage
+1. Set printer to PAC-PLOT device:
+   - HP-71:` PRINTER IS GRAPHIC`
+   - HP-75:
+     - Run `ASSIGN IO` and assign PAC-PLOT to `:PL:`
+     - `PRINTER IS ':PL'`
+
+### Output
+
+![TROPFEN Output](./images/tropfen.gif)
+
+### Program Listing
+
+See [TROPFEN Listing](./src/aps1-hp7x-tropfen.txt?raw=true).
+
+## UHR (HP-71)
+
+Although, the manual states that it works for both, the HP-71 _and_ the HP-75, this is not true due to the `GOTO` and `GOSUB`commands using labels instead of line number which is not supported by the HP-75. However, porting it to the HP-75 should be easy, but I didn't do it.
+
+### Usage
+1. Set printer to PAC-PLOT device: `PRINTER IS GRAPHIC`
+
+### Output
+
+![UHR Output](./images/uhr.gif)
+
+### Program Listing
+
+See [UHR Listing](./src/aps1-hp71-uhr.txt?raw=true).
diff --git a/bin/aps1demo.dat b/bin/aps1demo.dat
new file mode 100644
index 0000000..d15f7ef
Binary files /dev/null and b/bin/aps1demo.dat differ
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..3ec9e0f
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+SRCDIR=./src
+LIFFILE=./bin/aps1demo.dat
+
+rm $LIFFILE
+lifinit -m hdrive1 $LIFFILE 96 >temp.txt
+liflabel $LIFFILE APS1D >temp.txt
+
+comp41 -l -x hpil $SRCDIR/aps1-hp41-plotsin.txt | raw41lif PLOTSIN | lifput $LIFFILE
+comp41 -l -x hpil $SRCDIR/aps1-hp41-balken.txt | raw41lif BALKEN | lifput $LIFFILE
+
+textlif LISSAJ $SRCDIR/aps1-hp7x-lissajous.txt | lifput $LIFFILE
+textlif STERNE $SRCDIR/aps1-hp7x-sterne.txt | lifput $LIFFILE
+textlif UHR $SRCDIR/aps1-hp71-uhr.txt | lifput $LIFFILE
+textlif TROPFEN $SRCDIR/aps1-hp7x-tropfen.txt | lifput $LIFFILE
+
+textlif75 -n LISSAJ75 $SRCDIR/aps1-hp7x-lissajous.txt | lifput $LIFFILE
+textlif75 -n STERNE75 $SRCDIR/aps1-hp7x-sterne.txt | lifput $LIFFILE
+textlif75 -n TROPF75 $SRCDIR/aps1-hp7x-tropfen.txt | lifput $LIFFILE
+# textlif75 -n GRHC $SRCDIR/aps1-hp75-grhc.txt | lifput $LIFFILE
+
+lifdir $LIFFILE
+rm temp.txt
diff --git a/images/aps-welcome.gif b/images/aps-welcome.gif
new file mode 100644
index 0000000..17f6f31
Binary files /dev/null and b/images/aps-welcome.gif differ
diff --git a/images/balken.gif b/images/balken.gif
new file mode 100644
index 0000000..273b97a
Binary files /dev/null and b/images/balken.gif differ
diff --git a/images/plotsin.gif b/images/plotsin.gif
new file mode 100644
index 0000000..ca84bbe
Binary files /dev/null and b/images/plotsin.gif differ
diff --git a/images/tropfen.gif b/images/tropfen.gif
new file mode 100644
index 0000000..4c3c08c
Binary files /dev/null and b/images/tropfen.gif differ
diff --git a/images/uhr.gif b/images/uhr.gif
new file mode 100644
index 0000000..520f904
Binary files /dev/null and b/images/uhr.gif differ
diff --git a/src/aps1-hp41-balken.txt b/src/aps1-hp41-balken.txt
new file mode 100644
index 0000000..7fbf47f
--- /dev/null
+++ b/src/aps1-hp41-balken.txt
@@ -0,0 +1,49 @@
+01 LBL "BALKEN"
+02 "IN"
+03 OUTA
+04 0
+05 STO 00
+06 RAD
+07 "SC0,314,-100,"
+08 >"100"
+09 OUTA
+10 "PA0,0,SP1,PD"
+11 OUTA
+12 "PA314,0,0,0"
+13 OUTA
+14 "FT0,2"
+15 OUTA
+16 LBL 01
+17 RCL 00
+18 10
+19 +
+20 STO 00
+21 314
+22 X<=Y?
+23 GTO 02
+24 X<>Y
+25 25
+26 /
+27 SIN
+28 90
+29 *
+30 "PA"
+31 ARCL 00
+32 >",0"
+33 OUTA
+34 "ER10,"
+35 ARCL X
+36 OUTA
+37 "RR10,"
+38 ARCL X
+39 OUTA
+40 GTO 01
+41 LBL 02
+42 "PU,PA150,91"
+43 OUTA
+44 "LBSINUS"
+45 3
+46 BLDSPEC
+47 ARCL X
+48 OUTA
+49 END
diff --git a/src/aps1-hp41-plotsin.txt b/src/aps1-hp41-plotsin.txt
new file mode 100644
index 0000000..47d9c11
--- /dev/null
+++ b/src/aps1-hp41-plotsin.txt
@@ -0,0 +1,48 @@
+01 LBL "PLOTSIN"
+02 "IN"
+03 OUTA
+04 0
+05 STO 00
+06 RAD
+07 "SC0,314,-100,"
+08 >"100"
+09 OUTA
+10 "PA0,0,SP1,PD"
+11 OUTA
+12 "PA314,0,0,0"
+13 OUTA
+14 LBL 01
+15 RCL 00
+16 5
+17 +
+18 STO 00
+19 314
+20 X<=Y?
+21 GTO 02
+22 X<>Y
+23 25
+24 /
+25 SIN
+26 90
+27 *
+28 "PA"
+29 ARCL 00
+30 >",0"
+31 OUTA
+32 "PR0,"
+33 ARCL X
+34 OUTA
+35 "PR0,"
+36 CHS
+37 ARCL X
+38 OUTA
+39 GTO 01
+40 LBL 02
+41 "PU,PA150,91"
+42 OUTA
+43 "LBSINUS"
+44 3
+45 BLDSPEC
+4S ARCL X
+47 OUTA
+48 END
diff --git a/src/aps1-hp71-uhr.txt b/src/aps1-hp71-uhr.txt
new file mode 100644
index 0000000..edee7a2
--- /dev/null
+++ b/src/aps1-hp71-uhr.txt
@@ -0,0 +1,109 @@
+10 C$=','
+20 OPTION ANGLE DEGREES
+30 REAL X,Y,D0,D1,T
+40 INTEGER S(60,4),M(5,2),H(5,2),A,B,S0,S1,M0,M1,H0,H1,Z,I,J,K
+50 PRINT 'IN;SP1;SC-500,500,-400,400'
+60 REM
+70 REM ** ZEICHNEN DES ZIFFERNBLATTES **
+80 REM
+90 FOR A=1 TO 60
+100 B=(A-1)*6
+110 X=SIN(B) @ Y=COS(B)
+120 IF MOD(A-1,5)=0 THEN Z=330 ELSE Z=350
+130 S(A,1)=Z*X @ S(A,2)=Z*Y @ S(A,3)=390*X @ S(A,4)=390*Y
+140 PRINT 'PU;PA';S(A,1);C$;S(A,2);';PD;PA';S(A,3);C$;S(A,4)
+150 NEXT A
+160 PRINT 'PU;PA3,3;PD;PA3,-3,-3,-3,-3,3,3,3;DT$;DI;SL;SI4,3'
+170 PRINT 'PU;PA-55,230;LB12$;PA255,-45;LB3$'
+180 PRINT 'PA-25,-310;LB6$;PA-310,-45;LB9$;SP15;SI2,2'
+190 REM
+200 REM ** ERSTMALIGE ZEIGER- UNO DATUMSEINSTELLUNG **
+210 REM
+220 GOSUB 'TIMEDATE'
+230 S0=S1 @ GOSUB 'SEKUNDE' @ M0=M1 @ GOSUB 'SETMIN'
+240 H0=H1 @ GOSUB 'SETHOUR' @ D0=D1 @ GOSUB 'SETDATE'
+250 REM
+260 REM ** WENN ZEIT- ODER DATUMSAENDERUNG **
+270 REM ** NEUE ZEIGERSTELLUNG ODER DATUMSANZEIGE **
+280 REM
+290 'TIME': GOSUB 'TIMEDATE'
+300 IF D0<>D1 THEN GOSUB 'SETDATE' @ D0=D1 @ GOSUB 'SETDATE' @ GOTO 'TIME'
+310 IF H0<>H1 THEN GOSUB 'DELHOUR' @ H0=H1 @ GOSUB 'SETHOUR' @ GOTO 'TIME'
+320 IF M0<>M1 THEN GOSUB 'DELMIN' @ M0=M1 @ GOSUB 'SETMIN' @ GOTO 'TIME'
+330 IF S0<>S1 THEN GOSUB 'SEKUNDE' @ S0=S1 @ GOSUB 'SEKUNDE' @ GOTO 'TIME'
+340 GOTO 'TIME'
+350 REM
+360 REM ** SETZT ODER LOESCHT SEKUNDENANZEIGE **
+370 REM
+380 'SEKUNDE':
+390 PRINT 'PU;PA';S(S0,1);C$;S(S0,2);';PD;PA';S(S0,3);C$;S(S0,4)
+400 RETURN
+410 REM
+420 REM ** ZEICHNET MINUTENZEIGER **
+430 REM
+440 'SETMIN':
+450 M(1,1)=SIN(M0)*330 @ M(1,2)=COS(M0)*330
+460 M(2,1)=SIN(M0+8)*220 @ M(2,2)=COS(M0+8)*220
+470 M(3,1)=SIN(M0+160)*30 @ M(3,2)=COS(M0+160)*30
+480 M(4,1)=SIN(M0-160)*30 @ M(4,2)=COS(M0-160)*30
+490 M(5,1)=SIN(M0-8)*220 @ M(5,2)=COS(M0-8)*220
+500 REM
+510 REM ** LOESCHT MINUTENZEIGER **
+520 REM
+530 'DELMIN':
+540 PRINT 'PU;PA';M(5,1);C$;M(5,2);';PD'
+550 FOR A=1 TO 5
+560 PRINT 'PA';M(A,1);C$;M(A,2)
+570 NEXT A
+580 RETURN
+590 REM
+600 REM ** ZEICHNET STUNDENZEIGER **
+610 REM
+620 'SETHOUR':
+630 H(1,1)=SIN(H0)*250 @ H(1,2)=COS(H0)*250
+640 H(2,1)=SIN(H0+12)*150 @ H(2,2)=COS(H0+12)*150
+650 H(3,1)=SIN(H0+135)*15 @ H(3,2)=COS(H0+135)*15
+660 H(4,1)=SIN(H0-135)*15 @ H(4,2)=COS(H0-135)*15
+670 H(5,1)=SIN(H0-12)*150 @ H(5,2)=COS(H0-12)*150
+680 REM
+690 REM ** LOESCHT STUNDENZEIGER **
+700 REM
+710 'DELHOUR':
+720 PRINT 'PU;PA';H(5,1);C$;H(5,2);';PD'
+730 FOR A=1 TO 5
+740 PRINT 'PA';H(A,1);C$;H(A,2)
+750 NEXT A
+760 RETURN
+770 REM
+780 REM ** HOLT ZEIT UND DATUM **
+790 REM
+800 'TIMEDATE':
+810 T=TIME
+820 D1=DATE @ D$=DATE$
+830 S1=MOD(INT(T),60)+1
+840 M1=MOD(INT(T/60),60)*6
+850 H1=MOD(INT(T/3600),12)*30
+860 RETURN
+870 REM
+880 REM ** ZEIGT DATUM AN **
+890 REM
+900 'SETDATE':
+905 W0=VAL(DATE$[7,8])
+910 W1=MOD(VAL(DATE$[4,5])+9,12)+1
+915 W2=INT(DATE/1000)
+920 W3=19 @ IF W2<60 THEN W3=20
+925 IF W1>10 THEN W2=W2-1
+930 IF W2<0 THEN W2=99 @ W3=W3-1
+935 W=MOD(W0+INT(2.6*W1-0.2) + W2 + INT(W2/4) + INT(W3/4) - 2*W3,7)+1
+940 ON W GOTO 'A' ,'B' ,'C' ,'D' ,'E' ,'F' ,'G'
+945 'A': L$='SUN' @ GOTO 'OUT'
+950 'B': L$='MON' @ GOTO 'OUT'
+955 'C': L$='TUE' @ GOTO 'OUT'
+960 'D': L$='WED' @ GOTO 'OUT'
+965 'E': L$='THU' @ GOTO 'OUT'
+970 'F': L$='FRI' @ GOTO 'OUT'
+975 'G': L$='SAT'
+980 'OUT':
+985 PRINT 'PU;PA-160,-150;LB';L$;'  ';D$[7,8];'.';D$[4,5];'.';D$[1,2];'$'
+990 RETURN
+999 END
diff --git a/src/aps1-hp7x-lissajous.txt b/src/aps1-hp7x-lissajous.txt
new file mode 100644
index 0000000..0cdffdb
--- /dev/null
+++ b/src/aps1-hp7x-lissajous.txt
@@ -0,0 +1,16 @@
+10 OPTION ANGLE DEGREES @ G=360
+15 IMAGE 'PA',mz.5d,',',mz.5d
+20 INPUT 'AUFLOESUNG IN GRAD ';A
+30 INPUT 'RELATIVE FREQUENZ ';F
+40 INPUT 'DAEMPFUMG FUER F1 ';B @ IF B<1 THEN 40
+50 D1=LOG(1/B)/G
+60 INPUT 'DAEMPFUNG FUER F2 ';B @ IF B<1 THEN 60
+65 D2=LOG(1/B)/G
+70 Z=0 @ Q=0
+80 PRINT 'IN,SP1,SC-1,1,-1,1'
+90 PRINT 'PU;PA0,1;PD'
+100 Z=Z+A @ Q=Q+A*F
+110 X=SIN(MOD(Z,G))*EXP(D1*Z) @ Y=COS(MOD(Q,G))*EXP(D2*Z)
+120 PRINT USING 15;X;Y
+130 GOTO 100
+140 END
diff --git a/src/aps1-hp7x-sterne.txt b/src/aps1-hp7x-sterne.txt
new file mode 100644
index 0000000..805caab
--- /dev/null
+++ b/src/aps1-hp7x-sterne.txt
@@ -0,0 +1,41 @@
+10 X1=250 @ Y1=279
+20 X2=10250 @ Y2=7479
+30 C$=','
+50 INPUT 'FELDZAHL IN X-RICHTUNG (1-10) ';X
+60 X=INT(ABS(X))
+70 IF X<1 THEN 50
+80 IF X>10 THEN 50
+90 X3=(X2-X1)/X
+100 INPUT 'FELDZAHL IN Y-RICHTUNG (1-10) ';Y
+110 Y=INT(ABS(Y))
+120 IF Y<1 THEN 100
+130 IF Y>10 THEN 100
+140 Y3=(Y2-Y1)/Y
+150 INPUT 'ABSTAND ';C
+160 C=INT(ABS(C))
+170 IF C<1 THEN 160
+180 IF C>20 THEN 160
+190 PRINT 'IN;SP1;SC-50,50,-50,50'
+200 FOR Y4=Y-1 TO 0 STEP -1
+210 FOR X4=0 TO X-1
+220 X6=INT(X4*X3+X1) @ Y6=INT(Y4*Y3+Y1)
+230 X7=INT(X4*X3+X3+X1) @ Y7=INT(Y4*Y3+Y3+Y1)
+240 PRINT 'IP';X6;C$;Y6;C$;X7;C$;Y7
+250 FOR A=-50 TO 50 STEP C
+260 B=A
+270 PRINT 'PU;PA0,0;PD;PA';A;',50'
+280 NEXT A
+290 FOR A=100-B-C TO -50 STEP -C
+300 B=A
+310 PRINT 'PU;PA0,0;PD;PA50,';A
+320 NEXT A
+330 FOR A=100+B-C TO -50 STEP -C
+340 PRINT 'PU;PA0,0;PD;PA';A;',-50'
+350 B=A
+360 NEXT A
+370 FOR A=-100-B+C TO 50 STEP C
+380 PRINT 'PU;PA0,0;PD-50,';A
+390 NEXT A
+400 NEXT X4
+410 NEXT Y4
+420 END
diff --git a/src/aps1-hp7x-tropfen.txt b/src/aps1-hp7x-tropfen.txt
new file mode 100644
index 0000000..99611e9
--- /dev/null
+++ b/src/aps1-hp7x-tropfen.txt
@@ -0,0 +1,8 @@
+10 OPTION ANGLE RADIANS
+20 PRINT 'IN;SP1;SC0,279,-179,0'
+30 FOR Z=10 TO 0 STEP -.20 @ FOR X=10 TO 0 STEP -.20
+40 Y=-10*COS(3*SQR((X-5)*(X-5)+(Z-5)*(Z-5)))/2+50
+50 A=X*20+Z*3+20 @ B=-(Y+Z*10)
+60 PRINT 'PU;PA';A;',';B;';PD;PR.6,0'
+70 NEXT X @ NEXT Z
+80 END
