Subversion Repositories SvarDOS

Rev

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

Rev 481 Rev 521
1
 
1
 
-
 
2
 
2
                    === SvarCOM implementation notes ===
3
                    === SvarCOM implementation notes ===
3
 
4
 
4
 
5
 
5
=== SWAPPING =================================================================
6
=== SWAPPING =================================================================
6
 
7
 
7
While conventional RAM is scarce, a command line interpreter must make effort
8
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
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
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
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
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
application, waits for it to finish and then calls back SvarCOM.
13
 
14
 
14
 
15
 
15
=== NLS STRINGS ==============================================================
16
=== NLS STRINGS ==============================================================
16
 
17
 
17
SvarCOM can output information in many languages. To do so, it relies on a
18
SvarCOM can output information in many languages. To do so, it relies on a
18
precompiled resource file named SVARCOM.LNG. When SvarCOM starts, it looks
19
precompiled resource file named SVARCOM.LNG. When SvarCOM starts, it looks
19
for this file in the %NLSPATH% directory and loads from it the part that
20
for this file in the %NLSPATH% directory and loads from it the part that
20
contains the %LANG% language. All this is done by nls_langreload().
21
contains the %LANG% language. All this is done by nls_langreload().
21
 
22
 
22
The SVARCOM.LNG file is compiled by a separate tool: TLUMACZ. It takes
23
The SVARCOM.LNG file is compiled by a separate tool: TLUMACZ. It takes
23
CATS-style language files as input and compiles them into a single SVARCOM.LNG
24
CATS-style language files as input and compiles them into a single SVARCOM.LNG
24
resource file. It also produces a DEFAULT.LNG with english strings only, this
25
resource file. It also produces a DEFAULT.LNG with english strings only, this
25
one is embedded into the SvarCOM executable to display english text in case
26
one is embedded into the SvarCOM executable to display english text in case
26
SVARCOM.LNG is unavailable.
27
SVARCOM.LNG is unavailable.
27
 
28
 
28
 
29
 
29
=== BATCH FILES SUPPORT ======================================================
30
=== BATCH FILES SUPPORT ======================================================
30
 
31
 
31
When SvarCOM executes a command, it checks first if it has a *.BAT extension.
32
When SvarCOM executes a command, it checks first if it has a *.BAT extension.
32
If so, it switches into 'batch-processing' mode:
33
If so, it switches into 'batch-processing' mode:
33
 
34
 
34
 - Writes the batch filename into its persistent (rmod-owned) buffer, along
35
 - Writes the batch filename into its persistent (rmod-owned) buffer, along
35
   with a counter that holds the offset of the next line to be executed.
36
   with a counter that holds the offset of the next line to be executed.
36
 
37
 
37
When the batch filename buffer is non-empty, SvarCOM does not ask the user for
38
When the batch filename buffer is non-empty, SvarCOM does not ask the user for
38
a command. Instead, it opens the batch file, jumps to the "next line to be
39
a command. Instead, it opens the batch file, jumps to the "next line to be
39
executed" and loads the command from there, incrementing the line counter in
40
executed" and loads the command from there, incrementing the line counter in
40
the process.
41
the process.
41
 
42
 
42
 
43
 
43
====================================================================== EOF ===
44
===================================================================== EOF ====
44
 
45