MSDOS Development With GCC

It might seem odd to think about programming in MSDOS in 2018. But if you are vintage computer enthusiast or have to support some old piece of equipment with an MSDOS single board computer, it could be just the thing. The problem is, where do you get a working compiler that doesn’t have to run on the ancient DOS machine? Turns out, gcc can do the trick. [RenéRebe] offers a video demo based on a blog post by [Chris Wellons]. You can see the video, below.

The technique generates COM files, not EXE files, so there are some limitations, such as a 64K file size. The compiler also won’t generate code for any CPU lower than a 80386, so if you have a real 8086, 80186, or 80286 CPU, you are out of luck. The resulting code will run in a real DOS environment on a ‘386 or higher or in a simulator like DOSBox.

You might be thinking why not use the DJGPP port of gcc to DOS. That sounds good, but it actually doesn’t produce true DOS code. It produces code for a DOS extender. In addition, [Chris] had trouble getting it to work with a modern setup.

The only real trick here is using the right combination of gcc flags to create a standalone image with the right codes. A COM file is just a dump of memory, so you don’t need a fancy header or anything. You also, of course, won’t have any library support, so you’ll have to write everything including functions to, say, print on the screen. Of course, you can borrow [Chris’] if you like.

The last pieces of the puzzle include adding a small stub to set up and call main and getting the linker to output a minimal file. Once you have that, you are ready to program like it is 1993. Don’t miss part 2, which covers interrupts.

If you pine away for QuickBasic instead of C, go download this. If you just want to run some old DOS games, that’s as close as your browser.

Continue reading “MSDOS Development With GCC”

Shirt Pocket Slide Rule: History Of The HP-35

In a recently updated post, [Codex99] has a detailed history of the HP-35 pocket calculator. Unless you are a certain age, you probably don’t think much of calculators. They are cheap and not very essential in this day of cell phones and PCs. But in the 1970s they were amazing technology and the desire of every engineer and engineering student.

The story opens in 1965 when Tom Osborne — who was not an HP employee — build a floating point calculator he called the Green Machine. Apparently, he had painted the balsa wood case green. He had been showing it around but failed to get any interest until he showed it to Bill Hewlett. Hewlett wanted it to do trig functions and offered him a six-week consulting gig to work on improvements.

HP engineer Dave Cochran helped out and also helped envision making the device keystroke-programmable. By 1968, this collaboration led to a 40-pound desktop calculator — the HP 9100 — that was the size of a typewriter. It could be yours for only $4900. Keep in mind, that same amount would buy two brand new cars in 1968.

Continue reading “Shirt Pocket Slide Rule: History Of The HP-35”

3D Printing Air Quality Study

You’ll often hear about some study in the media and then — on examination — find it doesn’t really apply to your situation. Sure, substance X causes cancer in rats, but they ate 8 pounds of it a day for a decade. That’s why we were glad to see [Chuck] post a series of videos about 3D printing air quality based on his practical experience. You can see the summary video, below.

[Chuck] is quick to point out that he isn’t a doctor or even a chemist. He also admits the $100 meter from IGERESS he is using isn’t necessarily high-quality test gear. Still, the data is a good guideline and he did get repeatable results.

Continue reading “3D Printing Air Quality Study”

Sign Of The Smith Chart Times

The Smith chart is a staple for analyzing complex impedance. [W2AEW] notes that a lot of inexpensive test gear like the MFJ-259B gives you complex readings, but fails to provide the sign of the imaginary part of the complex number. That makes it difficult to plot the results on a Smith chart or carry out other analysis. As you might expect, though, he has a solution for you that you can see in the video, below.

A common method is to increase the frequency slightly. In a simple case, you’d expect the imaginary part — the reactance — to go down for a capacitive impedance and up for an inductive one. Unfortunately, this doesn’t apply in many common cases, including when you are measuring through a transmission line which is probably what most people are doing with this type of test gear.

Continue reading “Sign Of The Smith Chart Times”

A Two-Range OLED Capacitance Meter

If you are just starting out in electronics, you need tools. But it is hard to build all your tools. Even though we see a lot of soldering station builds, you really ought to have a soldering iron to build the station. It is hard to troubleshoot a multimeter you just built if you don’t have a multimeter. However, a capacitance meter is a handy piece of gear, relatively simple to build, and you should be able to get it working without an existing capacitance meter. [gavinlyonsrepo] presents a simple design using an Arduino, an OLED display, and a few components.

The principle of operation is classic. On one range, the Arduino charges the capacitor through one resistor and discharges it through another while timing the operation. The amount of time taken corresponds to the capacitance.

Continue reading “A Two-Range OLED Capacitance Meter”

Fake Omron Relays Are Worth What You Pay For Them

We love taking a look at fake components and [BigClive] has put together something really special in this category. When he saw he could buy suspiciously cheap Omron relays on eBay, he knew something must be fishy so he put in an order.

Some of the fakes he received are even marked Omrch instead of Omron, and your ear can detect the counterfeits by the varying sounds they make during operation. But of course [Clive’s] investigation goes much deeper than that. He started driving the relays to their rated voltages and taking temperatures with a FLIR camera.

The results were not surprising. At lower voltages the relays seemed to do okay, but closer to the maximums it’s obvious the components in the fakes are not rated for enough power to work. You can even see some charring of a resistor and its plastic holder from having too much power for the component’s rating. [Clive] actually replaced the errant resistor with a higher value resistor that reduces the current consumption and power dissipated.

He was also suspicious of the metal content of the contacts. You may think that doesn’t matter, but actually, the composition of relay contacts is critical to making reliable relay circuits. Depending on how much current flows and if the switching is dry (that is, made without current flowing) or not dictates use of different material.

The conclusion was that these relays might work for light duty projects, but for commercial projects or operating near the edge of the ratings, you want to give these a pass. If you do need a lot of low-power relays on the cheap — to compute a square root, or to build the whole computer — [Clive’s] process of testing and characterizing these fakes may come in handy for you.

Continue reading “Fake Omron Relays Are Worth What You Pay For Them”

Diablo Drive Appears To Be Cursed

[CuriousMarc] didn’t think it would be a big deal when a former Xerox employee sent him an Alto Diablo drive for service. Turns out the drive was cursed — it would destroy everything it touched including a set of heads and an alignment cartridge. [Marc] and a partner spent two months trying to get the drive operable and the video of their process is pretty interesting.

We were interested in the troubleshooting, but we were really envious of their lab, full of HP workstations, an IBM mainframe, and even a Selectric. We kept having to rewind the video because we had tuned out while we were staring at some of the equipment in the background.

The guys got a lot of practice aligning the heads on the drive. Because the crashed head was bent, it actually dug into the alignment cartridge so on subsequent attempts they had to manually load the disk past the damage. They learned to leave the disk a little out of alignment because tightening the assembly will move it a little bit. If you were already aligned, the heads would be off after you did the tightening.

They used a custom FPGA-based tester that [Carl] developed after reverse engineering the disk format. It is amazing to watch the big drive in action and realize that a standard cartridge for this machine was 2.5 megabytes. There was another controller and disk system called the Trident that would get you a whopping 80 megabytes, but we don’t think this is one of those.

Did they succeed in exorcising whatever demons lived in the drive? Watch the video and find out. Even if you never have to fix a Diablo drive yourself, you’ll be entertained. Especially when they work out how to do a current adjustment on the drive by simulating the circuit in Spice.

We’ve seen a lot about the Alto which is surprising considering how few of them were built. We’ve seen a restoration and even an odd use for a light bulb related to the Alto’s CRT.

Continue reading “Diablo Drive Appears To Be Cursed”