• Please review our updated Terms and Rules here

How to start programming?

juicylemon

Experienced Member
Joined
Apr 7, 2012
Messages
51
Location
Deventer, the Netherlands
Hello everyone,
I'd like to try some programming on my IBM 5155, but I do not know where to start. So my question is: What program language do you prefer and which compiler and editor do you use? Do you know a good place (on the web) where I can find documentation/guides? BTW, my 5155 has no hard drive.
 
:) You have a GREAT start. Since you're on an IBM hit ctrl+alt+esc and it should boot you right into the built in BASIC ROM. It's a great but monopolizing sale that Microsoft was able to push on folks to have their computer be usable right out of the box. From there you just need a tutorial in basic which can be found on the net for free.

Alternatively if you choose to get into more difficult coding, C or Assembly would be good but a step or two more difficult depending on your programming background.

You know, I've been hunting right quick since my memory on keyboard shortcuts is failing me in confidence.. either way if that doesn't work let me know or perhaps someone who has it memorized can speak up. It does have the basic in the ROM, I used that to demo the system at the last VCF to show it's functionality "out of the box".
 
Last edited:
Does the 5155 include ROM BASIC? There's always that, for starters.

Personally, I find that 8086 assembler isn't that hard, and DOS is dead simple to work with. Ralf Brown's x86 Interrupt List is a comprehensive to both BIOS and DOS calls, and emu8086 includes a pretty solid guide to 8086 assembler in general. I don't know what the best assembler that can be run on a 5155 is, but if you don't mind doing your editing/compiling on a modern machine, NASM is quite nice.
 
PC DOS has BASICA which has a few more features than the ROM BASIC and will permit the saving of files to disk. MS-DOS branded versions have either GWBASIC (basically the same) or the slightly more capable QBASIC.

For a development environment that fits on a single 360KB floppy, Turbo Pascal is a nice option for anyone that tolerates Pascal. See http://edn.embarcadero.com/article/20792 for a free legal download of version 3. Version 4 and later start pressing against the limits of a 5155.

QuickC and QuickBasic plus their Borland competitor TurboC each need a minimum of 448KB plus 2 floppy drives or a hard disk. These are not products suited to a IBM Portable.
 
Last edited:
Exactly what kind of programming do you want to do? (i.e. what's your objective?) Programming database applications is very different from programming device drivers, for example.
 
Exactly what kind of programming do you want to do? (i.e. what's your objective?) Programming database applications is very different from programming device drivers, for example.
Well, I would like to try things like creating a dos program to control the parallel and serial port for some user projects and drawing some shapes on the screen etc. I have done some tutorials about assembly and basic on the C64 and I have some experience with c++.
 
QuickC and QuickBasic plus their Borland competitor TurboC each need a minimum of 448KB plus 2 floppy drives or a hard disk. These are not products suited to a IBM Portable.

Actually, with QuickBasic v4.5, you can pull out just the necessary files to compile (IIRC, qbl.lib, qb.exe, and a linker file - I forget it exactly, but if you pay attention during the file process, you'll see all the files used). Once you have these files, copy them one at a time to a new disk, and then use PKLITE to compress the EXEs down. You'll be able to fit the entire QB4.5 IDE and compiler onto a single 360kb floppy with room to spare - though you'll want to immediately move your compiled program to another floppy for permanent storage, as the leftover space on the compiler floppy will be something in the 60k range.

Also, you'll want to keep your conventional memory as clear as possible - back when I did this, I used DOS 3.3 and 5.0 as my norm.
 
Well, I would like to try things like creating a dos program to control the parallel and serial port for some user projects and drawing some shapes on the screen etc. I have done some tutorials about assembly and basic on the C64 and I have some experience with c++.

For hardware programming, most texts and datasheets will be couched in terms of assembly language, so that's a good starting point, just for the sake of understanding. Many HLLs have some sort of library or even inline assembly programming feature, so you can pick your language.

If I were to teach a HLL, I probably would recommend Modula-2 as a starting point, as it's fairly rigorous and there's not much of "I wonder what this does?" to it.

Pascal would be another good language. I do realize that neither of those are the "in" languages of today, but that doesn't mean they're bad.
 
I would skip Pascal and just do C if one was inclined to go that route. I never really understood why creating a C-like language to teach folks before C was useful (but that's just me.. and yes I did learn Pascal in school but that was because they didn't have any real CS teachers just coaches that didn't know about programming other than their state sponsored course notes). Assembly will give you the most flexibility with hardware control and if you've played with it already you might not have that hard of a time. I know you can do port control and checking pins in basic on other platforms (Commodore) pretty easily, I've never tried on a PC but it probably does also. Most of the serial programming I saw and did on the PC was transferring files or using a modem.
 
My issue with C as a starting language is that it's just too easy to write sloppy C. It's much harder to write sloppy Pascal or Modula-2. There is much to be said for rigor.
 
I dunno, I've always wished I started with C myself. The problem with the "training wheels" philosophy for teaching programming is that bugs and bad code are going to happen, no matter what language you're learning. Becoming a good programmer isn't about staying inside the lines that some languages forcibly keep you in, it's about good mental organization and thoroughness in testing, and Pascal and its kin are, in my opinion, no better or worse suited for that than C, Forth, or Basic. And C has the advantage that the language itself does nothing whatsoever to hide the machine from the programmer; the libraries exist to save you from having to interact directly with the hardware, but there's no hoops you have to jump through if you decide you want to. That's a major plus in a DOS environment, where half of doing just about anything is tweaking hardware and writing to video memory.
 
My first expose to programming was machine code on a KIM-1. After that it was BASIC, Pascal and then C. I was most impressed with C, but pointers can be troublesome for new learners. Since the OP stated that he has some experience with C, IMO he should stick with C or C++ and expand his knowledge of that language. There were some good compilers written for the DOS environment. There are also some good FREE compilers available for current versions of Windows also.
 
Or try Lattice C, if you can find a copy. It'll run from two floppies--it was the C that Microsoft used (or told its OEMs to use) during the DOS 2.x days.
 
Hi
I still consider Forth as a best first language.
It will help you more at thinking about the problem
you are trying to solve rather than spending
your time trying to make boiler plate code for the
particular language your working with.
As an example:
: hello
." Hello World!" cr ;
Then just type:
hello
to execute it.
No fiddling with make, compile, libraries
or linkers.
Dwight
 
Back
Top