Hi all,
Has anyone had any luck compiling Pascal programs using the Workshop under LisaEm 1.2.6 (the latest available version)? I'm running into linker errors when I try to compile fairly trivial programs.
1. Hello World
This compiles, links, and runs successfully:
PROGRAM Hello;
BEGIN
writeln('Hello, world!')
END.
Like all Lisa Pascal programs, it has to be linked against iospaslib.
2. Using a FOR loop.
This compiles successfully, but the linker runs into errors:
PROGRAM Hello;
VAR
i : Integer;
BEGIN
FOR i := 1 TO 32 DO BEGIN
writeln('Hello, world!')
END
END.
It doesn't matter what order you give files to the linker in (i.e. [hello.obj, iospaslib.obj] OR [iospaslib.obj, hello.obj]); you still see the following output:
Reading file: Hello.OBJ
Reading file: IOSPASLIB.OBJ
Input summary:
2 Files , max = 100
6 Segments , max = 4096
19 Modules , max = 32768
13 Entries , max = 65536
6 Ref. Lists, max = 65536
6 References, max = 65536
Linking Main Program.
Reading Library Directory: -#11-INTRINSIC.LIB
Active: 3 of 19 read.
Visible: 1 of 13 read.
Global data: $000002
Common data: $000000
Number of segments in file = 1, number of Jump Table entries = 1
Linking segment: file (JT) seg: 1 size: 100
4267 4040 File: Hello.OBJ Module: HELLO Type: Regular Code CurRelLoc: 44
*** Fatal Error - Bad Intrin Patch Instruction. ***
Type SPACE to continue.
3. QuickDraw sample code
Since I'm not really a Pascal programmer, I thought that there might be a chance that my code or my use of the Workshop compilation toolchain was incorrect. Disk 9 of the Pascal Workshop contains two sample programs for demonstrating QuickDraw, including EXEC files that run the build automatically. Here too, when compiling either sample program, the linker encounters errors. The message below is from attempting to compile the program "QD/SAMPLE.TEXT":
Reading file: QD/SAMPLE.OBJ
Reading file: QD/SUPPORT.OBJ
Reading file: SYS1LIB.OBJ
*** Warning - Duplicate entry definitions. ***
entry: GETMOUSE in WORKSET
*** Warning - Duplicate entry definitions. ***
entry: DRAWICON in OPENSEG1
Reading file: IOSPASLIB.OBJ
Input summary:
4 Files , max = 100
30 Segments , max = 4096
151 Modules , max = 32768
112 Entries , max = 65536
76 Ref. Lists, max = 65536
249 References, max = 65536
Linking Main Program.
Reading Library Directory: -#11-INTRINSIC.LIB
Active: 12 of 151 read.
Visible: 1 of 112 read.
Global data: $00530E
Common data: $000000
Number of segments in file = 1, number of Jump Table entries = 1
Linking segment: file (JT) seg: 1 size: 5570
3F00 3100 File: QD/SAMPLE.OBJ Module: DRAWSTUF Type: Regular Code CurRelLoc: 1790
*** Fatal Error - Bad Intrin Patch Instruction. ***
Type SPACE to continue.
I've tried this with Workshop installations from two different sets of Workshop 3.0 floppy images: the ones available from bitsavers.org and images copied from my own set of Workshop 3.0 floppies. The same thing happens for both. A similar error also occurs even after applying the 3.9 supplement upgrade to the Workshop.
I'm away from my Lisa 2 for the holidays, so I can't try the code on actual hardware, but I'm starting to think that this is a LisaEm problem. Has anyone else successfully built Pascal programs in the Workshop under LisaEm?
Thanks; happy holidays!
--Tom