Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HISTORY=ON improvements #125

Open
mateuszviste opened this issue Nov 25, 2024 · 4 comments
Open

HISTORY=ON improvements #125

mateuszviste opened this issue Nov 25, 2024 · 4 comments

Comments

@mateuszviste
Copy link

mateuszviste commented Nov 25, 2024

HISTORY=ON apparently allocates some 576 bytes of memory and use it to keep about 15 commands.

It would be nice for this to be configurable. This would allow to lower the footprint on very, very restrained systems. For example on a 256K machine the user might prefer to set the history to 4 last commands, which would limit the memory usage yet still provide a history buffer that is comfortable most of the time. This could be configured for example through HISTORY=4 ("save last 4 commands only") or HISTORY=100 ("use a 100 bytes buffer for HISTORY"), depending how the history logic is currently implemented.

Another desirable improvement would be for the kernel to not store the same consecutive command. For instance running 3x DIR makes the command to appear 3 times in history.

@boeckmann
Copy link
Collaborator

Source indicates that HISTORY=ON,256 might do the trick (setting history to 256 bytes). The valid range seems to be 128-4096 bytes. But did not test it yet.

@boeckmann
Copy link
Collaborator

;
;	This function modifies the History buffer support provided by
;	DR DOS the defaults are History OFF, 512 byte buffers,
;	Insert ON, Search OFF, Matching OFF.
;
func_history:	; HISTORY = ON|OFF[,NNNN[,ON|OFF[,ON|OFF[,ON|OFF]]]]

@mateuszviste
Copy link
Author

The kernel itself gives such hint:

image

would you know what is the second ON/OFF setting for?

@mateuszviste
Copy link
Author

According to the source code the syntax is more elaborate than the kernel's message suggests:

HISTORY=ON_OFF[,MEMSIZE[,INSERT_STATE[,SEARCH_STATE[,MATCH_STATE]]]]

What are INSERT_STATE, SEARCH_STATE and MATCH_STATE remains to be found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants