SDCC MSX-DOS TEXTMODE Functions Library (object type)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

SDCC MSX-DOS TEXTMODE Functions Library (object type)

Version: 1.2 (5/5/2018)

Author: mvac7/303bcn

Architecture: MSX

Format: C Object (SDCC .rel)

Programming language: C



1. Introduction

This project is an Open Source library of functions for creating aplications in text mode.

Works in T1 (screen 0, 40 columns), T2 (screen 0, 80 columns), and G1 (screen 1, 32 columns) modes.

This library uses the functions of the BIOS designed to print text on the screen, but they are called through the interslot (CALSLT), to be used in MSXDOS applications.

Use them for developing MSX applications using Small Device C Compiler (SDCC).

Includes an application for test and learning purposes.

2. Acknowledgments

Thanks for Info & help, to:

3. Requirements

4. Functions

  • void SCREEN0() - Switch to T1 or T2 mode (SCREEN 0), 40 or 80 columns x 24 lines.
  • void SCREEN1() - Switch to G1 mode (SCREEN 1), 32 columns x 24 lines.
  • void WIDTH(char columns) - Specifies the number of characters per line in text mode.
  • void COLOR(char ink, char background, char border) - Specifies the colors of the foreground, background, and border area.
  • void CLS() - Clear the contents of the screen.
  • void LOCATE(char x, char y) - Moves the cursor to the specified location.
  • void PRINT(char* text) - Displays a text string on the screen.
  • void PrintNumber(unsigned int value) - Prints an unsigned integer on the screen.
  • void PrintFNumber(unsigned int value, char emptyChar, char length) - Prints an unsigned integer on the screen with formatting parameters.
  • void num2Dec16(unsigned int aNumber, char *address, char emptyChar) - 16-bit Integer to ASCII (decimal) (by baze)
  • void bchput(char value) - Displays one character (MSX BIOS CHPUT).