Tuesday, August 3, 2010

That'll be enough I/O for a start

After further toying around with the input function, I've abandoned it. I think I can safely stick with using what I have for now, and start to get into the real meat of the Hydra.

So now begins the search for a few simple graphics programs.

Monday, August 2, 2010

Numerical input is done


One of the drawbacks to this routine is that you can't see what you typed in. However, if you combine the keyboard with the screen routines into one spin file, I'm pretty sure that would be resolved pretty quickly.






This is how the routine would be used in a program

Tuesday, July 20, 2010

Input: Take Two


I think I'm going about the INPUT command the wrong way. I think the right way to go about it is somewhere within the Parallax Serial Terminal OBJect code. It's meant for a specifically designed terminal, but I believe it can be easily converted.

Monday, July 12, 2010

Input

Now that I have a good handle on simple text output, I'm going to need to figure out how to handle input. More than likely I will have to come up with a PUBlic function that behaves as such:

PUB instr (return S[string])

int i = 0

repeat while not(CR)
S[i] = getkey
i++
end repeat

Then figure out some way to convert from string to integer.

I started work on an unfinished program and so far, I have the following:



This is based on a program from the book, "TRS-80 Programming in Style" by Thomas Dwyer and Margot Critchfield. I was attempting to kill a few birds with one stone, until I realized that I should get the INPUT function fully realized first.

Sunday, July 11, 2010

"Hello World"


This program has been done over so many times by so many people in plenty of publications that it might as well be in the Public Domain. This very simple program, in Microsoft BASIC, reads as follows:

10 PRINT "HELLO WORLD!"
20 END

I ended up cheating with this one. nmcclana from Instructables gets credit for the Hello World program written in Parallax. However, it just needs some tweaking.





"But, ah!", I realize just now, "I'm using an older version of Propeller. I'm using 0.98.1!" The current version is 1.2.7(R2). But even after installing that and trying nmcclana's program again in it's original intended form, it
still doesn't work on the Hydra. My tweaked version works well, so I'm happy.

I'm pretty certain there's nothing
wrong with nmcclana's program. I thing it might be how Parallax's OBJect files work with the Hydra. There's probably something that I'm overlooking. Is it in the CONstant block? Do I need to tweak the TV_Terminal object file?

Well, no matter. I have a "Hello World" program that works.


I spliced in the following code to the TV_Terminal_010 OBJect file:



This PUBlic method made all the difference.





And now, the listing looks a lot better:















By the way, I do recommend on downloading the latest version of Propeller.

Intro

I've been a fan of programming by way of typing in computer listings from magazines and books from back in the 80s. Whenever it came to 80 micro, RUN, Rainbow, and so on, these listings really helped a complete nerd like me solve boredom. Now there aren't any of these magazines around and that has me kind of sad.

I've bought a Hydra game programming kit, and Andre LaMothe, the genius behind this and other books in game programming just seems over my head right now. I really want to learn how to program this thing, but I wanted to start off with a "Hello World!" simple program and go from there.

I've collected an assortment of magazines and books from various 80s computer platforms, and with the numerous sources of Propeller programming material online comes the genesis of this blog.

So here's the deal. I'm not a professor, nor a professional, nor an expert, and this should not be treated as an authority on programming. This is an infrequent hobby. The scope of this is on the Hydra and understanding how the Propeller language works through mucking around.

To preserve copyright, the original listings of the programs will not be posted. The original programmer, the date and publication will be listed. As well, a .jpg of the Propeller listing will also be added (to encourage the reader to type\alter the program in for themselves).

By the way, "8X micro" is a nod to 80 Micro, but it has a double meaning: the main CPU of the Hydra is a P8X32A-D40