libmsx
C library for MSX
Loading...
Searching...
No Matches
text.h
Go to the documentation of this file.
1// -*- coding: utf-8-unix -*-
2/*
3 * Copyright (c) 2021-2025 Daishi Mori (mori0091)
4 *
5 * This software is released under the MIT License.\n
6 * See https://github.com/mori0091/libmsx/blob/main/LICENSE
7 *
8 * GitHub libmsx project\n
9 * https://github.com/mori0091/libmsx
10 */
35#pragma once
36
37#ifndef TEXT_H_
38#define TEXT_H_
39
40#include "tty.h"
41#include <stdint.h>
42
55#define locate(x, y) \
56 TTY_locate(x, y)
57
61#define newline() \
62 TTY_linefeed()
63
67#define cls() \
68 TTY_cls()
69
126#define fg_color(fg) \
127 TTY_set_fg_color(fg)
128
133#define bg_color(bg) \
134 TTY_set_bg_color(bg)
135
140#define border_color(border) \
141 TTY_set_border_color(border)
142
148#define text_color(fg, bg) \
149 TTY_set_text_color(fg, bg)
150
157#define color(fg, bg, border) \
158 TTY_set_color(fg, bg, border)
159
173void print(const char* str);
174
179void printc(char c);
180
185void printu(unsigned int i);
186
191void printi(int i);
192
197void printx(uint16_t x);
198
201#endif // TEXT_H_
void printc(char c)
MSX Print character on the screen.
void print(const char *str)
MSX Print string on the screen.
void printu(unsigned int i)
MSX Print unsigned integer on the screen.
void printx(uint16_t x)
MSX Print unsigned integer in hexadecimal on the screen.
void printi(int i)
MSX Print signed integer on the screen.
Teletype/console device interface.