4a081501d8
- bios/conio/env/errno/gfx/io/mem/mouse/stdio/stdlib/string/sys/time/ video разложены по модулям: общие статики и helpers — в internal _-модулях (_conio.h/_mouse.h/_gfx.h/_palette.h/_atexit.h/_time.h) - lib/Makefile: LIBC_C = wildcard libc/*/*.c — гранулярность файлов = гранулярность DCE линкера - эффект _CODE: gfx_text 6986→2568 Б, gfx_mous −1745, gfx_demo/d16 −542; ранее timedir −3270, ls −3098, stattest −2995 - комментарии оставшихся модулей переведены на русский; puts: убран мёртвый pchars; videomode_raw разложен на get/set - docs/libc-split-asm-cases.md — правила asm-связок между модулями; docs/libc-roadmap.md — план этапа - восстановлен examples/mdview/SAMPLE.MD (нужен make floppy) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
34 lines
1.1 KiB
C
34 lines
1.1 KiB
C
/*
|
||
* bios_clearwin — очистить окно (row, col, height, width) пробелами с
|
||
* атрибутом attr. BIOS LP_CLS_WIN ($89, rst 8): D=row, E=col,
|
||
* H=height, L=width, B=attr.
|
||
*/
|
||
|
||
#include <bios/text.h>
|
||
|
||
void bios_clearwin(uint8_t row, uint8_t col, uint8_t height, uint8_t width,
|
||
uint8_t attr) __naked
|
||
{
|
||
(void)row; (void)col; (void)height; (void)width; (void)attr;
|
||
__asm
|
||
;; row→A, col→L, height/width/attr на стеке [SP+2..4].
|
||
ld iy, #2
|
||
add iy, sp
|
||
ld h, 0 (iy) ; H = height
|
||
ld c, 1 (iy) ; спрятать width (L пока держит col)
|
||
ld e, l ; E = col
|
||
ld d, a ; D = row
|
||
ld l, c ; L = width
|
||
ld b, 2 (iy) ; B = attr
|
||
push ix
|
||
ld c, #0x89
|
||
rst #0x08
|
||
pop ix
|
||
pop hl
|
||
inc sp
|
||
inc sp
|
||
inc sp ; съесть height + width + attr
|
||
jp (hl)
|
||
__endasm;
|
||
}
|