Click here to Skip to main content
13,198,322 members (54,006 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

7.4K views
7 bookmarked
Posted 29 Feb 2016

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

, 29 Feb 2016
Rate this:
Please Sign up or sign in to vote.
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 provide all sorts of possibilities for those who want to create new technologies.

This brings me back to the 1980s 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) was limited to those 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 teaches little about how a computer really works, home computers of the 1980s 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 1980s, 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 .NET which is so far from the BASICs 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, likely 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 1980s). 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 .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. .NET came on the scene (see: .NET version history). .NET changed things for Windows. I don’t want to go into the pros or cons here about .NET, especially since .NET has a number of benefits many programmers take advantage of today. Suffice it to say though, that one weakness of .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 1980s 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 CPUs). 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 .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 whopping 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 PCs, 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 imagine 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 .NET completely from Windows 10 and simply leave the core WIN32 API (or at least don’t depend upon .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 .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?

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Chris Boss
Software Developer Computer Workshop
United States United States
Chris Boss is the owner (and programmer) of a small software development business in rural Virginia, called the Computer Workshop. For the last ten years or so he has been developing tools for use by Powerbasic programmers (see: http://powerbasic.com ). His main product called EZGUI (Easy GUI) is a high level GUI engine with Visual Designer and code generator. It is in its fifth generation now. He is an experienced Windows API programmer (more low level) and has experience in writing GUI engines (forms/controls), drag and drop Visual Designers, Graphics engines (printing and to the screen) and one of his favorites is a Sprite engine (2D animated movable images). His current project is version 5.0 of his main product EZGUI, adding such features as multi-monitor support, component engine, custom control engine, superclass engine and the latest project a 3D OpenGL based custom control. One of the goals he has is to push the limits of Windows software development, while making it easy, fast execution speed, small footprint (size of executables) and code reusability while providing a more graphic experience in user interfaces, while still being able to write software which can fit on a floppy disk (small footprint), use minimal amount of memory and able to run on multiple versions of Windows from 95 to Win8.

You may also be interested in...

Comments and Discussions

 
PraiseMy vote of 5 Pin
Member 117408551-Mar-16 22:03
memberMember 117408551-Mar-16 22:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.171020.1 | Last Updated 29 Feb 2016
Article Copyright 2016 by Chris Boss
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid