Relearning MSX

Relearning MSX

This is a series of articles I’m writing about developing software for MSX computers. I don’t assume previous experience with these machines, so even new users will be able to have fun and make stuff.

I will be talking mainly about development in C and assembly language.

Starting from March 2015 there’s one new post every Friday. Note to self: do not set deadlines.

Become a Patron

If you are enjoying this series please consider becoming a Patron to support future articles. If we get enough supporters I will spend all earnings in hiring a company to translate the original ASCII books and manuals into English.

Articles

Using pointer arithmetic to access the elements of an array. Passing pointers as function arguments. Using pointers inside functions to access local variables that belong to other functions, access external arrays inside functions, and implement functions that return more than one result. Relationship between an array name and the start address of the same array.

The MSX graphic characters and the 2-byte sequences to put them on the screen. Differences between the Japanese and European graphic character sets. Escaping single/double quotes and backslashes in order to print them from C programs.

Screen escape sequences: strings of characters that control aspects of the screen. Difference between C escape sequences, screen escape sequences and control characters. Using escape sequences to change the shape of the cursor, insert and delete lines of text, hide and show the cursor. How to create a text scroll upwards or downwards using only escape sequences.

How to write assembler routines and call them from MSX-C programs: functions without arguments, functions with a fixed number of arguments, and functions with variable number of arguments. Returning values to MSX-C programs.

This week we enter two small example programs (TRIANGLE.C and DOUBLE.C). We see some common errors during compilation and how to deal with them. We see very briefly how a program uses command line parameters, and we examine with some detail input/output redirection and pipes.

This is not a technical article. We talk about the Introduction to MSX-C books published by ASCII and also about the two editions of The C Programming Language book by Brian Kernighan and Dennis Ritchie. From this post there will be one new issue every Friday.

Detailed explanation of MSX-C’s command line tool CF.COM, the parser. This is the program that takes a source code file written in C and translates it into intermediate code (a TCO file) that can be later converted into Z80 assembler by the CF.COM program.

We need to learn how to use a text editor before we can continue setting up MSX-C. What’s the difference between a text editor and a word processor? Differences between the KID and AKID text editors included in MSX-DOS2 TOOLS. Creating text files with KID/AKID. Description of the KID/AKID menus.