News for hackers. Stuff that matters.
Re:It's Behind You: The making of the game R-Type on the ZX ... by Jare on Monday September 30, 2013 @12:51PM (#6470659)
This book is awesome for anyone who lived those days.

"the PDS assembler could only handle source files up to a certain size so the more you commented your work the less room you had for the actual game code itself"

Re:It's Behind You: The making of the game R-Type on the ZX ... by Doctor_Fegg on Monday September 30, 2013 @02:13PM (#6471227)
And that is why, 25 years on, I still use hard tabs rather than spaces.

I got into the habit on the Amstrad CPC using the Maxam assembler. 40k was the limit for a source file and some of the stuff I did, like a UK-wide route-planning program (think an enormously primitive version of Autoroute), seriously pushed that.

Having hard tabs, rather than eight spaces, was a major memory saving, while still retaining readable code. Well, as readable as Z80 ever got. Haven't managed to wean myself off them since...

Re:It's Behind You: The making of the game R-Type on the ZX ... by puller on Monday September 30, 2013 @02:30PM (#6471341)
By all means use hard tabs to your taste, but if it would help anything to use spaces, why not configure the editor to handle that for you and forget about whether you are emitting ASCII 9?
Re:It's Behind You: The making of the game R-Type on the ZX ... by mzs on Monday September 30, 2013 @02:34PM (#6471368)
Because 25 years ago on an 8-bit home computer.
Re:It's Behind You: The making of the game R-Type on the ZX ... by Sodaware on Monday September 30, 2013 @02:00PM (#6471138)
Reminds me of trick from the Commodore BASIC days, where you could use "?" as a replacement for "PRINT" to save a whopping 4 bytes. Seems silly now, but back then it made all the difference.
Re:It's Behind You: The making of the game R-Type on the ZX ... by Doctor_Fegg on Monday September 30, 2013 @02:10PM (#6471198)
Don't know about Commodore BASIC, but in Locomotive BASIC on the Amstrad CPC, "?" was just a text-entry convenience rather than a memory-saver. BASIC was stored tokenised, so "?" was one byte same as "PRINT" (in fact, I think it was the same byte).
Re:It's Behind You: The making of the game R-Type on the ZX ... by vidarh on Monday September 30, 2013 @06:53PM (#6472900)
Yes, it's that way on C64 too - it didn't save any space.

People certainly did do a lot to save space through omitting spaces, using ";" to separate statements instead of new lines etc.

Re:It's Behind You: The making of the game R-Type on the ZX ... by ssdsa on Tuesday October 01, 2013 @03:55PM (#6478679)
In Commodore BASIC you use ":" to separate statements. ";" is used at the end of a PRINT statement to keep it from appending a newline.
Re:It's Behind You: The making of the game R-Type on the ZX ... by mattl on Monday September 30, 2013 @07:17PM (#6472990)
Recognize your name from the old AA days :)
Re:It's Behind You: The making of the game R-Type on the ZX ... by LionRoar on Monday September 30, 2013 @04:34PM (#6472180)
You are correct. In fact, Commodore Basic had more of these shortcuts which allowed you to type in Basic commands really quickly. If you LISTed the code all shortcuts were changed to their correct command names. Kind of stenographic coding. Never saw anything like that later on with the 'modern' programming languages.. Maybe someone should bring this approach back :)

Edit: found a list of the keyword abbreviations. More then I expected/remembered. http://www.c64-wiki.com/index.php/BASIC_keyword_abbreviation

Re:It's Behind You: The making of the game R-Type on the ZX ... by rbanffy on Tuesday October 01, 2013 @06:10AM (#6475189)
> Never saw anything like that later on with the 'modern' programming languages..

You can always use Emacs and YASnippet. Also, Eclipse has a good couple of extremely handy word expansions.

Re:It's Behind You: The making of the game R-Type on the ZX ... by ssdsa on Tuesday October 01, 2013 @03:59PM (#6478703)
In Commodore BASIC, the PRINT command is tokenized and stored as a single byte $99 - see this wiki: http://www.c64-wiki.com/index.php?title=BASIC_token When you use "?", this gets stored as the same token $99 as well. When you LIST the program then, you see PRINT.
Re:It's Behind You: The making of the game R-Type on the ZX ... by Sodaware on Tuesday October 01, 2013 @05:49PM (#6479306)
I did not know that. You learn something new every day!
Re:It's Behind You: The making of the game R-Type on the ZX ... by randomhunt on Monday September 30, 2013 @11:09PM (#6473809)
PDS also wished you Merry Christmas if the date was December 25.

I coveted it an unhealthy amount whilst being stuck with various machine code monitors on the C64 itself, eventually later having the money to upgrade to an assembler. Of course then there was a whole other class of memory problems as most of them hooked BASIC to work so you were quite limited in the length of programs; everyone became very good at manually laying out blocks to memory and disc.