It’s been a while since the last post. This one isn’t technical at all. I’m just going to explain where we’re going from this point. Also, starting this week I’m setting a fixed schedule: one new post every Friday. This should keep you (and me) busy.
In the next posts we’re going to follow the Introduction to MSX-C (MSX-C入門) books published by ASCII. Both have been out of print for a long time, but they can still be found from time to time in Japanese second hand book stores and auctions. We’ll see everything in these books until we complete them, and then we’ll go to more technical stuff.
PDF versions of these were distributed with the MSX Magazine Revival issue #3 (MSXマガジン永久保存版3) in 2005. Both PDFs have been available online on the Internet Archive for some time (see links below).
Introduction to MSX-C (first part)
Author: Koji Sakurada ISBN: 4-7561-0006-6 Publisher: ASCII Publications Publication date: July 1989
The first of these books (the one with the yellow cover) describes the MSX-C environment and teaches the C programming language taking into account the limitations of the compiler and the differences with the C standard of the time (K&R C, see later in this post). It doesn’t require any previous knowledge of C, so this is an ideal book for beginners, assuming you can read Japanese.
The first three chapters of this book explain how to use the compiler and the tools that come with it. We’ve already touched these subjects in our previous posts here, so we won’t see them again.
Introduction to MSX-C (second part)
Authors: Koji Sakurada, Tetsuto Someya ISBN: 4-7561-0057-0 Publisher: ASCII Publications Publication date: December 1990
This second book (green cover) applies the matter explained in the first book to the development of games for MSX2 computers. The authors develop a simple C library to handle several aspects of the MSX hardware, and provide several simple example games.
Neither of these books talks about the MSX-C Library package that we already have installed. We will talk about and start using it along the way.
One thing to note if you’re thinking about buying a book on the C progamming language is that the MSX-C compiler was developed before the ANSI C standard was established. The reference book nowadays is The C Programming Language (2nd edition), published in 1988, which covers ANSI C and won’t be of much help if you’re going to code using MSX-C.
The MSX-C compiler follows the rules set in the first edition of the same book: The C Programming Language, published in 1978. This is the original book on the C language by Brian Kernighan and Dennis Ritchie, and it describes the version of the C programming language known as K&R C. It has been out of print for a very long time, but you can easily find used copies on Amazon and other retailers.
Download links
Provided by the Internet Archive:
That’s all for today. See you on Friday!
This series of articles is supported by your donations. If you’re willing and able to donate, please visit the link below to register a small pledge. Every little amount helps.
Javi Lavandeira’s Patreon page
Hi, is the second book complete at archive.org? it starts with page 21 and ends with page 96. Looks an interesting book with all those examples!
Looks like it’s not complete. Before page 21 there’s a chapter talking about MSX-C, not really important. After page 96 there’s the implementation (and listing) of the several example games.
Would love to see those game examples :) if it aren’t that much pages maybe you can take some photographs of it?
Done. I’ve scanned the two pages at the beginning of the book that show some screenshots of the example games:
http://www.lavandeira.net/misc/msx-c_ge_examples1.png
http://www.lavandeira.net/misc/msx-c_ge_examples2.png
And what MSX-C do they use in those books? they talk about MSXALIB and MSXCLIB, are they provided on a disk with those books?
The second book explains on page 20 that the MSX-C package doesn’t include a library suitable to handle graphics, joysticks/mouse, etc, so pages 21-96 of the book are all about creating such libraries and explaining how they work. MSXALIB is the part of the library written in assembler, and MSXCLIB is the part written in C.
Ah ok, but where are those files that are described on page-21? the .bat files and msxclib.c and msxalib.mac. Are they printed in the book as appendix or so?
I thought there was also a disk, because the advertisement in the article shows something like “Diskalbum 42”.
Yes, they’re printed in the appendix. See the link I posted for Paulo below. I’ve scanned the appendix that contains the source code for the library.
Pingback: Relearning MSX #16: Roadmap | Vintage is the New Old
Where can we download “Diskalbum 42” msxclib.c and msxalib.mac?
No idea. In any case, we don’t need it. The programs in that disk are included in the book.
OK. But the programs included in the book require the . How can I build if I do not have the ?
Thank U!
I’ve uploaded scans of the appendix containing the source code for the library and the batch files to compile them, in case you want to go ahead and try the examples in the book:
http://lavandeira.net/downloads/msx-c_ge_appendix.pdf
Thank you very much!
Thanks, tomorrow I will update my Github with (almost) all the source code of the second book (including the libraries) :)
Sandy
You could send the address of your GitHub?
I also typed libraries, we could make a comparison to try to identify errors. What do you think?
Thank U
Paulo,
sure, you can find the complete listings of the second book on
https://github.com/sndpl/msx-c-intro
I compared the typed files and found five errors in my MSXALIB.MAC file. Your files are perfect.
Thank you very much.
I compared the typed files and found five errors in my MSXALIB.MAC file. Your files are perfect.
Thank you very much.
A pity there’s no translation to the MSX-C books to english.
Luckily I own the first edition of K&R C. Are there syntax differences between K&C C and MSX-C?
I have a first edition K&R too.
MSX-C is almost exactly the same thing as K&R C. The biggest difference is that the short, long and double data types don’t exist, though there are functions to handle them.