From 21491514b3642a321ce65f2a07428f63c4d9feb5 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 8 Nov 2020 11:11:49 -0500 Subject: manual viewer, "swap colors" system call --- src/user/include/pland/syscall.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/user/include/pland') diff --git a/src/user/include/pland/syscall.h b/src/user/include/pland/syscall.h index 14164aa..ead5fea 100644 --- a/src/user/include/pland/syscall.h +++ b/src/user/include/pland/syscall.h @@ -140,7 +140,8 @@ enum _scn { _SCN_PRINT_AT, _SCN_COUNT_OF_DIR, _SCN_CLEAR_SCREEN, - _SCN_SET_COLOR + _SCN_SET_COLOR, + _SCN_SWAP_COLOR }; static inline uint32_t _sc0(enum _scn eax) { @@ -285,4 +286,8 @@ static inline void _set_color(_vga_color_t color) { _sc1(_SCN_SET_COLOR, color); } +static inline void _swap_color(uint8_t row, uint8_t col) { + _sc1(_SCN_SWAP_COLOR, (row << 8) | col); +} + #endif \ No newline at end of file -- cgit v1.2.3