MS-DOS ve Windows komut satırı ansi.sys komutu
ansi.sys, ekran grafiklerini değiştiren, imleç hareketini kontrol eden ve tuşları yeniden atayan işlevleri tanımlar. ANSI.SYS aygıt sürücüsü, sisteminizin ekranını ve klavyesini denetlemek için kaçış dizilerinin ANSI terminal öykünmesini destekler.
ANSI çıkış dizisi, ASCII karakterlerinin bir dizisidir; ilk ikisi kaçış karakteri (1Bh) ve sol köşeli parantez karakteridir (5Bh). Çıkış ve sol parantez karakterlerini izleyen karakter veya karakterler, bir klavyeyi veya görüntüleme işlevini kontrol eden bir alfasayısal kodu belirtir. ANSI kaçış dizileri, büyük ve küçük harfleri birbirinden ayırır; örneğin “A” ve “a” tamamen farklı anlamlara sahiptir.
kullanılabilirlik
ansi.sys komutu harici bir dosyadır ve aşağıdaki Microsoft işletim sistemlerinde mevcuttur.
- MS-DOS 5.0 ve üzeri
- Windows 95
- Windows 98
- Windows NT
- Windows 2000
- Windows XP
nasıl yüklenir
config.sys dosyanızda device veya devicehigh komutunu kullanın.
Bu dosyayı Windows 95 veya 98’de yüklemek için config.sys dosyasında aşağıdaki satır bulunmalıdır.
device=c:windowscommandansi.sys
Bu dosyayı Windows 3.x veya Windows NT’de yüklemek için aşağıdaki satırı kullanın.
device=c:dosansi.sys
Ansi.sys sözdizimi
Sözdizimi
Device=[drive:][path]ANSI.SYS [/x] [/k] [/r]
parametreler
NS [drive:][path] Ansi.sys dosyasının konumunu belirtir. Ek olarak [drive:][path] Ansi.sys dosyasının konumunu belirtir. Bu dosyaların nereye yükleneceğine ilişkin ek bilgiler nasıl yüklenir bölümündedir.
Anahtarlar
/x | Genişletilmiş tuşları 101 tuşlu klavyelerde bağımsız olarak yeniden eşler. |
/k | ANSI.SYS’nin 101 tuşlu klavyeye 84 tuşlu klavye gibi davranmasına neden olur. SWITCHES=/k komutuna eşdeğerdir. Genelde SWITCHES=/k komutunu kullanıyorsanız, ANSI.SYS ile /k anahtarını kullanmanız gerekir. |
/r | ANSI.SYS ekran okuma programlarıyla kullanıldığında okunabilirliği artırmak için satır kaydırmayı ayarlar (bu, bilgisayarları engelli kişiler için daha erişilebilir hale getirir). |
parametreler
Pn | Sayısal parametre. Bir ondalık sayı belirtir. |
not | Seçici parametre. Bir işlevi seçmek için kullandığınız ondalık sayıyı belirtir. Parametreleri noktalı virgülle ayırarak birden fazla fonksiyon belirtebilirsiniz. |
PL | Hat parametresi. Ekranınızdaki veya başka bir cihazdaki satırlardan birini temsil eden bir ondalık sayı belirtir. |
bilgisayar | Sütun parametresi. Ekranınızdaki veya başka bir cihazdaki sütunlardan birini temsil eden bir ondalık sayı belirtir. |
Kaçış dizileri
İmleç hareketi, grafikler ve klavye ayarları için ANSI kaçış dizileri
Aşağıdaki ANSI kaçış dizileri listesinde, ESC kısaltması, her kaçış dizisinin başında görünen ASCII kaçış karakteri 27’yi (1Bh) temsil eder.
ESC[PL;PcH | Cursor position: moves the cursor to the specified position (coordinates). If you do not specify a position, the cursor moves to the home position — the upper-left corner of the screen (line 0, column 0). This escape sequence works the same way as the below cursor position escape sequence. |
ESC[PL;Pcf | Cursor position: works the same way as the preceding cursor position escape sequence. |
ESC[PnA | Cursor up: moves the cursor up by the specified number of lines without changing columns. If the cursor is already on the top line, ANSI.SYS ignores this sequence. |
ESC[PnB | Cursor down: moves the cursor down by the specified number of lines without changing columns. If the cursor is already on the bottom line, ANSI.SYS ignores this sequence. |
ESC[PnC | Cursor forward: moves the cursor forward by the specified number of columns without changing lines. If the cursor is already in the rightmost column, ANSI.SYS ignores this sequence. |
ESC[PnD | Cursor backward: moves the cursor back by the specified number of columns without changing lines. If the cursor is already in the leftmost column, ANSI.SYS ignores this sequence. |
ESC[s | Save cursor position: saves the current cursor position. You can move the cursor to the saved cursor position with the restore cursor position sequence. |
ESC[u | Restore cursor position: returns the cursor to the position stored by the save cursor position sequence. |
ESC[2J | Erase display: clears the screen and moves the cursor to the home position (line 0, column 0). |
ESC[K | Erase line: clears all characters from the cursor position to the end of the line (including the character at the cursor position). |
ESC[Ps;…;Psm | Set graphics mode: calls the graphics functions specified by the below values. These specified functions remain active until the next occurrence of this escape sequence. Graphics mode changes the colors and attributes of text (such as bold and underline) displayed on the screen. |
Text attributes
0 | All attributes off. |
1 | Bold on. |
4 | Underscore (on monochrome display adapter only). |
5 | Blink on. |
7 | Reverse video on. |
8 | Concealed on. |
Foreground colors
30 | Black |
31 | Red |
32 | Green |
33 | Yellow |
34 | Blue |
35 | Magenta |
36 | Cyan |
37 | White |
Background colors
40 | Black |
41 | Red |
42 | Green |
43 | Yellow |
44 | Blue |
45 | Magenta |
46 | Cyan |
47 | White |
Parameters 30 through 47 meet the ISO 6429 standard.
ESC[=Psh
Set Mode: Changes the screen width or type to the mode specified by one of the below values:
0 | 40 x 148 x 25 monochrome (text) |
1 | 40 x 148 x 25 color (text) |
2 | 80 x 148 x 25 monochrome (text) |
3 | 80 x 148 x 25 color (text) |
4 | 320 x 148 x 200 4-color (graphics) |
5 | 320 x 148 x 200 monochrome (graphics) |
6 | 640 x 148 x 200 monochrome (graphics) |
7 | Enables line wrapping |
13 | 320 x 148 x 200 color (graphics) |
14 | 640 x 148 x 200 color (16-color graphics) |
15 | 640 x 148 x 350 monochrome (2-color graphics) |
16 | 640 x 148 x 350 color (16-color graphics) |
17 | 640 x 148 x 480 monochrome (2-color graphics) |
18 | 640 x 148 x 480 color (16-color graphics) |
19 | 320 x 148 x 200 color (256-color graphics) |
Reset Mode: resets the mode with the same values that set mode uses, except for 7, which disables line wrapping. The last character in this escape sequence is a lowercase “L” letter.
ESC[code;string;…p
Set keyboard strings: redefines a keyboard key to a specified string. The parameters for this escape sequence are defined as follows:
- Code is one or more of the values listed in the below table. These values represent keyboard keys and key combinations. When using these values in a command, you must type the semicolons shown in this table in addition to the semicolons required by the escape sequence. The codes in parentheses are not available on some keyboards. ANSI.SYS will not interpret the codes in parentheses for those keyboards unless you specify the /x switch in the device command for ANSI.SYS.
- String is either the ASCII code for a single character or a string contained in quotation marks. For example, both 65 and “A” can represent an uppercase “A” letter.
Some of the values in the below table are not valid for all computers. Check your computer’s documentation for values that are different.
ASCII key codes
Key | Code | ^Shift^+code | ^Ctrl^+code | Alt+code |
---|---|---|---|---|
F1 | 0;59 | 0;84 | 0;94 | 0;104 |
F2 | 0;60 | 0;85 | 0;95 | 0;105 |
F3 | 0;61 | 0;86 | 0;96 | 0;106 |
F4 | 0;62 | 0;87 | 0;97 | 0;107 |
F5 | 0;63 | 0;88 | 0;98 | 0;108 |
F6 | 0;64 | 0;89 | 0;99 | 0;109 |
F7 | 0;65 | 0;90 | 0;100 | 0;110 |
F8 | 0;66 | 0;91 | 0;101 | 0;111 |
F9 | 0;67 | 0;92 | 0;102 | 0;112 |
F10 | 0;68 | 0;93 | 0;103 | 0;113 |
F11 | 0;133 | 0;135 | 0;137 | 0;139 |
F12 | 0;134 | 0;136 | 0;138 | 0;140 |
Home (num keypad) | 0;71 | 55 | 0;119 | – |
Up arrow (num keypad) | 0;72 | 56 | (0;141) | – |
Page up (num keypad) | 0;73 | 57 | 0;132 | – |
Left arrow (num keypad) | 0;75 | 52 | 0;115 | – |
Right arrow (num keypad) | 0;77 | 54 | 0;116 | – |
End (num keypad) | 0;79 | 49 | 0;117 | – |
Down arrow (num keypad) | 0;80 | 50 | (0;145) | – |
Page down (num keypad) | 0;81 | 51 | 0;118 | – |
Insert (num keypad) | 0;82 | 48 | (0;146) | – |
Delete (num keypad) | 0;83 | 46 | (0;147) | – |
Home | (224;71) | (224;71) | (224;119) | (224;151) |
Up arrow | (224;72) | (224;72) | (224;141) | (224;152) |
Page up | (224;73) | (224;73) | (224;132) | (224;153) |
Left arrow | (224;75) | (224;75) | (224;115) | (224;155) |
Right arrow | (224;77) | (224;77) | (224;116) | (224;157) |
End | (224;79) | (224;79) | (224;117) | (224;159) |
Down arrow | (224;80) | (224;80) | (224;145) | (224;154) |
Page down | (224;81) | (224;81) | (224;118) | (224;161) |
Insert | (224;82) | (224;82) | (224;146) | (224;162) |
Delete | (224;83) | (224;83) | (224;147) | (224;163) |
Print screen | – | – | 0;114 | – |
Pause/Break | – | – | 0;0 | – |
Backspace | 8 | 8 | 127 | (0) |
Enter | 13 | 0 | 10 | (0 |
Tab | 9 | 0;15 | (0;148) | (0;165) |
Null | 0;3 | – | – | – |
A | 97 | 65 | 1 | 0;30 |
B | 98 | 66 | 2 | 0;48 |
C | 99 | 66 | 3 | 0;46 |
D | 100 | 68 | 5 | 0;18 |
E | 101 | 69 | 5 | 0;18 |
F | 102 | 70 | 6 | 0;33 |
G | 103 | 71 | 7 | 0;34 |
H | 104 | 72 | 8 | 0;35 |
I | 105 | 73 | 9 | 0;23 |
J | 106 | 74 | 10 | 0;36 |
K | 107 | 75 | 11 | 0;37 |
L | 108 | 76 | 12 | 0;38 |
M | 109 | 77 | 13 | 0;50 |
N | 110 | 78 | 14 | 0;49 |
O | 111 | 79 | 15 | 0;24 |
P | 112 | 80 | 16 | 0;25 |
Q | 113 | 81 | 17 | 0;16 |
R | 114 | 82 | 18 | 0;19 |
S | 115 | 83 | 19 | 0;31 |
T | 116 | 84 | 20 | 0;20 |
U | 117 | 85 | 21 | 0;22 |
V | 118 | 86 | 22 | 0;47 |
W | 119 | 87 | 23 | 0;17 |
X | 120 | 88 | 24 | 0;45 |
Y | 121 | 89 | 25 | 0;21 |
Z | 122 | 90 | 26 | 0;44 |
1 | 49 | 33 | – | 0;120 |
2 | 50 | 64 | 0 | 0;121 |
3 | 51 | 35 | – | 0;122 |
4 | 52 | 36 | – | 0;123 |
5 | 53 | 37 | – | 0;124 |
6 | 54 | 94 | 30 | 0;125 |
7 | 55 | 38 | – | 0;126 |
8 | 56 | 42 | – | 0;126 |
9 | 57 | 40 | – | 0;127 |
0 | 48 | 41 | – | 0;129 |
– (minus) | 45 | 95 | 31 | 0;130 |
= (equals) | 61 | 43 | – | 0;131 |
] (parantez kapat) | 91 | 123 | 27 | 0;26 |
[(parantezaç)[(openbracket) | 93 | 125 | 29 | 0;27 |
92 | 124 | 28 | 0;43 | |
; (noktalı virgül) | 59 | 58 | – | 0;39 |
‘ (tek alıntı) | 39 | 34 | – | 0;40 |
. (dönem) | 46 | 60 | – | 0;51 |
\/(eğik çizgi) | 47 | 63 | – | 0,53 |
`(geri alıntı) | 39 | 34 | – | 0;40 |
Girin (tuş takımı) | 13 | – | 10 | (0;116) |
\/(klavye) | 47 | 47 | (0;142) | (0;74) |
* (klavye) | 42 | (0;144) | (0;78) | – |
– (klavye) | 45 | 45 | (0;149) | (0;164) |
+ (tuş takımı) | 43 | 43 | (0;150) | (0;55) |
5 (tuş takımı) | (0;76) | 53 | (0;143) | – |
Teknik Destek
- Windows ME ile MS-DOS sorunları nasıl düzeltilir?