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