taviso / 123elf
- среда, 25 мая 2022 г. в 00:29:13
A native port of Lotus 1-2-3 to Linux.
This is a native port of Lotus 1-2-3 Release 3 to Linux. This is possible because Lotus 1-2-3 for UNIX SystemV used a trick called partial linking to workaround a technical limitation in early UNIX systems. Surprisingly, that can be used to modify it to support new platforms.
There's an article documenting how this is possible here.
First, you need a version of binutils that is compiled with coff-i386
target
support. You can check like this:
$ objdump --info | grep coff-i386
Note: Most distributions do not enable this for some reason.
Run the included binutils.sh
to download and compile a version of binutils known to work for this.
Secondly, you need a copy of Lotus 1-2-3 for UNIX, you can download it
here. Just place the raw disk images in
the build directory and run extract.sh
.
Finally, just run make
.
The following packages are required
Ubuntu | Fedora | Debian (bookworm) |
---|---|---|
build-essential | glibc-devel.i686 | build-essential |
gcc-multilib | libgcc.i686 | gcc-multilib |
lib32ncurses-dev | ncurses-static.i686 | lib32ncurses-dev |
Unfortunately, most distributions do not enable coff-i386
support in binutils.
It's very easy to enable it yourself, download binutils and configure it with --enable-targets=all
.
Note: binutils-2.38 is known to work, some earlier versions have been found to not work.
There's no need to install it, just build it with make
.
When that's complete, copy objcopy
and objdump
from the binutils
directory, and ld-new
from the ld
directory to 123elf
directory.
Important: Remember to rename
ld-new
told
.
The Makefile should automatically use the new binaries, and continue to build.
Just run ./123
.
./root/lotus/man/man1/123.1
, and a full manual available online here.Lotus 1-2-3 has context sensitive online help, you can press F1
at most times to see some hints.
Note: You use use the
/
key to open the 123 menu!
If you've used any spreadsheet before, you should be able to get started
quickly. Functions use @
instead of =
, but the common functions like
@SUM
, @AVG
, @INDEX
, and even @HLOOKUP
all work as you would expect.
If the status indicator in the top right says READY
, try /Quit Yes
.
If it doesn't say READY
(it might say ERROR
, HELP
POINT
, MENU
or
something else), try hitting Esc
until it goes back to READY
.
By default, 123 allows Autoexec macros in worksheets, so there is no security and you should not open untrusted files. In 1-2-3, macros can contain shell commands, read and write arbitrary files, load plugins and so on.
However, you can disable Autoexec macros via /Worksheet Global Default Autoexec
.
I am thinking of changing this default before we reach a first release!
If you do disable Autoexec then in theory it's safe to open untrusted worksheets -- but this software hasn't been maintained for over 30 years, and is likely full of critical security bugs!
I can patch bugs using coffsyrup
to redirect unsafe functions to new
versions, so I will make a best effort to fix vulnerabilities if you
report them!