Vi?c ch?p nh?n ?u vo bn phm trong cc t?p tin Batch

D?ch tiu ? D?ch tiu ?
ID c?a bi: 77457 - Xem s?n ph?m m bi ny p d?ng vo.
Bung t?t c? | Thu g?n t?t c?

? Trang ny

TM T?T

C s? ngn ng? l MS-DOS khng cung c?p m?t phng ti?n ? b?n cung c?p ?u vo ? ki?m sot d?ng ch?y c?a chng tr?nh. T?t c? thng tin ?u vo t? b?n ph?i ?c nh?p t? d?ng l?nh.

B?ng cch s? d?ng m?t chng tr?nh ng?n t?o ra v?i cc ti?n ch MS-DOS Debug, b?n c th? cung c?p thng tin th?i ?t t?p tin th?c thi.

Lu ?: M?c d chng tr?nh g? l?i ho?t ?ng v?i MS-DOS 6.0 ho?c 6,2, n l khng b?t bu?c. N?u b?n ang s? d?ng MS-DOS 6.0 ho?c 6,2, g? tr? gip l?a ch?nt?i d?u nh?c l?nh MS-DOS cho bi?t thm thng tin.

THNG TIN THM

Chng tr?nh g? l?i ? ph?n cu?i c?a bi vi?t ny s? ch? ?i cho b?n ?u vo m?t nhn v?t t? bn phm v thi?t l?p gi tr? c?a "errorlevel" b?ng v?i gi tr? m? ASCII c?a k t? ?c nh?p. ? bi?t danh sch K? t? ASCII v gi tr? lin quan c?a h?, xem ANSI.SYS ph?n trong h?ng d?n s? d?ng MS-DOS c?a b?n.

H?u h?t cc k? t? bn phm ?c ?i di?n b?i ch? c m?t m?. Tuy nhin, cc ch?c nng v t? h?p phm ALT g?i hai m? s?: m?t s? khng, theo sau l m?t m?. Tr? l?i.COM chng tr?nh s? thi?t l?p "errorlevel" tng ng v?i cc Th? hai m? ?c thng qua. V d?, phm F8 s? g?i m?t s? khng theo sau gi tr? 66. i?u ny s? ?c gi?i thch b?i th tr? l?i.COM l k? t? "B," m c gi tr? ASCII c?a 66.

TR? L?I.COM c th? ?c s? d?ng trong ?t t?p tin ? cho php ?u vo ng?i dng ? ki?m sot d?ng ch?y c?a chng tr?nh. V d?, AUTOEXEC sau.DI t?p tin cho php b?n ? xc ?nh c hay khng ? ci ?t m?t tr?nh i?u khi?n chu?t trong khi kh?i ?ng:
   @Echo off
   path=C:\DOS
   :Ask
   Echo Install Mouse Driver (y/n)?
   Reply
   If errorlevel 121 if not errorlevel 122 goto install
   If errorlevel 89 if not errorlevel 90 goto install
   If errorlevel 110 if not errorlevel 111 goto NoMouse
   If errorlevel 78 if not errorlevel 79 goto NoMouse
   goto ask
   :install
   c:\mouse\mouse
   :NoMouse
   cls
   ver
				
Cho bi?t thm thng tin v? cch s? d?ng mi tr?ng "errorlevel" bi?n, truy v?n trn t? sau trong c s? ki?n th?c Microsoft:
ErrorLevel

TR? L?I.COM

T?o th tr? l?i.COM, nh?p vn b?n ?c li?t k trong c?t ch? d?n. Nh?n ENTER sau m?i l?nh. Khng a vo vn b?n ?c li?t k trong c?t b?nh lu?n; n l ? tham kh?o c?a b?n.
           Instruction     Comment
           -----------     -------

            DEBUG       Executes MS-DOS DEBUG utility
-A 100                  Begin assembling instructions at memory location
100
xxxx:0100   MOV AH,08   Get character input without echo
xxxx:0102   INT 21      Perform MS-DOS service
xxxx:0104   CMP AL,0    Compare AL with zero
xxxx:0106   JNZ 010A    If lead zero, get second code of character
xxxx:0108   INT 21      Perform MS-DOS service
xxxx:010A   MOV AH,4C   Terminate process with return code
xxxx:010C   INT 21      Perform MS-DOS service
xxxx:010E   <ENTER>
-rcx
CX 0000
:e
-n REPLY.COM
-w
Writing 000E bytes
-q
				

THAM KH?O

"Supercharging MS-DOS," cc trang 97-98, b?i Van Wolverton, Microsoft Bo ch, 1989, 1991 (C?p Nh?t cho phin b?n 4).

Thu?c tnh

ID c?a bi: 77457 - L?n xem xt sau cng: 17 Thang Tam 2011 - Xem xt l?i: 2.0
p d?ng
  • Microsoft MS-DOS 4.0 Standard Edition
  • Microsoft MS-DOS 5.0 Standard Edition
  • Microsoft MS-DOS 6.0 Standard Edition
  • Microsoft MS-DOS 6.2 Standard Edition
  • Microsoft MS-DOS 6.21 Standard Edition
  • Microsoft MS-DOS 6.22 Standard Edition
T? kha:
kbmt KB77457 KbMtvi
My d?ch
QUAN TRONG: Bi vi?t ny ?c d?ch b?ng ph?n m?m d?ch my c?a Microsoft ch? khng ph?i do con ng?i d?ch. Microsoft cung c?p cc bi vi?t do con ng?i d?ch v c? cc bi vi?t do my d?ch ? b?n c th? truy c?p vo t?t c? cc bi vi?t trong C s? Ki?n th?c c?a chng ti b?ng ngn ng? c?a b?n. Tuy nhin, bi vi?t do my d?ch khng ph?i lc no c?ng hon h?o. Lo?i bi vi?t ny c th? ch?a cc sai st v? t? v?ng, c php ho?c ng? php, gi?ng nh m?t ng?i n?c ngoi c th? m?c sai st khi ni ngn ng? c?a b?n. Microsoft khng ch?u trch nhi?m v? b?t k? s? thi?u chnh xc, sai st ho?c thi?t h?i no do vi?c d?ch sai n?i dung ho?c do ho?t ?ng s? d?ng c?a khch hng gy ra. Microsoft c?ng th?ng xuyn c?p nh?t ph?n m?m d?ch my ny.
Nh?p chu?t vo y ? xem b?n ti?ng Anh c?a bi vi?t ny:77457
Khc t Ni dung trong C s Kin thc Khng con c h tr
Bi vi?t ny ni v? cc s?n ph?m m Microsoft khng c?n h? tr? n?a. Do , bi vi?t ny ?c cung c?p "nguyn b?n" v s? khng ?c c?p nh?t.

Cung cp Phan hi

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com