Re: Batch sent X10 command



On 17 Jul 2006 10:48:43 -0700, rcochran@xxxxxxxxxx wrote in message
<1153158523.929292.219110@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>:


Si Ballenger wrote:
On Tue, 11 Jul 2006 15:27:27 -0400, MFHult@xxxxxxxxxxxxxxxxxxxxx
wrote:

PING 1.1.1.1 -n 1 -w 5000 >NUL

another possible approach for a 5 second delay:

ping 127.0.0.1 -n 6 >nul

A far more elegant approach for a delay is to use the "sleep" command
and tell it how many seconds you want to wait.

sleep 5

will wait 5 seconds without depending on any sort of tcp/ip setup
whatsoever.

--Rich

It may be "elegant" but it doesn't actually work within the scope of what
I described ("solution native to XP and TI103" ;-)

To create a sleep command 'natvely' in XP (default delay = 16), I suppose
one _could_ go :

debug

N SLEEP.COM
A 100
MOV SI,0082
MOV AX,[SI]
XCHG AH,AL
XOR AX,3030
MOV BL,AL
MOV AL,0A
MUL AH
ADD AX,BX
MOV SI,AX
MOV AH,2C
INT 21
MOV BL,DH
MOV AX,SI
AAM
OR AX,3030
XCHG AH,AL
MOV [0160],AX
MOV AH,09
MOV DX,0160
INT 21
MOV AH,06
MOV DL,FF
INT 21
JZ 014C
OR AL,AL
JNZ 013F
MOV AH,08
INT 21
MOV AL,FF
MOV DX,016C
PUSH AX
MOV AH,09
INT 21
POP AX
MOV AH,4C
INT 21
MOV AH,2C
INT 21
CMP BL,DH
JZ 012D
MOV BL,DH
DEC SI
JNZ 011A
SUB AL,AL
MOV DX,016C
JMP 0142
DB "XX SECONDS", D, 24
DB " ", D, A, 24

RCX
79
W
Q


But maybe not so 'elegant' as the one liner suggested ... ;-)

.... Marc
Marc_F_Hult
www.ECOntrol.org
.



Relevant Pages

  • Re: Unsigned integers
    ... >> less efficient (albeit more elegant, of course) than "unrolled loops' ... And I'm with you that small data doesn't always, or even usually, mean fast code. ... Using a short int to save space is going to cost you some speed when the native word size is a long int. ...
    (microsoft.public.vb.syntax)
  • Re: Passing an array of struct to function
    ... arnuld said: ... I am getting Segfaults and weired values. ... is there any elegant way ... int main ...
    (comp.lang.c)
  • Re: Problem with input streams
    ... > int main ... Are there flags that I have to change or something to reset fin? ... I'm no guru on streams so won't give you an elegant answer. ... solve your second problem. ...
    (comp.lang.cpp)
  • Re: How to create large files with c?
    ... My manager told me to create a large file of 2GB ... and the secod 1GB is filled with "World" ... Sorry to say that I don't know how to do that in an elegant way. ... int main ...
    (comp.lang.c)
  • Re: [linux-pm] [demo patch/RFC] sleepy linux
    ... +1) Download this big chunk in mozilla, then go to sleep ... but wake me up in 8:30 with mp3 player ... +static int autosuspend ... +extern int set_alarm; ...
    (Linux-Kernel)