💾 Archived View for tilde.pink › ~bencollver › log › 2018-01-27-ladybug-quest captured on 2022-06-03 at 23:48:24. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-03-01)

➡️ Next capture (2022-07-16)

🚧 View Differences

-=-=-=-=-=-=-

2018-01-27 - Ladybug quest

I read a document with sample LOGO code, and chose to try it out in FreeDOS. First i tried Ladybug LOGO, the LOGO that i had used as a kid. This brings back a few memories.

In middle school i checked out an spy adventure book from the school library. It involved typing in BASIC code to decrypt hidden messages and solve various puzzles. I had fun typing it into an Apple II during lunch break. Then i took the book home. Dad let me type code into GW-BASIC on an IBM XT. He also helped me debug it when i made mistakes.

Later that year, i took a course designed to explore our interests. We would spend each week on a new subject. During the computer science subject, i learned to use LOGO on the Apple II. This was the first time i was officially taught to use a computer at school.

download SIMCGA 4.1

http://cd.textfiles.com/megarom/megarom1/MISCUTL/SIMCGA41.ZIP

Dad downloaded Ladybug LOGO from Compuserve or a BBS and let me use that at home. Ladybug LOGO was hard-coded to use a CGA graphics adapter. Since the IBM XT had a Hercules monochrome graphics adapter, it would not run out of the box. Dad set it up with a clever TSR named SIMCGA, which made the necessary video BIOS and memory map changes to emulate CGA on a Hercules card. This enabled Ladybug LOGO to run on our hardware.

download Ladybug LOGO

http://cd.textfiles.com/simtel/simtel20/MSDOS/LOGO/LADYBUG.ZIP

I installed Ladybug LOGO in FreeDOS 1.2 on VirtualBox. Ladybug is a software engineering marvel because of its well organized documentation and the capabilities that it DOES offer, considering that it fits within the constraints of a real mode compiled BASIC application and a single floppy disk. It is also interesting to note that the documentation uses a mixture of feminine and masculine pronouns, which seems progressive for 1984.

The software's author was an interesting character. He was humble and did not expect to get rich. His corporate job paid the grocery bills and Ladybug was offered on a donations accepted basis to fund his hobby. Below is a magazine article about Ladybug LOGO.

* Ladybug article page 1

* Ladybug article page 2

* Ladybug article page 3

* Ladybug article page 4

From PC Magazine, May 15, 1984

http://books.google.com/books?id=hcHq9kHRifYC&pg=PA207&lpg=PA210&f=false#v=onepage&q&f=false

Ladybug ran fine in FreeDOS, but it would not execute the sample LOGO code, which used list processing primitives and variadic procedures. Ladybug LOGO must have internal list processing in order to run LOGO code. However, it does not expose its internal list primitives as LOGO commands. It also lacks variadic procedures. Ladybug didn't even offer enough functionality to build my own primitives.

UCBLogo homepage

http://people.eecs.berkeley.edu/~bh/logo.html

download UCBLogo 5.3 for DOS

ftp://ftp.cs.berkeley.edu/pub/ucblogo/blogo.exe

download UCBLogo 5.3 source code

ftp://ftp.cs.berkeley.edu/pub/ucblogo/old/ucblogo-5.3.tar.gz

Next i downloaded UCBLogo 5.3 for DOS, which could run the sample code. Success! Let's go deeper. On the same page the author also offers three textbooks free of charge, which use LOGO to teach deep concepts in computer science. Thinking this might be fun, i began to read the manual and tinker with commands. The EDALL command spawns the JOVE full screen editor, which is a clone of Emacs, which is a depraved editor indeed. (Of course i am a completely objective observer in the emacs versus vi dichotomy.) The manual says that i can use any editor i wish by setting the EDITOR environment variable. So i set it to vi.

download Calvin 2.3

ftp://ftp.oldskool.org/pub/simtel_msdos/msdos/editor/calvin23.zip

download Calvin 2.3 source code

ftp://ftp.oldskool.org/pub/simtel_msdos/msdos/editor/calsrc23.zip

My DOS vi of choice was Calvin 2.3, which is tiny, fast, and functional. It works perfectly in DOSBox but screen navigation produces artifacts and glitches in VirtualBox. Calvin comes with source code and it is compiled using Borland Turbo C 2.0 and A86 4.02. Reading the source code, my guess is that the glitches come from CGA BIOS bugs in VirtualBox, specifically around INT10h AH=05h SELECT ACTIVE PAGE. Rather than try to fix or work around this BIOS bug myself, i thought i would try another editor.

download Elvis 2.2_0 for DOS

http://www.the-little-red-haired-girl.org/pub/elvis/old/elvis-2.2_0-msdos.tar.gz

download Elvis 2.2_0 source code

http://www.the-little-red-haired-girl.org/pub/elvis/old/elvis-2.2_0.tar.gz

download Untar DOS utility

http://www.the-little-red-haired-girl.org/pub/elvis/old/untardos.exe

Next up i tried Elvis 2.2_0 for DOS, which is the same codebase that BSD's default nvi editor is based on. Elvis comes with source code and it is compiled using Microsoft Visual C++ 1.5. Elvis crashes when run from UCBLogo. There is a blip on the screen and UCBLogo prints the following error.

File system error: Could not launch the editor in edall [edit contents]

I briefly considered compiling UCBLogo to debug the code. However, UCBLogo is compiled using the Zortech C Compiler. I couldn't find any place to download this compiler. It has been superseded by Digital Mars, but that compiler suite no longer runs on DOS. Some other troubleshooting would be more appropriate.

I tried SET EDITOR=COMMAND.COM which revealed a clue. With this setting the EDALL command would drop me to a DOS shell. If i ran ELVIS.EXE it would return immediately to the prompt with ERRORLEVEL 8. The elvis documentation says it should only ever return 0 or 1. The elvis code shows that 4 is also possible. Nowhere in the code does it return 8!

Table of DOS exit codes from Ralph Brown

http://www.delorie.com/djgpp/doc/rbinter/it/80/16.html

Ralph Brown's interrupt list shows that error 8 means that DOS ran out of memory. The MEM command showed that the maximum executable size within the UCBLogo spawned shell is 414k, and ELVIS.EXE is over 428k. It must have something to do with elvis being a real-mode 16-bit application.

download VIM 7.3 for 32-bit extended DOS

ftp://ftp.vim.org/pub/vim/pc/vim73_46d32.zip

download VIM 7.3 runtime

ftp://ftp.vim.org/pub/vim/pc/vim73_46rt.zip

download VIM 7.3 source code

ftp://ftp.vim.org/pub/vim/pc/vim73_46src.zip

Next up i tried the DOS 32-bit extended VIM version 7.3, compiled with DJGPP. This version is a little more complex to install, but it is able to make better use of extended memory. VIM works perfectly when run from UCBLogo. Success!

On a tangent, i am pleased with how well the latest DJGPP works on FreeDOS 1.2. Combined with the DOSLFN driver i get long file names and a Unix style shell. FreeDOS has come a long way and promises to be a fun toy to play with.

tags: bencollver,retrocomputing,technical

↩ Back