Windows, IOT, Raspberry PI, Intel, Win32 and BASIC

Now this definitely is a strange title for an article isn’t it !

A step back in time

Give me a few minutes to explain and maybe it will make sense. Let me start with the Raspberry PI and also IOT (Internet of Things). Both are really big news in the tech industry today. Raspberry PI is an amazing computer project which has opened up doors to all sorts of new ideas, encouraging the “Maker” market (those who are creative and who like to design and make new useful tech designs) and possibly could be a springboard even for the Internet of Things. Tiny computers which are low cost, yet powerful, which can be connected to other devices to control them provides all sorts of possibilities for those who want to create new technologies.

This brings me back to the 1980’s when the home computer was first starting to change how we view computers. Remember the Commodore 64 ? While the high price for such computers (albeit cheap compared to what a business computer cost in those days) limited who could afford to use one, those who finally got one did some amazing things with them. Home computers were small for their time (compared to their business counterparts), were open when it came to hardware specifications and were well documented for low level “hacking” as you might call it today. Kids were learning to program on their own and unlike today where so called “programming for children” software teachs little about how a computer really works, home computers of the 1980’s were teaching young people how to do things from a very low level (bits, bytes and nibbles). If it were not for the high cost for such computers, computer technology likely would have sped up much more significantly back then. To better appreciate what I mean, just take a look at some of the popular home computer magazines which were available back then like “Compute Gazette” (see:  Compute Gazette magazine gallery ).

Back in the 1980’s I was learning some deeper concepts about programming on my Commodore 64 (see:  Commodore 64 computer ). For programmers today, try to imagine writing software for a computer with only 64 kilobytes of RAM memory and a 1 mhz CPU (6510). You learned how to squeeze every little bit of power out of the computer. For younger programmers today when I mention the BASIC programming language, you might think of coding in an old style BASIC interpreter, but back then I was coding using Abacus BASIC which was a real BASIC language compiler, rather than an interpreter. Even that was not fast enough for me so I used the BASIC compiler to write my own simpler compiler which generated even faster 6502 machine code so I could write my first (family friendly) video game for the Commodore 64, which I sold to the Compute Gazette magazine and it was published in the October 1987 issue of compute gazette. I learned 6502 machine language and it was amazing how much could be accomplished with so little of a computer. Back then it was all about young people learning on their own how to push the limits of computer hardware.

The Raspberry PI and similar devices are trying to bring back some of the joys of the early years of computing, but at a much lower cost.

Introducing Windows

Now we are in the age of Windows. Graphic User Interfaces are the norm now. So where are the Windows based Raspberry PI like devices ? Where are the low cost computers for todays “makers” ? While I am impressed with what Raspberry PI has done, I have been waiting and waiting for a true Intel x86 based low cost device which can turn Windows into the Raspberry PI of the future. No, I do not mean an ARM based (aka. Windows RT) device, but a real x86 based device capable of running a real Windows desktop application. Well, actually such devices are already here in a fashion, but not actually recognized. I have watched the Windows tablet market carefully over the last few years and amazingly now the market is full of low cost Windows tablets. You can purchase a Windows tablet for as low as $69 on sale and it has a lot more raw power than a Raspberry PI. Then, in the last year, we have seen Windows PC on a Stick devices come to market for about $100. Just plug it into a TV set HDMI port and you have a computer (add a keyboard and mouse too). But more is coming, now we are seeing x86 based Windows 10 Raspberry PI like computer boards with Ardunio support for under $100 coming to market (see:  LattePanda Windows 10 device ). Yet, there is a need to bring the prices down even more to about the $50 level on such computers to make them more readily available to students and the young “makers” of today. They need to get cheaper (price) and even smaller.

The missing part of the Windows tiny educational computer

There is a missing part though to the Windows version of a Raspberry PI replacement. Actually there are a few missing parts. What is that ? As a long time programmer who actually lived in the era of the real first home computers, there are a couple factors I see missing today. First, is BASIC. No, not Visual Basic dot.net which is so far from the BASIC’s of old, but real BASIC. Why ? Two reasons actually. First, have you noticed in the hobby world of programming, BASIC has always remained the leader. I once saw an online video discussion between some experts in the computing field commenting about one reason classic visual basic was so popular. it appealed to the hobby programmer. Hobby programmers are more than simply people who program simply for fun. Hobby programmers are people who are not programmers by trade, but first start programming for fun, but later program to solve real world problems. They see a problem at work and then try to solve it by writing some software specific to their trade. Some very high quality commercial software first started like this. The advantage such hobby programmers have is that they understand the initial problem (task) better than the typical programmer does. Surely a carpenter knows his trade better than a programmer does, so if a carpenter who is a hobby programmer writes some software to solve his problems on the job, lilely it will be much better than what a professional programmer can do. Sure, it may not be as slick or fancy as what a real programmer can do, but it will likely be bettered suited to the task at hand.

Have you noticed that BASIC still “rules” as “king” in the hobby programming world ? Even in the microcontroller world where companies embedded a scripting language in the microcontroller, they often choose BASIC. Why ? Ease of use. Appeals to the hobby programmer (who may be a pro in his trade, just not a professional programmer).

BASIC has come a long way and need not be old fashioned like the scripting languages of old (interpreter of the 1980’s). BASIC can be fast native compilers, can support inline assembler, provide modern constructs, as well as any C compiler can.

You might say, “you can’t write a WIN32 app using BASIC today”.  Actually you can. There are a number of BASIC dialects available today in the hobby market and even a few which are at a professional level (see:  BASIC dialects for Windows ). Some are scripting languages. Some target game developers. Some are for professional WIN32 programmers. BASIC is the language of students, hobby programmers and the like.

Here is a simple WIN32 app I wrote (uses a static library which I also wrote using the WIN32 API) which does 2D Sprite animation. The beauty of this sample is that the EXE is only 84 KB in size and no runtimes at all. No dot.net. Just the WIN32 API. See how tiny WIN32 apps are. This is why they are so perfect for building Windows apps for a tiny Windows device.

Tiny WIN32 app demonstrating sprite animation

But what about Windows ?

You might be saying, this all sounds nice, but what about Windows itself ? Doesn’t Windows (x86 or real desktop) require the latest hardware and powerful programming tools like Visual Studio ?

The short answer is NO ! The long answer is absolutely NOT !

This all goes back to about 2002. Dot.Net came on the scene (see:  Dot.Net version history ). Dot.net changed things for Windows. I don’t want to go into the pros or cons here about dot.net, especially since dot.net has a number of benefits many programmers take advantage of today. Suffice it to say though, that one weakness of dot.net is that is shields programmers from the core operating system which is extremely light weight and fast, everything a tiny computer, especially one possibly used for IOT devices really needs. Take a lesson from history. Look at what hobby programmers of the 1980’s accomplished using computers with only 64 KB of RAM and a 1 mhz CPU (that is 1/1000th of the power of todays very low powered CPU’s). Hobby programmers were not limited by the hardware because they tapped into the raw power of the computer and its operating system.

The same can be done with x86 based Windows devices running Windows 10. Rather than Windows for IOT or even Windows RT running on ARM, why not Windows Core (WIN32) running on a real Intel based x86 (or AMD x86) device. But that is not powerful enough you might say !

The raw power of core WIN32 Windows

While this article is not the place for me to discuss my commercial work, I do want to at least put that last question above to rest. For those thinking that even the core Windows WIN32 core requires a lot of raw computing power as well, let me put that to rest. The WIN32 API provides such fast performance and requires so little computing resources it might amaze you. It does me.

One of the reasons I know this is because of a style of programming I have used for years which has served me well. It goes like this: The typical programmer writes his software using the lastest powerhouse studio development tools on the latest powerhouse computer. To test this observation, a few simples questions to you programmers out there.

How much RAM is on your work PC ? (4 gig, 8 gig, 16 gig or more)

What CPU is on your work PC ? (Core I3, Core I5, Core I7)

Let me guess. Core I7 with at least 16 gigabytes RAM. Am I close ?

Now for the last 15 years I have been a WIN32 programmer.  No dot.net ! No Visual Studio ! (I use Powerbasic, with just a simple code editor). My current work PC is an old Windows Vista PC, which I upgraded from a Celeron CPU to Pentium D (3.2 ghz) with 2 gig of RAM.

I have to apologize though, because my current PC is a bit “overkill” when it comes to computing power. My previous development PC for a number of years was a Windows XP computer with 764 meg RAM,

I have to apologize again though because for a good portion of those 15 years I previously was using a Windows 95 PC with a 233 mhz CPU and which I upgraded to a wopping 256 meg RAM.

Now before you get the idea that I could not afford a new computer all this time, my development PC was by choice, not by necessity. For example, today, while I work on the above mentioned Vista PC, I also have a number of much more powerful PC’s, running Windows 7, Windows 8.x and Windows 10.

You see, as a WIN32 programmer I force myself to work on a much slower computer by choice so it allows me to actually see where the true bottlenecks in my software are. If my software runs really fast on my development PC, then imagine how it will run on the latest PC.

This unusual (I admit it) development style has taught me something interesting. The raw WIN32 API is very powerful (performance) and it requires very little overhead. The perfect style of coding for tiny x86 based Windows devices.

Back to the Raspberry PI

Now image the following:

A Raspberry PI like Windows device running real x86 based (32 bit) Windows. It only needs a 500 mhz CPU, while a 1 ghz would be the top end. Pull out dot.net completely from Windows 10 and simply leave the core WIN32 API (or at least don’t depend upon dot.net too much) and make sure Windows 10 runs efficiently on 1 gig memory or even less (say 512 meg). While the 16 gig drive space on some Windows tablets is simply too little, for a device which only needs to run the WIN32 API (or minimal dot.net), 16 gig disk space would be plenty.

Now bring such a device down to about $50 (if they can sell a Windows 10 tablet for $70, then surely this could be done) so it is affordable, provide an Ardunio input/output like system in it, but with the necessary system DLL to call to access the input/output and then lastly provide a much simpler BASIC compiler (C if you like, but BASIC would appeal better to hobby programmers) so you can write code more easily and now you have a real “maker” device, which can be used to teach programming. No OOP require either, since the core WIN32 API is not OOP based but is procedurally based (easier to teach IMO). Create a system like this and then “stand back” and watch the amazing things students (and adults alike) create.

Now I will go one better. Make the device completely self contained (a mini tablet with screen), so no extra case is needed. Put some kind of external input/output ports on it (for the arduino input/output) with simple plug and play cables to attach. Make it usable on its own display and add HDMI support to plug into a TV. Then provide a mini USB port for a mini (inexpensive) keyboard or even just BlueTooth. Make the whole package (device with built in screen, aka tablet like) with charger, HDMI connector and charger, plus keyboard included for about $50. Now you have a real hobby device perfect for schools and the home hobbiest.

Raspberry PI.org, Intel, Microsoft ! Are you listening ?