Jeff Duntemann's Contrapositive Diary Rotating Header Image

programming

In Pursuit of x64

You may be wondering where I am, given that I haven’t posted a Contra entry for over a month. I didn’t want May to conclude with zero entries posted, so I figured I’d take a break here and get you up to speed.

Here’s the deal: My publisher has asked for a Fourth Edition of Assembly Language Step-By-Step. It’s been thirteen years since the Third Edition came out, so it’s well past time. The idea here is to bring the book up to date on the x64 architecture. In fact, so that no one will mistake what’s going on, the title of the new edition will be x64 Assembly Language Step-By-Step, Fourth Edition. Whether they keep the “x” in lowercase remains to be seen.

So I’m off and editing, writing new code and checking every code snippet in a SASM sandbox, and making sure that I don’t forget and talk about EAX and other 32-bits-and-down entities without good reason. (There are good reasons. Even AH and AL are still with us and used for certain things.) Make no mistake: This is going to be a lot of work. The Third Edition is 600 pages long, which isn’t the longest book I’ve ever written (that honor belongs to Borland Pascal 7 From Square One, at 810 pages) but it’s right up there.

My great fear has been the possibility of needing to add a lot of new material that would make the book even longer, but in truth, that won’t be a huge problem. Here’s why: Some things that I spent a lot of pages on can be cut way back. Good example: In 32-bit Linux, system calls are made through the INT 80H call gate. In the Third Edition I went into considerable detail about how software interrupts work in a general sense. Now, x64 Linux uses a new x64 instruction, SYSCALL, to make calls into the OS. I’m not completely sure, but I don’t think it’s possible to use software interrupts at all in userspace programming anymore. I do have to explain SYSCALL, but there’s just not as much there there, and it won’t take nearly as many words and diagrams.

Oh, and of course, segments are pretty much a thing of the past. Segment management (such that it is) belongs to the OS now, and for userspace programming, at least, you can forget about them. I’m leaving a little description of the old segment/offset memory model for historical context, but not nearly as much as in previous editions.

I also dumped the Game of Big Bux, which doesn’t pull its weight in the explanation department, and isn’t nearly as funny now as it was in 1990. But have faith: The Martians are still with us.

My guess is that from a page count standpoint, it will pretty much be a wash.

It’s going to take me awhile. I don’t know how long, in truth. Especially since I am going to try to keep my fiction output from drying up completely. The book will slow me down, but (for a change) the publisher is not in a huge hurry and I think they’ll give me the time I need. I have 56,000 words down on The Everything Machine, and don’t intend to put it on ice for months and months. I’m not sure how well that’s going to work. We’ll see.

Odd Lots

  • Pertinent to my last two entries here: City Journal proposes what I proposed two years ago: To reduce the toxicity of social media, slow it down. What they propose is not exponential delays of replies and retweets to replies and retweets until those delays extend fifteen minutes or more. Like a nuclear reactor control rod, that would slow the explosion down until the hotheads cooled off or got bored and went elsewhere. Instead, they suggest Twitter insist on a minimum of 280 characters to posts. That might help some, but if the clue is to slow down viral posts, eliminate the middleman and just slow down responses until “viral” becomes so slow that further response simply stops.
  • A statistical study of mask use vs. COVID-19 outcomes found no correlation between mask use and better outcomes, but actually discovered some small correlation between mask use and worse outcomes. Tough read, but bull through it.
  • While not as systematic as the above study, an article on City Journal drives another nail in the coffin of “masks as infection prevention.” Graph the infection rates in states with mask mandates and states with no mask mandates and they come out…almost exactly the same.
  • Our Sun is getting rowdy, and getting rowdier earlier than expected. Cycle 25 is starting out with a bang. Recent cycles have been relatively peaceful, and nobody is suggesting that Cycle 25 will be anything close to the Cycle 19 peak (1957-58) which was the most active sunspot max in instrumental history. What Cycle 25 may turn out to be is average, which mean 20 meters may start to become a lot more fun than it has been in recent (slow) years.
  • And this leads to another question I’ve seen little discussion on: To what extent are damaging solar storms correlated to sunspot peaks? The huge solar storm of 1921 took place closer to the sunspot minimum than the maximum. The legendary Carrington event of 1859 took place during the fairly weak Cycle 10. As best I can tell, it’s about individual sunspots, and not the general state of the Sun at any point in time.
  • NASA’s Perseverence Mars rover caught a solar eclipse, when Phobos crossed the disk of the Sun as seen from Perseverence. The video of the eclipse was sped up, but it really is a startling image, especially if you know a little about Phobos, which is decidedly non-spherical.
  • I found this very cool: An online, Web-based x86/x64 assembler/disassembler. Although intended for computer security pros, I found it a lot of fun and it may turn out to be useful here and there as I begin to revise my assembly book for the fourth time.
  • Skipping sleep can lead to putting on belly fat, which is absolutely the worst place to have it. Get all the sleep you can, duh. Sleep is not optional.
  • How many stars are there in the observable universe? It’s a far trickier and sublter calculation than you might think. But the final number looked familiar to me, and might look familiar to people who do low-level programming.

Problems with SASM on Linux Mint

I’m scoping out a fourth edition of my book, Assembly Language Step by Step. I got wind of a simple FOSS utility that could be enormously useful in that effort: SASM (SimpleASM), which is an IDE created specifically for assembly-language work. It’s almost ideal for what I need: Simple, graphical, with a surprisingly sophisticated text editor and a graphical interface to GDB. It works with NASM, my assembler of choice. I want to use it as the example code IDE for the book. I installed it without effort on Windows, which is why I decided to use it. But I want to use it on Linux.

Alas, I’ve been unable to get it to install and run on Linux Mint 19 (Tara) using the Cinnamon desktop.

I’ve installed a lot of things on Linux Mint, all of them in the form of Debian packages. (.deb files.) I downloaded the SASM .deb file for Mint 19, and followed instructions found on the Web. There is a problem with dependencies that I just don’t understand.

I got it installed once but it wouldn’t run. I uninstalled it, and then it refused to reinstall.

Keep in mind that I am not a ‘leet Linux hacker. I’m a teacher, and most of what I teach is computing and programming for newcomers. The problem may be obvious to Linux experts but not to me. Most of the software I’ve installed on Mint came from repositories. SASM is a .deb download.

So. Does anybody else use it? If you’ve got Mint on a partition somewhere, could you try downloading it and installing it? I need to know if the problem is on my side of the screen or the other side.

Thanks in advance for any advice you might offer.

Odd Lots

  • I got caught in an April Fools hoax that (as my mother would say) sounded too true to be funny: That Tesla canceled all plans to produce its Cybertruck. (Read the last sentence, as I failed to do.) I like Musk; he has guts and supports space tech. About his Cybertruck concept, um…no. It looks like an origami, or else something that escaped from a third-shelf video game. The world would go on without it, and he might use the money to do something even cooler, whatever that might be.
  • Oh, and speaking of Elon Musk: He just bought almost 10% of Twitter, to the tune of about $3B. He is now the biggest outside shareholder. This is not a hoax, and I wonder if it’s only the beginning. Twitter is famous for suspending people without explaining what they did wrong, sometimes for things that seem ridiculously innocuous. A major shareholder could put pressure on Twitter’s management from the inside to cut out that kind of crap. It’s been done elsewhere. And boy, if anybody can do it, he can.
  • Nuclear energy has the highest capacity factor of any form of energy, meaning the highest percentage of time that energy producers spend actually producing energy. I knew that from my readings on the topic. What shocked me is that there is in fact an Office of Nuclear Energy under the DOE. I’m glad they exist, but boy, they hide well.
  • The Register (“Biting the hand that feeds IT”) published a fascinating article about how C has slowly evolved into an Interface Definition Language (IDL). C was never intended to do that, and actually does a pretty shitty job of it. Ok, I’m not a software engineer, but the way to build a new operating system is to define the IDL first, and work backwards from there. C is now 50 years old, sheesh. It’s time to start again, and start fresh, using a language (like Rust) that actually supports some of the security features (like memory protection and safe concurrency) that C lacks. This is not Pascal sour grapes. I’m studying Rust, even though I may never develop anything using it. Somehow, it just smells like the future.
  • Drinking wine with food (as I almost always do) may reduce your chances of developing type 2 diabetes. It’s not taken up in the article, but I have this weird hunch that sweet wines weren’t part of the study. Residual sugar is a real thing, and I’m drinking way less of it than I did 20 years ago.
  • People have been getting in fistfights over this for most of a century, but establishing Standard Time year-round may be better than year-round Daylight Savings Time. I’m mostly neutral on the issue. Arizona is on permanent DST and we like it fine. The problems really occur at high latitudes, where there isn’t much daylight in winter to begin with, so shifting it an hour in either direction doesn’t actually help much.
  • There is Macaroni and Cheese Ice Cream. From Kraft. Really. I wouldn’t lie to you. In fact, I doubt I would even imagine it, and I can imagine a lot.
  • Optimists live longer than pessimists–especially older optimists. Dodging enough slings and arrows of outrageous fortune somehow just makes the whole world look brighter, I guess.
  • Finally, some stats suggesting that our hyperpartisan hatefest online has pushed a lot of people out of political parties into the independent zone–where I’ve been most of my post-college life. 42% of Americans are political independents, compared to 29% who are Democrats and 27% who are Republicans. I’m on Twitter, but I don’t post meanness and (as much as possible) don’t read it. And if Mr. Musk has his way with them, I may be able to post links to ivermectin research without getting banned.

Odd Lots

The Raspberry Pi Pico…and a Tiny Plug-In Pi

Yesterday the Raspberry Pi Foundation announced the Raspberry Pi Pico, at the boggling temporary low price of…$4US. It’s definitely a microcontroller on the order of an Arduino rather than the high-end 8GB RPi that might stand in for a complete desktop mobo. And that’s ok by me. The chip at its heart is new: the RP2040, a single-chip microcontroller designed to interface with mainstream Raspberry Pi boards, and lots of other things.

Raspberry-Pi-Pico-at-an-angle-500x357.png

Now, what caught my attention in the page linked above was the list of partner products made by other firms using the same RP2040 chip. Scroll down to the description of the SparkFun MicroMod RP2040 proccesor board. It’s still on preorder, but look close and see what’s there: an edge connector…on a board the size of a quarter! That’s not precisely what I was wishing for in my previous entry, but it’s certainly the right idea.

17720-MicroMod_RP2040_Processor_Board-04.jpg

As I understand it, SparkFun is turning the RPi-wearing-a-hat on its ear, into a hat-wearing-an-RPi. The M.2 interface used in the product is actually a standard developed some years back for use in connecting SSDs to tiny slots on mobos. I knew about M.2, but wouldn’t have assumed you could mount a CPU-add-in board using it. Well, shazam! Done deal.

The RP2040 chip is a little sparse for my tastes. I want something I can run FreePascal/Lazarus on, over a real OS. I don’t see anything in the M.2 spec that would prevent a much more powerful processor board talking to a device (like a keyboard, TV or monitor) across M.2. The big problem with building a high-end RPi into things is keeeping it cool. The Foundation is aware of this, and did a very good job in the $100US Raspberry Pi 400 Pi-in-a-keyboard. (This teardown and review is worth a look if you’re interested in the platform at all. The author of the teardown goosed the board to 2.147 GHz and it didn’t cook itself.)

I fully intend to get an RPi 400, though I’ve been waiting awhile to see if there will soon be an RPi 800 keyboard combo with an 8GB board instead of 4GB. Given the price, well hell, I might as well get the 4GB unit until an 8GB unit appears.

So consider my previous post overruled. It’s already been done. And I for one am going to watch this part of the RPi aftermarket very carefully!

Proposal: A New Standard for Encloseable Small Computers

Monitors are getting big. Computers are getting small. I think I’ve mentioned this idea before: a cavity in a monitor big enough to hold a Raspberry Pi, with the monitor providing power, video display, and a couple of USB ports for connecting peripherals like mice, keyboards, and thumb drives. Several of my Dell monitors have a coaxial power jack intended for speaker bars, and a USB hub as well. I’ve opened up a couple of those monitors to replace bad electrolytics, and as with most computer hardware, a lot of that internal volume is dead space.

The idea of a display with an internal computer has long been realized in TVs, many of which come with Android computers inside. That said, I’ve found them more a nuisance than useful, especially since I can’t inspect and don’t control the software. These days I outsource TV computing to a Windows 10 Intel NUC sitting on the TV cabinet behind the TV.

The top model of the Raspberry Pi 4, with 8 GB RAM, is basically as powerful as a lot of intermediate desktops, with more than enough crunch for typical office work; Web, word processing, spreadsheets, etc. With the Debian-based Raspberry Pi OS (formerly Raspbian) and its suite of open-source applications, you’ve got a desktop PC. More recently, the company has released the Raspberry Pi 400, which is a custom 4GB RPi 4 built into a keyboard, with I/O brought out the back edge. (In truth, I’d rather have it built into a display, as I am extremely fussy about my keyboards.) Computers within keyboards have a long history, going back to (I think) the now-forgotten Sol-20 or perhaps the Exidy Sorcerer. (Both appeared in 1978.)

What I want is breadth, which means the ability to install any of the modern small single-board computers, like the Beaglebone and its many peers. Breadth requires standardization, both in the monitor and in the computer. And if a standard existed, it could be implemented in monitors, keyboards, printers, standalone cases, robot chassis, and anything else that might be useful with a tiny computer in its tummy.

A standard would require both physical and electrical elements. Electrical design would be necessary to bring video, networking, and USB outside the enclosure, whatever the enclosure is. (I reject the bottom-feeder option of just leaving a hole in the back of the enclosure to bring out conventional cables.) This means the boards themselves would have to be designed to mate with the enclosure. What I’m envisioning is something with a card slot in it, and a slot spec for video, network, i2s, and USB connections. (GPIO might not be available through the slot.) The boards themselves would have slot connectors along one edge, designed to the standard. The redesigned boards could be smaller and thinner (and cheaper) without the need for conventional video, network, audio, and USB jacks. (Network connectors are increasingly unnecessary now that many boards have on-board WiFi and Bluetooth antennas.) Picture something like the Raspberry Pi Zero with edge connectors for I/O.

Defining such a standard would be a minor exercise in electrical engineering. The big challenge would be getting a standards body like ANSI interested in adopting it. The Raspberry Pi Foundation has the engineering chops, obviously, and once a standard has been created and proven out, groups like IEEE or ANSI might be more inclined to adopt it and make it “official.”

I understand that this might “fork” the small-board computing market between GPIO boards and non-GPIO boards. Leaving the GPIO pads on the opposite edge of the board is of course possible, and would allow the board to be enclosed or out in the open, or inside some other sort of enclosure that leaves room for GPIO connections. A big part of the draw of the small boards is the ability to add hardware functionality in a “hat” that plugs into the GPIO bus, and I don’t want to minimize that. I think that there’s a market for non-GPIO boards that vanish inside some larger device or enclosure that provides jacks for connections to the outside world. The Raspberry Pi 400 is an excellent example of this, with GPIO header access as well. What I’m proposing is a standard that would allow a single enclosure device to be available to any board designed to the standard.

Ok, it would be hard–for small values of hard. That doesn’t mean it wouldn’t be well worth doing.

Delphi Turns 25

Today (or maybe tomorrow, depending on who you talk to) is the 25th anniversary of Borland’s introduction of the Delphi RAD environment for Object Pascal. Delphi changed my life as a programmer forever. It also changed my life as a book publisher for awhile. The Delphi Programming Explorer, a contrarian tutorial book I wrote with Jim Mischel and Don Taylor and published with Coriolis, was the company’s biggest seller in 1995. We did a number of other Delphi books, including a second edition of the Explorer for 32-bit Windows, Ray Konopka’s seminal Developing Custom Delphi 3 Components, and others, including Delphi 2 Multimedia Adventure Set, High Performance Delphi Programming, and the ill-fated and much-mocked Kick-Ass Delphi. We made money on those books. A lot of money, in fact, which helped us expand our book publishing program in the crucial years 1995-1998.

It took OOP to make Windows programming something other than miserable. I was interested in Windows programming from the outset, but didn’t even attempt it while it was a C monopoly that involved gigantic switch statements and horrendous resource files. With OOP, you don’t have to build that stuff. You inherit it, and build on it.

There is an asterisk to the above: Visual Basic had no OOP features in its early releases, and I did quite a bit of Windows BASIC work in it. Microsoft flew a team out to demo it at the PC Techniques offices in late 1990 or early 1991. A lot of Windows foolishness was exiled to its runtime P-code interpreter, and while a lot of people hate P-code, I was used to it from UCSD Pascal and its descendents. What actually threw me back in my chair during the Thunder demo (Thunder being VB’s codename) was the GUI builder. That was unlike anything I’d seen before. Microsoft bought the GUI builder from Tripod’s Alan Cooper, and it was a beautiful and almost entirely new thing. It was Visual Basic’s GUI builder that hammered home my conviction that visual software development was the future. Delphi based its GUI builder on OOP, to the extent that Delphi components were objects written within the VCL framework. I enjoyed VB, but it took Object Pascal within Delphi to make drag-and-drop Windows development object-oriented from top to bottom.

People who came to OOP for the first time with Delphi often think that Delphi was the first Borland compiler to support OOP. Not so: Turbo Pascal 5.5 introduced OOP for Pascal in 1989. Although I wasn’t working for Borland at the time, I was still in Scotts Valley writing documentation for them freelance. I wrote about two thirds of the Turbo Pascal OOP Guide, a slender book that introduced OOP ideas and Object Pascal specifics to Turbo Pascal 5.5 users. A little later I wrote a mortgage calculator product using BP7’s OOP features, especially a confounding but useful text-mode OOP framework called Turbo Vision. I licensed Mortgage Vision to a kioskware vendor, and in doing so anticipated today’s app market, where apps are low-cost but sold in large numbers. I cleared $17,000 on it, and heard from users as late as the mid-oughts. (Most were asking me when I was going to start selling a Windows version. I apologized but indicated I had gone on to other challenges.)

I mention all this history because, after 25 years, a lot of it has simply been forgotten. Granted, Delphi changed the shape of Windows development radically. It did not, however, come out of nowhere.

One of the wondrous things about Delphi development in the late 90s and early oughts (and to this day, as best I know) was the robust third-party market for Delphi VCL components. I used to wander around Torry’s Delphi Pages, marveling at what you could buy or simply download and plug into Delphi’s component palette. I have all of TurboPower’s Delphi VCL products and have made heavy use of them down the years. (They’re free now, in case you hadn’t heard. Some but not all have been ported to the Lazarus LCL framework.) I’ve also used Elevate’s DBISAM for simple database apps, and Raize Software’s DropMaster for drag-and-drop data transfers across the Windows desktop. Those are simply the ones I remember the best. There were many others.

I don’t use Delphi much anymore. I still have Delphi 7, and still use it now and then. The newer versions, no. It’s not because I don’t like the newer versions. It’s because what I do these days is teach “intro to programming” via books and seminars, and I can’t do that with a $1,000 product. Well, what about the Delphi Community Edition? I tried to install that in 2018. The binary installed fine. But the registration process is insanely complex, and failed for me three times for reasons I never understood. Sorry, but that kind of nonsense gets three strikes and it’s out. On the other hand, if I were actively developing software beyond teaching demos, I’d probably buy the current version of Delphi and go back to it. I’m willing to deal with a certain amount of registration kafeuthering, but I won’t put my students through it, especially when Lazarus and FreePascal can teach the essentials of programming just as well.

Nonetheless, Delphi kept me programming when I might otherwise have given it up for lack of time. It allowed me to focus on the heart of what I was doing, not on writing code for user interface elements and other mundane things that are mostly the same in all applications. Back when Delphi was still a beta product, Project Manager Gary Whizin called Delphi OOP programming “inheriting the wheel”. That’s where the magic is, and Delphi is strong magic indeed.

Odd Lots

  • Lazarus 1.8.4 has been released. Bug-fix release but still worth having. Go get it!
  • From the Questions-I-Never-Thought-to-Ask Department: How was sheet music written after quill pens but before computers? With a music typewriter, of course.
  • How to become a morning person. Yes, there are benefits. The larger question of whether circadian orientation is born or made remains unanswered. Carol and I both lived at home during college. We’re both morning people. My sister and I had the same parents, grew up in the same house and obeyed the same rules (bedtimes were set from above and were not negotiable) and she went away to school. She is a night person. Proves nothing, but I find the correlation intriguing. (Thanks to Charlie Martin for the link.)
  • Here’s a long-form, highly technical paper on why human exposure to low-level radiation is more complex than we thought (hey, what isn’t?) and that some data suggests a little radiation experienced over a long timeframe actually acts against mortality. I’d never heard of the Taiwan cobalt-60 incident, but yikes!
  • Sleep, exercise, and a little wine may help the brain’s glymphatic system clean out unwanted amyloid waste products within the brain, preventing or staving off Alzheimer’s. This process may be the reason that anything with a brain sleeps, and why humans (who have more brain matter per pound than anything else I’m aware of) should get as much sleep as we can.
  • An enormous study on the benefits of the Mediterranean diet was found to be profoundly flawed, and has been retracted. The data was supposedly re-analyzed and the original results obtained again, but if the researchers made the mistakes they did originally (assuming that they were in fact mistakes and not deliberate faking) I see no reason to trust any of their data, their people, or their methods ever again.
  • How faddism, computerization, national bookstore ordering, a court case, and New York City cultural dominance destroyed (and continues to destroy) traditional publishing of genre fiction. The good news is that with indie publishing it matters far less than it otherwise would.
  • If you’ve followed the nuclear energy industry for any significant amount of time, you know that fusion power is always 30 years in the future. Now, I’ve also been hearing about thorium reactors for almost 30 years, and I got to wondering why we don’t have them yet either. Here’s a good discussion on the problems with thorium power, which intersect heavily with the problems plaguing ordinary uranium reactors.
  • Long-held myths die hard, especially when governments beat the drum for the myth. Eggs are good food. I eat at least two every day, sometimes more. The American Journal of Clinical Nutrition published a study indicating that people on a lots-of-eggs diet lost weight and suffered no cardiac consequences of any kind. Good short summary here.
  • I don’t see a lot of movies, but I’m in for this one, crazy though the concept is. After all, spectacle is what the big screen and CGI are for. Mad Max meets Cities in Flight? Sold.
  • The contrarian in me has long wondered how much of what I put out on the street every week in the recycle can is actually recycled. The answer is very little, especially since single-stream recycling became fashionable. Almost all of it goes into landfills. The reasons are complex (there’s not a lot you can do with scrap plastic, for example) but apart from aluminum cans, the cost of sorting it far exceeds the value of the reclaimed materials.
  • The antivax movement has always boggled me for its indomitably willful stupidity. Having stumbled upon a research paper on who the antivaxers are I boggle further: They are almost all members of the educated elite in our urban cores. This was always a suspicion of mine, and now we have proof.
  • Here’s a fascinating piece on the effects of water vapor and continental drift on global temperatures. The topic is complex, and the piece is long and rich, with plenty of graphs. The comments are worth reading too. The primary truth I’ve learned in researching climate for the last ten or fifteen years is that it’s fiendishly complex.
  • Brilliantly put: “But anger isn’t a strategy. Sometimes it’s a trap. When you find yourself spewing four-letter words, you’ve fallen into it. You’ve chosen cheap theatrics over the long game, catharsis over cunning.” –Frank Bruni, NYT.
  • A few days back I got Leonard Bernstein’s quirky, half-classical, half-klezmer “Overture to Candide” stuck in my head all afternoon. One listen to this was all it took.
  • I got there by recovering an old memory, of a chap who came to SF cons in the 70s with a strange keyboard instrument that he blew on through a hose, which as you might expect sounded like a piano accordion without a bellows. He was a filker and played interesting things, and I always assumed that he had somehow built the device himself. (It was much-used and taped up in several places.) But no, the chap is Irwin S. “Filthy Pierre” Strauss, and the instrument is a melodica.
  • Finally, one of the creepiest articles I’ve seen in a couple of years. I considered and set aside a plotline in my upcoming nanotech novel The Molten Flesh that involved sexbots, real, fully mobile AI sexbots enlivened (if that’s the word) by the Protea device. Maybe I should bring it back. The original 1959 Twilight Zone episode “The Lonely” has always haunted me. Maybe sex is a sideshow. Maybe it’s about having something to care about that cares back, and therefore gives your life meaning. I could work with that.

New Revision of FreePascal from Square One Is Now Up

I just uploaded a new, corrected and expanded PDF ebook edition of FreePascal from Square One to my website. It’s free, and (remarkably) it’s closing in on completion. It’s laid out for the A4 paper size, largely because there’s so much Pascal activity outside the US. You can read it on a screen, or else print it to paper to put in a binder. It’s currently at 294 pages, and when complete I hope to keep it under 325 pages, since that’s a whole lot of paper to print, punch, and bind.

Still to be covered are the standard string functions, locality and scope, and simple file/printer I/O. That’s not a lot of material, and some of it has already been rewritten and edited.

For those who haven’t heard of it before, let me describe the project: I’ve taken my 1993 book Borland Pascal 7 from Square One and heavily rewritten parts of it for FreePascal. Borland Pascal 7 from Square One was the fourth and last edition of my very first technical book, Complete Turbo Pascal, published in May, 1985. That title, by the way, was forced on me by the (now extinct) publisher. Its original manuscript title was Turbo Pascal from Square One. The four editions taken together were in print for almost ten years and sold about 125,000 copies back in the 80s and early 90s.

The book’s mission is to be what Assembly Language Step By Step is to assembly language: An absolute beginner’s tutorial on programming in Pascal. This includes people who have not yet learned what programming is and have never written a line of code in their lives. I start by explaining the ideas of programming, and move from there to Pascal. FreePascal is my compiler of choice, largely because it’s free, but even more because it comes with the Lazarus IDE, which contains a superb GUI builder very similar to the one present in Delphi. FreePascal from Square One doesn’t cover Lazarus beyond installing it and using the code editor. Specifically, it doesn’t cover the GUI builder or Windows programming generally. The example programs all run in the console window.

More than half of the original book explains things that no longer apply: DOS programming, overlays, the Borland Graphics Interface, tinkering the interrupt vector table, and so on. All of that is gone. I’ve made a decision to stop just before OOP, and will begin a Lazarus book with a thorough explanation of OOP and software components. I’m also leaving out pointers, since the topic is heavily intertwingled (to use a wonderful Ted Nelsonism) with OOP.

I intend to keep writing books of new material about Lazarus as time allows, and will sell them as PDF ebooks and spiral-bound POD paperbacks. No timetable; I’m trying to write SFF novels mostly, and will work on Lazarus projects as time allows. We’ve spent the last couple of years working on our Scottsdale house, but that’s largely finished, and I expect a lot more free time in the next few years. So stay tuned. I may do one more “unfinished” upload, but after that I expect to put the wraps on it.