libc: сплит «1 функция = 1 модуль» — вся библиотека, wildcard-сборка
- 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>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* bios_clearwin_ch — залить окно (row, col, height, width) символом
|
||||
* fillch с атрибутом attr. BIOS LP_CLS_WIN2 ($8D, rst 8): D=row,
|
||||
* E=col, H=height, L=width, B=attr, A=fillch.
|
||||
*/
|
||||
|
||||
#include <bios/text.h>
|
||||
|
||||
void bios_clearwin_ch(uint8_t row, uint8_t col, uint8_t height,
|
||||
uint8_t width, uint8_t attr, char fillch) __naked
|
||||
{
|
||||
(void)row; (void)col; (void)height; (void)width; (void)attr; (void)fillch;
|
||||
__asm
|
||||
;; row→A, col→L, height/width/attr/fillch на стеке [SP+2..5].
|
||||
ld iy, #2
|
||||
add iy, sp
|
||||
ld d, a ; D = row (освободить A под fillch)
|
||||
ld e, l ; E = col (освободить L под width)
|
||||
ld h, 0 (iy) ; H = height
|
||||
ld c, 1 (iy) ; спрятать width
|
||||
ld b, 2 (iy) ; B = attr
|
||||
ld a, 3 (iy) ; A = fillch
|
||||
ld l, c ; L = width
|
||||
push ix
|
||||
ld c, #0x8D
|
||||
rst #0x08
|
||||
pop ix
|
||||
pop hl
|
||||
inc sp
|
||||
inc sp
|
||||
inc sp
|
||||
inc sp ; съесть height + width + attr + fillch
|
||||
jp (hl)
|
||||
__endasm;
|
||||
}
|
||||
Reference in New Issue
Block a user