/* * bios_writeattr_stop — вывести строку s с атрибутом attr до * разделителя sep БЕЗ добивки пробелами (максимум maxlen символов). * BIOS LP_PRINT_LN5 ($8B, rst 8): HL=s, B=maxlen, E=attr, D=sep. */ #include void bios_writeattr_stop(const char *s, uint8_t maxlen, uint8_t attr, char sep) __naked { (void)s; (void)maxlen; (void)attr; (void)sep; __asm ;; s→HL, maxlen/attr/sep на стеке [SP+2..4]. ld iy, #2 add iy, sp ld b, 0 (iy) ; B = maxlen ld e, 1 (iy) ; E = attr ld d, 2 (iy) ; D = sep push ix ld c, #0x8B rst #0x08 pop ix pop hl inc sp inc sp inc sp jp (hl) __endasm; }