OPL Coding
==========

Just wrote a 100-line OPL program on my PSION Organiser II LZ. I did it
on the device. It's not as hard as I feared.

The I  connected the  USB-serial adapter to  the real  serial CommsLink
cable  (not   to  a  modern  USB   version)  ad  connected  it   to  my
Fedora/ppc64le  box. Set  up the  /dev/ttyUSB0 in  the dosbox.conf  and
started the "CL.EXE".  And IT WORKED! IT required a  9-25 pin converter
cable which I fortunately have.

So now I can confirm that I'm able to transfer data from the Organiser II
to my Linux box.

Just for your information, this is the code I wrote:

{{
SLOZENY:
LOCAL B(5),H(5),X(5),Y(5),I%,N%,IX,IY,TX,TY,A,AI,SX,SY,DXY
LOCAL MAXX,MAXY,MINX,MINY,TMP
LOCAL WXT,WXB,WYT,WYB,C,D,I1,I2,DD
PRINT "Parts(max.5):";
INPUT N%
IF N%>5
 N%=5
 ENDIF
 IF N% < 1
  RETURN
ENDIF
I%=0
A=0
SX=0
SY=0
REM PRINT "NON-OVERLAPPING PARTS:"
WHILE I% < N%
I% = I% + 1
PRINT "Rectangle",I%;":"
PRINT "Lower left X:";
INPUT X(I%)
PRINT "Lower left Y:";
INPUT Y(I%)
PRINT "Width :";
INPUT B(I%)
PRINT "Height:";
INPUT H(I%)
AI=B(I%)*H(I%)
A=A+AI
SX=SX+AI*(Y(I%)+(H(I%)/2))
SY=SY+AI*(X(I%)+(B(I%)/2))
IF I% = 1
 MINX=X(1)
  MAXX=X(1)+B(1)
 MINY=Y(1)
  MAXY=Y(1)+H(1)
ELSE
 TMP = X(I%)
  IF TMP < MINX
  MINX=TMP
 ENDIF
  TMP=X(I%)+B(I%)
 IF TMP>MAXX
   MAXX=TMP
  ENDIF
 TMP=Y(I%)
  IF TMP < MINY
  MINY=TMP
 ENDIF
  TMP=Y(I%)+H(I%)
 IF TMP > MAXY
   MAXY=TMP
  ENDIF
ENDIF
ENDWH
CLS

TX=SY/A
TY=SX/A
PRINT "RESULTS:"
PRINT "Area=";A
PRINT "Tx="; TX
PRINT "Ty="; TY
GET
IX=0.0
IY=0.0
I%=0
WHILE I% < N%
I%=I%+1
AI=B(I%)*H(I%)
IX=IX+(B(I%)*H(I%)**3)/12.0+AI*(TY-(H(I%)/2.0+Y(I%)))**2
IY=IY+(H(I%)*B(I%)**3)/12.0+AI*(TX-(B(I%)/2.0+X(I%)))**2
DXY=DXY+AI*(TX-X(I%)-0.5*B(I%))*(TY-Y(I%)-0.5*H(I%))
ENDWH
CLS
PRINT "Ix=";IX
PRINT "Iy=";IY
PRINT "D =";DXY
GET
CLS
C=0.5*(IX+IY)
D=SQR((IX-IY)**2+4*DXY**2)
I1=C+D
I2=C-D
DD=(I1-I2)*0.5
PRINT "I1=";I1
PRINT "I2=";I2
PRINT "Dmax=";DD
GET
CLS
WXB=IX/(-TY+MINY)
WXT=IX/(MAXY-TY)
WYB=IY/(-TX+MINX)
WYT=IY/(MAXX-TX)
PRINT "Wx,b=";WXB
PRINT "Wx,t=";WXT
GET
PRINT "Wy,b=";WYB
PRINT "Wy,t=";WYT
GET
}}