[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

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


comp.home.automation Main Index | comp.home.automation Thread Index | comp.home.automation Home | Archives Home