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. In case you are interested, below are links to LOGO books: Introducing LOGO: for the Apple II, TI 99/4A and Tandy Color Computer Computer Art and Animation: A User's Guide to Atari LOGO LogoWorks: Challenging Programs In Logo The Great Logo Adventure The Great Logo Adventure Files Computer Science Logo Style: Symbolic Computing Computer Science Logo Style: Advanced Techniques Turtle Geometry And below are a couple of links to web browser-based versions of LOGO. JS LOGO Turtle Academy 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.ZIP Download SIMGGA41.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 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. UCB LOGO UCB LOGO 5.3 for DOS (32-bit) UCB LOGO 5.3 source code 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. SET EDITOR=C:\BEN\BIN\VI.EXE Calvin 2.3 Calvin 2.3 source code 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. 2024-03-23 follow-up -------------------- I should have read the documentation, not the source code. Calvin includes VI.DOC, which says: > vidcompat (default 0) > Indicates the compatibility level for video operations. > Setting it to a higher value may cause some screen-related > problems to go away if you have slightly non-standard hardware. > With vidcompat=1, Calvin does not use the alternate screen > feature of CGA adapters, and with vidcompat=2, it does not save > and restore the screen after editing. Just as i thought! The problem is CGA BIOS bugs. Calvin already includes a workaround. I just need to set the following environment variable. SET EXINIT=set vidcompat 2 I verified that this does indeed resolve my problem in VirtualBox. ----- Note that 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. 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. By the way, i have a follow-up article that mentions printing from Ladybug LOGO on DOS. 2022-05-15 - Print Quest tags: bencollver,retrocomputing,technical Tags ==== bencollver retrocomputing technical