Jeff Duntemann's Contrapositive Diary Rotating Header Image


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.

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

  • Suddenly the Sun woke up, perhaps afraid that it would get typecast for weak peaks. A sunspot number of 282 is only a little low for a sunspot maximum, and higher than I’ve seen since 2004 or so.
  • The Atlantic takes on the interesting phenomenon of false memories, which I did back in 2009 in a series that started here and continued here, here, and here. As I write my memoirs, I’m checking anything I can against my sister’s memories, as well as any old papers or photos I have lying around in boxes. It’s amazing how much I remembered wrong, and I wonder how much may be wrong that I have no hope of every verifying.
  • Did your favorite classic car ever appear in a movie or on TV? Well dayum, there’s a Web site for that. (Thanks to Ernie Marek for the link. And yes, there are loads and loads of 1968 Chevelles.)
  • Reader DennisK pointed me to LXLE, a lightweight Ubuntu-based Linux distro designed specifically to look and work like Windows XP. I have lots of SX270s here destined to become bookends (and several that already have) so there’s no shortage of test platforms. I’ll let you know what I think after I try it.
  • The Intel Galileo board will be shipping by the end of November, for $70. It supposedly competes with the Rapsberry Pi, but to me it looks like half the computer for twice the price. The Beagle boards have more promise. Anybody using one?
  • Here’s a quick history of optical disks.
  • What do you feed that pharaoh you just mummified? Mummified beef ribs.
  • These peculiar ads (one depicting a brand of salami as a dirigible) don’t include Flying Bomb batteries (battery as bomb; what could possible go wrong?) or another brand of battery I saw in the 1960s that shows an Asian couple riding a battery like a horse. Or could it have been needles and thread? Oh, and meet Seaman Strangelove. There are many more Depression-era product posters (salami was popular) with similar metaphors on the walls of hipster restaurants everywhere.

Odd Lots

Pi, Oh My


My longtime friend and collaborator Jim Strickland has had a Raspberry Pi board almost since the beginning, and he startled me by handing me one as a Christmas present. I was aware of it but hadn’t researched it deeply. Here’s a good place to start if you’re new to the concept.

Basically, it’s an ARM-6 board with HDMI and composite video output, two USB ports, and a standard RJ45 Ethernet connector. For disk it uses an SDHC card. There’s an I/O header for connecting to physical gadgets like relays and lights and things. There’s more than one OS available for it, but most people use the adaptation of Debian Wheezy called Raspbian.

I don’t like having circuit boards flopping around in mid-air, so I drilled and tapped two 4-40 holes in a husky 3/16″ aluminum plate and mounted the Pi on a pair of 3/8″ nylon standoffs.

Putting it together was a snap. I downloaded the Raspbian image file, wrote it out to a spare 8 GB SDHC card I had in the drawer with Image Writer for Windows, plugged the card into the card slot on the board, hooked up the cables, and turned it on.

Bootup isn’t snappy, and the first time in you have to set a few things like time zone, but in a couple of minutes I had Linux on my big-screen LED TV. The small black item connected to the USB port block in the photo above is the Bluetooth dongle for a Logitech wireless keyboard and mouse. This leaves me a port free for something else. Ethernet came to the device through a pair of Linksys Powerline bridges, which I’ve described here before.

I now have what Michael Abrash would call “Linux on my bedroom wall.”

This particular distro comes with Python and Scratch preinstalled, but Jim’s already gotten the ARM-6 port of FreePascal/Lazarus downloaded and running. That’s next on the list for me. I’ll wrestle with that another time, as it’s getting late here. I have a special purpose in mind for the gadget which I won’t spill just yet, since it may not be realistic. More as I learn it.

Odd Lots

Odd Lots

  • You’re getting two Odd Lotses in a row for a reason. Stay tuned–I’ll try and explain tomorrow, if I don’t run out of Aleve.
  • Bruce Eckel is returning his Kindle Fire because the damned thing will not render .mobi files. C’mon, Amazon. I mean, come on. (Thanks to Mike Bentley for the link.)
  • Xoom 2, where are you? Whoops, it’s going to be called the Droid XYboard to distance itself from the Xoom brand, which was done in because Somebody Didn’t Want It To Have a Card Slot. (Don’t know who. Have suspicions.)
  • Charlie Stross makes a good case that DRM on ebooks (as required by the Big Six) is a stick handed to Amazon with which to pummel the Big Six. Read the piece, follow the links (make sure you know what a “monopsony” is) and then read the comments.
  • Schumann resonance waves can apparently be detected from space. This is surprising, as my earlier readings suggested that they only exist by virtue of a sort of immaterial waveguide formed by layers in the Earth’s atmosphere–the same waveguide effect that allows hams like me to bounce signals around the world.
  • Femtotech? I postulated a “femtoscope” in my novel The Cunning Blood, but it was used to plot quantum pair creation and did not rely on exotic matter. I’m not sure such things are possible, or could be done in any environment where we could live or even work through proxies. But as with a lot of things (especially LENR) I would hugely enjoy being wrong.
  • I torrented down the brand-new Linux Mint 12 Lisa the other day, and like its predecessor it will not detect the video hardware correctly on my 2009-era Core 2 Quad with NVidia 630i integrated graphics. Somewhat surprisingly, it will install on an older Dell GX620 USFF with (as best I can tell) no video problems. Not sure if I like GNOME 3, though. MATE, a GNOME 2 fork, has promise.
  • I may have made this point once before, but hard steampunk authors should have the Lindsay Books catalog on hand, or at least have the site bookmarked. These are books explaining how to actually do steampunk technology, often in the form of reprints of original Victorian-era reference texts. Thermite, brass, steam engines, and loads of other goodies just as great-great grandpa learned them. (Thanks to Bruce Baker for the noodge.)
  • One of my German friends told me that plagiarism in German doctoral theses is so widespread that it’s spawned a crowdsourced mechanism for detecting it. That’s the abbreviated English-language version; if you have a reasonable amount of German, go to the richer, fuller main page.
  • Very spooky time-lapse video of a little-known physical phenomenon. (Thanks to Pete Albrecht for the link.)
  • I originally thought this was a hoax. On the other hand, I have a Tim Bird and I love it. It’s hard to believe that such things actually work as well as they do.
  • Sometimes you wear what you eat–or at least a reasonable facsimile.

Odd Lots

Minty Failness

I gave it a good shot and I tried, honestly I did. But Canonical’s Unity UI simply doesn’t work for me. It’s obvious that Canonical is trying to create a single UI that will serve end-user computing from top to bottom. It’s just as obvious to me (now that I’ve had six weeks or so to play around with a Droid X2) that there is no single “end-user computing” anymore. Desktops are fundamentally different from smartphones, or anything else (tablets, possibly; we’ll see) that is primarily tap-and-consume. I’m having no trouble working the Android UI on my phone, and Android habits don’t intrude on my desktop synapses. I’m not confused or in any way slowed down by the differences between the two, no more than I’m confused about the differences between a shovel and a rake.

So if Unity is all I get under Ubuntu, Ubuntu has to go. Others seem to agree with me, and at times the discussion gets disturbingly violent. Online I’m seeing that huge numbers of people are fleeing Ubuntu for Linux Mint, which I’d barely heard of a year ago. I have to smile a little bit, because Linux Mint is Ubuntu, basically pulled back to a variation on the GNOME 2.3 interface. The upcoming release (Mint 12) will move to GNOME 3, which worries me a little (I like GNOME 2) but I’ve seen word that Mint 12 will allow users to have something very like the old UI–which is precisely what Canonical did not do with Ubuntu and Unity. It was Unity or the highway, and boy, it’s bumper-to-bumper out there.

There’s an enormous issue of why we’re suddenly tossing older and much-loved UIs away without nary a glance over our shoulders, when there’s no compelling reason to adopt one of the new models. Programmers like to create Shiny New Stuff, fersure. I in turn don’t like to change the way I interact with the machine I use, unless such changes make me a lot more effective. So far, the costs in relearning ordinary tasks far outweigh the fairly paltry benefits for me.

I’ll take up that issue eventually. In the meantime, I’ve hit the highway, and installed Linux Mint 11 Katya in its own partition here on the quad core. The OS looks great and works the way I’m used to working. I have some minor quibbles, like the failure of the Software Manager to tell me when it’s done installing something. Ubuntu does this well, but Mint installs and gives no sign. This was critical when I installed WINE, since (because WINE is not an app, strictly speaking) it’s tricky to determine if WINE was fully and correctly installed. Because running Software Manager again and selecting WINE still indicates “not installed,” I think there’s something wrong.

Small stuff. The big deal is that Mint doesn’t work well with the integrated graphics on my EVGA NForce e-7150/630i Core 2 Quad motherboard. The default graphics drivers worked, but looked clunky and don’t support effects. Installing the recommended proprietary NVIDIA drivers produced weird graphics failures, including windows refusing to render once they’re over a certain size. (Some windows would not render at all, and simply remained blank and white even when first instantiated.) Using the supposedly experimental NVIDIA 173 drivers worked better, but still fails on certain apps, especially Stellarium, which worked exactly once and then comes up with a blank, black window every time. I’m not willing to give up Stellarium, so at this point Linux Mint is on hold while I wait for Mint 12 Lisa.

Linux Mint has supposedly become the 4th most popular OS on the planet. It’ll be interesting to see if that continues to be the case once they cut in the mandatory GNOME 3 upgrade. I’ll give GNOME 3 the same consideration I gave Unity, but I’m also looking closely at the Xfce UI and Xubuntu. It’s going to be an interesting year in the Linux world. I’m keeping all my old Linux installer .iso files, trust me.

Odd Lots

  • I’ve just added a book catalog page to my primary WordPress instance of Contra. There’s a link on the title bar at the top. If you’re using LiveJournal, here’s the direct catalog link. From my WordPress instance you can also go direct to an individual title within the catalog by clicking on one of the cover thumbnails in the right sidebar. It’s a little barebones for now, but it’ll do until I finish getting the Copperwood Press site rehabbed.
  • This sounds worse than it probably is: B&N has restricted sideloaded content to only 1 GB of the Nook Color’s internal memory. The NC has become very popular as a somewhat broader device than an ebook reader, and I’m sure B&N is worried that people will fill the little slab up with so much of their own stuff that there’s no room to buy more from B&N. The key is the MicroSD slot, which (for the time being) can hold up to 32GB. If sideloaded content stored on the MicroSD card is completely accessible to the Nook’s machinery, it’s really not a terrible problem. (I don’t have an NC so I don’t know for sure.)
  • B&N’s certainly been busy: There’s a new, inexpensive, smaller, lighter e-ink Nook in the pipe called Nook Simple Touch. 6-inch display and two months on a charge (sheesh!) will appeal hugely to commuters who just want to read books and not do seventeen things at once. $139; mid-June arrival.
  • Then again, if you want a cheap Nook ($99) and don’t mind the orginal model, go to eBay.
  • Here’s an expert’s braindump on ebook creation/formatting, which clearly highlights the appalling nature of ebook formats and ebook creation tools. Mobipocket in particular comes in for some (well-deserved) hard whacks with the baton. None of this crap should be necessary. An epub file is basically a collection of HTML documents with an external TOC, all wrapped up in a ZIP archive. Why is this so hard to do? (My thought: Immature rendering engines, like Web browsers in 1994. We are compensating for bad software.)
  • This is the high road toward SSTO, and I hope to hell they can pull it off. The trick isn’t so much getting to orbit as getting back intact. We’ll see.
  • From the Words-I-Didn’t-Know-Until-March-But-Forgot-Until-Yesterday Department: oneiric; meaning of or pertaining to dreams. Also the adjective in the next Ubuntu animal version code: Oneiric Ocelot, due this November. Not new news, but I forgot to mention it in March. Dreams, sure. But having read some of the fights that the discussion of Ubuntu Natty’s Unity desktop has triggered since then, I also picture an ocelot that lost one ear in a bar brawl.
  • Bichons are notoriously hard to housebreak. Carbreak too, evidently.
  • From the Painfully Obvious Research Department: A study (PDF) suggesting that when we see people breaking the rules, we assume that they’re powerful. Duh. (One wonders if a lifetime of watching powerful people be abject shitheads could have anything to do with it.)
  • And a much more interesting study on the role that some airborne bacteria play in acting as seeds for precipitation. Get a look at that hailstone! (Duck!)
  • Amen, brother. (Thanks to John Ridley for the link.)