Thursday 16 February 2012

The First Steps in Coding. Only 124K of RAM.

I’ve been using computers since the original IBM PC came out. That computer had an 8088 Intel CPU (8 bits). I don’t remember the clock speed but 4.4 MHz sounds familiar. There was 124K of memory and one 5.25 include floppy drive. Later the memory was doubled to 256K and a second floppy drive added. There was no modem. No networking. It was a stand alone computer that could only do what your programs would allow you to do. No free apps to download.

To run the computer you would first boot it up with the operating system disc in the drive. Once up and running, a simple “A:>” starred at you and waited for you to type something like DIR A: or debug myprogram.exe. Windows and GUI weren’t here. There was a keyboard, but no mouse. The screen had one colour: a dark green. A monochrome screen.

Throw in a second floppy disc to run Word Star--an adequate word processing program. Or another disc for Lotus 123, a spreadsheet app. I had some use for these programs, but I spent most of my time on it coding and reading. I had a subscription to PC Magazine which had all sorts of cool code and write ups. I had the PC DOS manual. A small binder. I read through every page. I tried all the commands. Learnt about the operating system.

I played about with the debug program to learn about the machine code driving it all. At first it all seemed alien, but after a while, it became clear. There’s a reason for all those cryptic codes.

Then there was the BASIC computer program. On my IBM it was BASIC or BASICA. On the MS systems, it was GWBASIC. Both were similar. There was a manual in a three-ring binder and I went through every page testing all the statements and functions. I spent hours and hours running different code. I never had any specific task in mind, it was simply seeing what I could or couldn’t do. The most memorable aspect was the graphics. Being able to draw lines and move them around. Draw circles and change them. You’d think I’d got into gaming, but I’m not a gamer. I never played the ones in the arcades or on computers.

To run a BASIC program you would first create your source code in a file then type: basica myprog.doc to see it run. It was an interpreted language. No compiler (There were, but not the one I had).

I thought it’d be cool to run a program straight from the command prompt as in: A:>myprog.exe. That happened when I got hold of the 8088 Assembler Program and started coding in it. That’s a different world of programming, but I learnt it. My first program in assembler was DEC2HEX.EXE.

Type in the name of the program on the command prompt followed by a decimal number and press enter. The program would read this number, convert it from decimal to hexadecimal and display the hex number. Cool. I was so proud I could do it.

Those were the days.

Years later I’m still coding, still learning about computers. There’s no shortage of things to learn and this blog is about lessons in computer coding.

No comments:

Post a Comment