is there a way to extend the line buffer ?
Yes the line buffer size is specified in the crt when stdin is instantiated.
For startup=9, the crt used is z88dk/libsrc/_DEVELOPMENT/target/zx/startup/zx_crt_9.asm which is generated from zx_crt_9.m4 in the same directory. The driver instantiation area of that m4 file is this:
Code: Select all
dnl############################################################
dnl## INSTANTIATE DRIVERS #####################################
dnl############################################################
ifndef CRT_FONT
PUBLIC CRT_FONT
EXTERN _ff_ind_Termino
defc CRT_FONT = _ff_ind_Termino
endif
include(../../clib_instantiate_begin.m4)
include(../driver/terminal/zx_01_input_kbd_inkey.m4)dnl
m4_zx_01_input_kbd_inkey(_stdin, __i_fcntl_fdstruct_1, 0x03b0, 64, 1, 500, 15)dnl
include(../driver/terminal/zx_01_output_fzx_tty_z88dk.m4)dnl
m4_zx_01_output_fzx_tty_z88dk(_stdout, 0x2370, 0, 0, 0, 32, 0, 24, 0, CRT_FONT, 56, 0, 56, 0, 256, 0, 192, 1, 0, 3, 0)dnl
include(../../m4_file_dup.m4)dnl
m4_file_dup(_stderr, 0x80, __i_fcntl_fdstruct_1)dnl
include(../../clib_instantiate_end.m4)
The drivers are listed in fd order, starting with fd=0 so stdin is the first one:
include(../driver/terminal/zx_01_input_kbd_inkey.m4)dnl
m4_zx_01_input_kbd_inkey(_stdin, __i_fcntl_fdstruct_1, 0x03b0, 64, 1, 500, 15)dnl
That "64" is the line buffer size and is a 16-bit quantity. The "1,500,15" are the key debounce, key start repeat and key repeat rates. The flags "0x03b0" sets echo mode, password mode, line/char mode, crlf conversion, etc.
The only quantity that is changeable at compile time is CRT_FONT atm but maybe buffer size is important enough to assign to a compile time quantity too. There are quite a few parameters in the instantiations so I don't know if it makes sense to assign compile time quantities to all of them as it may be preferable just to have the user create a specialized crt if he needs fine control over everything.
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape