- Move source code from `trunk` into root directory for each program. - Update build files and ASM include paths. Add SPDX license header where appropriate. - Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden. (Work towards #75, point 3) Reviewed-on: KolibriOS/kolibrios#434 Reviewed-by: Burer <burer@kolibrios.org> Reviewed-by: Mikhail Frolov <mixa.frolov2003@gmail.com> Co-authored-by: Andrew <dent.ace@gmail.com> Co-committed-by: Andrew <dent.ace@gmail.com>
382 lines
15 KiB
Plaintext
382 lines
15 KiB
Plaintext
CMD - ╚эЄхЁяЁхЄрЄюЁ ъюьрэфэющ ёЄЁюъш фы Menuet
|
||
═ряшёрэю by Chemist dmitry_gt@tut.by
|
||
|
||
┬хЁёш 0.27
|
||
|
||
╨єёёъшщ ЄхъёЄ эхьэюую яюэшцх.
|
||
|
||
-----------------------------------------------------------------------
|
||
|
||
CMD - Command Line Interpreter for Menuet
|
||
Copyleft Chemist - dmitry_gt@tut.by
|
||
|
||
Version 0.27
|
||
|
||
As my english is not well, I will tell a few words about this
|
||
program. It supports 14 commands, such as cp (copy file),
|
||
rn (rename file), ps (process list), kill (kill process) etc.
|
||
You can type 'help' after starting this shell to examine with
|
||
other commands. Also it uses several special symbols, such as
|
||
&, /, . and +. Use & sumbol to enter params. For example,
|
||
type tinypad&cmd.asm to open cmd.asm file in tinypad editor.
|
||
/ symbol is used to run special command scripts for CMD.
|
||
It's syntax is: /filename without extension (For example,
|
||
type /autoexec to execute autoexec.cmd file for CMD). And +
|
||
symbol is used in cp and rn commands. You must type
|
||
cp example.asm+example.bak to copy example.asm file to
|
||
example.bak. Use dot to launch program, if CMD command and
|
||
other external command match. For example, type help for
|
||
'help' command or type .help to run 'help' program.
|
||
|
||
This shell supports executeing special command
|
||
scripts (something like .BAT files in MS-DOS). This files
|
||
have an .CMD extinsion and u must use / symbol to execute it.
|
||
U can use any CMD commands and filenames in this scripts.
|
||
But you can't run other scripts from any CMD script (/ symbol).
|
||
I recommed to use tipypad editor to edit this scripts and do
|
||
not leave spaces and other symbols after commands in the script
|
||
file, because it's executeing is not very developed yet.
|
||
And it's strongly recommended to use ends command in the end
|
||
of the script, because there are some problems with redrawing
|
||
the window after executing scripts without this command.
|
||
Every time when you launch CMD autoexec.cmd file automatically
|
||
executes. You can edit or delete this file if you want.
|
||
|
||
This version of CMD shell supports IPC. It mean, than you can
|
||
write your own programs for this shell. Look at .ASM files in
|
||
the Examples directory in this archive. I think that you will
|
||
understand them without any difficulties. Do not forget, that
|
||
you need CMDIPC.ASM file to compile this sources. It's
|
||
recommended to compile it with MACROS.INC file (included in
|
||
this archieve) to make their size smaller.
|
||
|
||
And now about some bugs etc.
|
||
|
||
----------------------------
|
||
|
||
I've noticed, that there are some difficulties with files with
|
||
1 or 2 symbols in extension. I recommend do not use such files
|
||
not only in CMD, but almost in every programs in MeOS. It's
|
||
possible to create such file in tinypad, and then (in MS-DOS or
|
||
Windows) Scandisk will find errors in filenames etc. CMD do
|
||
not support properly such filenames now.
|
||
|
||
In CMDIPC.INC and CMD.ASM I used 5-th function (pause), because
|
||
I need it when CMD communicates with IPC programs. It's
|
||
even possible, that it will not enough 1/100 sec. on slow PC's,
|
||
because CMD need this time to finish IPC-command from other
|
||
IPC-program. U can change ebx value in CMDIPC.ASM in pause1:
|
||
if you want. But it slows communication betwen CMD and
|
||
IPC-programs for CMD. I hope, that you understand my words. :)
|
||
|
||
Now (in this version) you can launch only one CMD shell.
|
||
Because it's difficult to make communication betwen several
|
||
copyes of CMD in memory and IPC-programs. I will solve this
|
||
problem in future.
|
||
|
||
I've tested this shell only on Ivan Poddubny's russian
|
||
distributive. Also I recommend you to use it. :) CMD shell
|
||
is included into this distributive (but possible not it's
|
||
final version).
|
||
|
||
Source code of this program is not optimized yet. I have such
|
||
manner of programming from my childhood that my source code
|
||
is not very "compact"
|
||
|
||
etc. ;-)
|
||
|
||
And now other information:
|
||
--------------------------
|
||
|
||
I do not want CMD design to change. I like white symbols on
|
||
the black background. If you want to change the source and
|
||
redistribute it, please, do not change it's design. :)
|
||
|
||
If you will find some bugs or you have some wishes (or even you
|
||
correct some mistakes in my english texts) -
|
||
email me: dmitry_gt@tut.by
|
||
|
||
And this program is distributed "as is". Use it on your own
|
||
risk. ;-)
|
||
|
||
And again - my English is not well. :)
|
||
|
||
That's all!
|
||
|
||
19.06.2004,
|
||
Chemist
|
||
|
||
Now russian text :)
|
||
|
||
-----------------------------------------------------------------------
|
||
|
||
─юёЄєяэ√х ъюьрэф√:
|
||
|
||
ls [filename] - т√тюф ёяшёър Їрщыют. ┼ёыш яюёых ъюьрэф√
|
||
єърчрЄ№ шь Їрщыр, Єю ъюьрэфр яЁютхЁшЄ хую
|
||
эр эрышўшх.
|
||
|
||
cp [source_file+destination_file] - ъюьрэфр фы
|
||
ъюяшЁютрэш Їрщыют. ╧ЁютхЁ хЄ Їрщы√ эр
|
||
эрышўшх, ш т ёыєўрх ю°шсъш т√тюфшЄ
|
||
ёююЄтхЄёЄтє■∙шх ёююс∙хэш .
|
||
|
||
rn [source_file+destination_file] - ъюьрэфр фы
|
||
яхЁхшьхэютрэш Їрщыют. ╥ръ цх
|
||
яЁютхЁ хЄ Їрщы√ эр эрышўшх, ш т
|
||
ёыєўрх ю°шсъш т√тюфшЄ ёююЄтхЄёЄтє■∙шх
|
||
ёююс∙хэш .
|
||
|
||
ps - т√тюф шэЇюЁьрЎшш ю яЁюЎхёёрї т ёшёЄхьх.
|
||
|
||
kill - яЁхЁтрЄ№ яЁюЎхёё т ёшёЄхьх. ┬эшьрэшх,
|
||
яюёых ъюьрэф√ ёыхфєхЄ ттюфшЄ№ 4-ї
|
||
чэрўэ√щ эюьхЁ яЁюЎхёёр, р эх PID. ═юьхЁ
|
||
яЁюЎхёёр єърчрэ т яюёыхфэхщ ъюыюэъх яЁш
|
||
т√чютх ъюьрэф√ ps.
|
||
|
||
help - т√тюф ъЁрЄъющ ёяЁртюўэющ шэЇюЁьрЎшш.
|
||
|
||
ver - т√тюф шёяюы№чєхьющ тхЁёшш шэЄхЁяЁхЄрЄюЁр.
|
||
|
||
cls - юўшёЄър ¤ъЁрэр.
|
||
|
||
exit - т√їюф шч шэЄхЁяЁхЄрЄюЁр.
|
||
|
||
del [filename] - єфрышЄ№ Їрщы ё Ёрьфшёър. ╧Ёш юЄёєЄёЄтшш
|
||
чряЁр°штрхьюую Їрщыр сєфхЄ т√тхфхэю
|
||
ёююЄтхЄёЄтє■∙шх ёююс∙хэшх юс ю°шсъх.
|
||
|
||
shutdown - чртхЁ°шЄ№ ЁрсюЄє ёшёЄхь√.
|
||
|
||
pause - юцшфрЄ№ эрцрЄшх ъыртш°ш. ╚ёяюы№чєхЄё фы
|
||
"тчршьюфхщёЄтш " яюы№чютрЄхы ё ъюьрэфэ√ьш
|
||
ёъЁшяЄрьш фы ъюэёюыш (шэЄхЁяЁхЄрЄюЁр).
|
||
═ряЁшьхЁ, ьюцэю шёяюы№чютрЄ№ фрээ√щ ёъЁшяЄ
|
||
|
||
echo Do you want to delete cmd.asm?
|
||
pause
|
||
del cmd.asm
|
||
|
||
фы Єюую, ўЄюс√ яюшэЄхЁхёютрЄ№ё ьэхэшхь
|
||
яюы№чютрЄхы , їюўхЄ ыш юэ єфрышЄ№ Їрщы cmd.asm
|
||
шыш яЁхЁтрЄ№ ЁрсюЄє ёъЁшяЄр.
|
||
|
||
pause >nul ╥ю цх ёрьюх, Єюы№ъю схч т√тюфр ёЄЁюъш
|
||
'Press ane key to continue (ESC - cancel)'
|
||
|
||
echo [text] - т√тюф ЄхъёЄр эр ¤ъЁрэ. ╧Ёхфэрчэрўхэр фы
|
||
яюфрўш яюы№чютрЄхы■ шэЇюЁьрЎшш шч ъюьрэфэюую
|
||
ёъЁшяЄр. ┼ёыш ттхёЄш ъюьрэфє echo схч ЄхъёЄр,
|
||
Єю ¤Єю яЁюёЄю т√чютхЄ яхЁхїюф эр ёыхфє■∙є■
|
||
ёЄЁюъє.
|
||
|
||
ends - ъюьрэфр, фюёЄєяэр Єюы№ъю шч шёяюыэ хь√ї
|
||
ёъЁшяЄют. ╤ыєцшЄ фы шї ъюЁЁхъЄэюую чртхЁ°хэш ,
|
||
Є.ъ. шэюуфр ъюьрэфэ√х ёъЁшяЄ√, є ъюЄюЁ√ї т
|
||
ъюэЎх ёЄю ыш эхэєцэ√х яЁюсхы√ шыш ёшьтюы√ EOL,
|
||
т√ч√трыш яЁюсыхь√ ё яхЁхЁшёютъющ юъэр. ╤ъюЁхх
|
||
тёхую ¤Єр ъюьрэфр яЁшёєЄёЄтєхЄ т ъюэёюыш
|
||
тЁхьхээю ш сєфхЄ єсЁрэр яюёых Ёх°хэш ¤Єющ
|
||
яЁюсыхь√.
|
||
|
||
-----------------------------------------------------------------------
|
||
|
||
╙яЁрты ■∙шх ёшьтюы√:
|
||
|
||
/[ъюьрэфэ√щ ёъЁшяЄ] - яЁхфэрчэрўхэ фы т√чютр эр шёяюыэхэшх
|
||
ъюьрэфэюую ёъЁшяЄр шч ъюэёюыш. ═х ьюцхЄ
|
||
шёяюы№чютрЄ№ё т эхяюёЁхфёЄтхээю т ёрьшї
|
||
ъюьрэфэ√ї ёъЁшяЄрї. ┼ёыш Ёрё°шЁхэшх шёяюы-
|
||
э хьюую ёъЁшяЄр .cmd, Єю хую єърч√трЄ№
|
||
эхюс чрЄхы№эю.
|
||
|
||
& - фрээ√щ ёшьтюы шёяюы№чєхЄё фы яхЁхфрўш т√ч√трхьющ
|
||
яЁюуЁрььх ярЁрьхЄЁют. ═ряЁшьхЁ, ъюьрэфр tinypad&cmd.asm
|
||
яхЁхфрёЄ яЁюуЁрььх tinypad ярЁрьхЄЁ cmd.asm,
|
||
ёююЄтхЄёЄтхээю, tinypad юЄъЁюхЄ Їрщы cmd.asm.
|
||
|
||
+ - Ёрчфхы хЄ шьхэр шёїюфэюую ш Ёхчєы№ЄшЁє■∙хую Їрщыют т
|
||
ъюьрэфрї cp ш rn.
|
||
|
||
. - чряєёърхЄ єърчрээє■ яюёых Єюўъш яЁюуЁрььє, фрцх хёыш юэр
|
||
ёютярфрхЄ ё ъюьрэфющ CMD. ═ряЁшьхЁ, help - т√яюыэшЄ№
|
||
ъюьрэфє 'help', эю .help - чряєёЄшЄ№ тэх°э■■ яЁюуЁрььє
|
||
'help' (їюЄ Єръющ яюър тЁюфх ш эхЄє :).
|
||
|
||
-----------------------------------------------------------------------
|
||
|
||
═ртшурЎш яю ъюэёюыш:
|
||
|
||
─ы ЁхфръЄшЁютрэш ъюьрэфэющ ёЄЁюъш шёяюы№чє■Єё ъыртш°ш ESC,
|
||
BACKSPACE. ESC - фы єфрыхэш тёхщ ъюьрэфэющ ёЄЁюъш,
|
||
BACKSPACE - фы єфрыхэш яюёыхфэхую ттхфхээюую ёшьтюыр. ╧ю
|
||
ьюхьє ьэхэш■, шёяюы№чютрэшх Єръшї ъыртш°, ъръ HOME, END, ARROW
|
||
KEY etc. эх шьххЄ ёь√ёыр, Є.ъ. ттюфшь√х ъюьрэф√ ёыш°ъюь
|
||
яЁюёЄ√ ш эх ЄЁхсє■Є яюфЁюсэюую ЁхфръЄшЁютрэш . ╧ю¤Єюьє
|
||
юёЄртшы тёх яЁшьхЁэю Єръ, ъръ с√ыю т MS-DOS 6.22.
|
||
|
||
╩ыртш°р UPARROW шёяюы№чєхЄё фы яютЄюЁр яюёыхфэхщ ттхфхээющ
|
||
ъюьрэф√.
|
||
|
||
-----------------------------------------------------------------------
|
||
|
||
╚ёяюы№чютрэшх IPC тю тэх°эшї яЁюуЁрььрї:
|
||
|
||
┬√ ьюцхЄх яшёрЄ№ яЁюуЁрьь√, тчршьюфхщёЄтє■∙шх ё CMD ўхЁхч IPC.
|
||
┬ юёэютэюь, яюырур■, ¤Єю ьюцхЄ яЁшуюфшЄё фы эряшёрэш
|
||
ъюэёюы№э√ї яЁшыюцхэшщ фы ёрьюую CMD (їюЄ тючьюцэю ш фЁєуюх).
|
||
|
||
─ы ¤Єюую, ъ тр°хщ яЁюуЁрььх трь эхюсїюj |