Subversion Repositories SvarDOS

Rev

Rev 469 | Rev 474 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 469 Rev 473
1
 
1
 
2
                    === SvarCOM implementation notes ===
2
                    === SvarCOM implementation notes ===
3
 
3
 
4
 
4
 
-
 
5
=== SWAPPING =================================================================
-
 
6
 
-
 
7
While conventional RAM is scarce, a command line interpreter must make effort
-
 
8
to reduce its memory footprint when launching applications. SvarCOM does that
-
 
9
by installing a small executable module in memory, called RMOD (for Resident
-
 
10
MODule). SvarCOM pre-sets RMOD so knows how to execute the external program
-
 
11
and removes itself from memory, letting RMOD do the job. RMOD executes the
-
 
12
application, waits for it to finish and then calls back SvarCOM.
-
 
13
 
-
 
14
 
5
=== NLS strings ==============================================================
15
=== NLS strings ==============================================================
6
 
16
 
7
SvarCOM can output information in many languages. To do so, it relies on a
17
SvarCOM can output information in many languages. To do so, it relies on a
8
precompiled resource file named SVARCOM.LNG. When SvarCOM starts, it looks
18
precompiled resource file named SVARCOM.LNG. When SvarCOM starts, it looks
9
for this file in the %NLSPATH% directory and loads from it the part that
19
for this file in the %NLSPATH% directory and loads from it the part that
10
contains the %LANG% language. All this is done by nls_langreload().
20
contains the %LANG% language. All this is done by nls_langreload().
11
 
21
 
12
The SVARCOM.LNG file is compiled by a separate tool: TLUMACZ. It takes
22
The SVARCOM.LNG file is compiled by a separate tool: TLUMACZ. It takes
13
CATS-style language files as input and compiles them into a single SVARCOM.LNG
23
CATS-style language files as input and compiles them into a single SVARCOM.LNG
14
resource file. It also produces a DEFAULT.LNG with english strings only, this
24
resource file. It also produces a DEFAULT.LNG with english strings only, this
15
one is embedded into the SvarCOM executable to display english text in case
25
one is embedded into the SvarCOM executable to display english text in case
16
SVARCOM.LNG is unavailable.
26
SVARCOM.LNG is unavailable.
17
 
27
 
18
 
28
 
19
=== Batch files support ======================================================
29
=== Batch files support ======================================================
20
 
30
 
21
When SvarCOM executes a command, it checks first if it has a *.BAT extension.
31
When SvarCOM executes a command, it checks first if it has a *.BAT extension.
22
If so, it switches into 'batch-processing' mode:
32
If so, it switches into 'batch-processing' mode:
23
 
33
 
24
 - Writes the batch filename into its persistent (rmod-owned) buffer, along
34
 - Writes the batch filename into its persistent (rmod-owned) buffer, along
25
   with a line counter that holds the number of "next line to be executed".
35
   with a line counter that holds the number of "next line to be executed".
26
 - When a batch file CALLs another batch file, then a new SvarCOM instance is
36
 - When a batch file CALLs another batch file, then a new SvarCOM instance is
27
   started. This ensures that once the CALLed batch ends, processing will
37
   started. This ensures that once the CALLed batch ends, processing will
28
   return to the original batch file at the correct position.
38
   return to the original batch file at the correct position.
29
 
39
 
30
When the batch buffer is non-zero, SvarCOM does not ask the user for a
40
When the batch buffer is non-zero, SvarCOM does not ask the user for a
31
command. Instead, it opens the batch file, jumps to the "next line to be
41
command. Instead, it opens the batch file, jumps to the "next line to be
32
executed" and loads the command from there, incrementing this counter in the
42
executed" and loads the command from there, incrementing this counter in the
33
process. The maximum length of a batch file is of 65535 lines (any lines after
43
process. The maximum length of a batch file is of 65535 lines (any lines after
34
this limit will be ignored).
44
this limit will be ignored).
35
 
45
 
36
 
46
 
37
====================================================================== EOF ===
47
====================================================================== EOF ===
38
 
48