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