llvm-mos-sdk
console.h
Go to the documentation of this file.
1 // Copyright 2024 LLVM-MOS Project
2 // Licensed under the Apache License, Version 2.0 with LLVM Exceptions.
3 // See https://github.com/llvm-mos/llvm-mos-sdk/blob/main/LICENSE for license
4 // information.
5 
6 #include <stdint.h>
7 
8 #ifndef _NEO_CONSOLE_H
9 #define _NEO_CONSOLE_H
10 
11 #include <neo6502.h>
12 #include "types.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
23 char neo_console_read_char(void);
24 
31 
40 
48 void neo_console_read_line(char *line);
49 
56 void neo_console_define_hotkey_p(uint8_t hotkey, const neo_pstring_t *str);
57 
64 void neo_console_define_hotkey(uint8_t hotkey, const char *str);
65 
72 void neo_console_define_char(char ch, const uint8_t *bitmap);
73 
79 void neo_console_write_char(char ch);
80 
88 
92 void neo_console_list_hotkeys(void);
93 
100 void neo_console_screen_size(uint8_t *width, uint8_t *height);
101 
105 void neo_console_clear_screen(void);
106 
114 
124 
132 
133 #ifdef __cplusplus
134 }
135 #endif
136 
137 #endif
neo_console_list_hotkeys
void neo_console_list_hotkeys(void)
Display the current function key definitions.
types.h
neo_console_read_char
char neo_console_read_char(void)
Read and remove a key press.
std::uint8_t
::uint8_t uint8_t
Definition: cstdint:21
y1
byte byte byte y1
Definition: api.h:72
neo_console_cursor_pos
void neo_console_cursor_pos(uint8_t *x, uint8_t *y)
Fetch the cursor position.
neo_pstring
Definition: types.h:15
neo_console_clear_screen
void neo_console_clear_screen(void)
Clear the console screen.
x
byte x
Definition: api.h:26
x1
byte byte x1
Definition: api.h:72
y
byte byte y
Definition: api.h:26
neo_console_define_hotkey_p
void neo_console_define_hotkey_p(uint8_t hotkey, const neo_pstring_t *str)
Define a hotkey which emits a Pascal-style string when pressed.
neo_console_clear_region
void neo_console_clear_region(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2)
Clear all characters within the specified region.
neo6502.h
neo_console_read_line
void neo_console_read_line(char *line)
Read the current line below the cursor, and move the cursor by one line. The line is stored in C stri...
neo_console_set_text_color
void neo_console_set_text_color(uint8_t fg, uint8_t bg)
Set the text color.
neo_console_define_hotkey
void neo_console_define_hotkey(uint8_t hotkey, const char *str)
Define a hotkey which emits a C-style string when pressed.
neo_console_define_char
void neo_console_define_char(char ch, const uint8_t *bitmap)
Define a font character.
neo_console_status
uint8_t neo_console_status(void)
Check to see if the keyboard queue is empty.
neo_console_write_char
void neo_console_write_char(char ch)
Write a character to the console.
neo_console_screen_size
void neo_console_screen_size(uint8_t *width, uint8_t *height)
Fetch the console size, in characters.
neo_console_set_cursor_pos
void neo_console_set_cursor_pos(uint8_t x, uint8_t y)
Move the cursor to the specified position.
neo_console_read_line_p
void neo_console_read_line_p(neo_pstring_t *line)
Read the current line below the cursor, and move the cursor by one line. The line is stored in Pascal...