--
---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"
Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com
echo ^G
If I simply put this line in a batch file, should it beep?
For some reason it doesnt. Running XP.
Do I need to do something else?
--
---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"
Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com
"robi" <rob...@ciachgazeta.pl> wrote in message
news:bpicbe$fai$1...@inews.gazeta.pl...
try this
1. create file bell.txt cantainig string ^G (or ^G^G^G)
2. in batch flie do: type bell.txt
--
---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"
Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com
"robi" <rob...@ciachgazeta.pl> wrote in message
news:bpie18$m0n$1...@inews.gazeta.pl...
Some editors won't let you enter ^G (e.g. notepad.exe). You
can get around the problem by doing this:
- Create c:\test.bat with notepad.exe:
@echo off
echo
- Save & close the file
- Type this:
echo Ctrl+G Ctrl+G Ctrl+G>>c:\test.bat
- Reopen test.bat with notepad.exe
- Place the black blocks after the "echo" on the second line.
- Save & close
- Run the batch file
^G is in fact hold down alt key and press 7 from numeric keyboard, then
relase both keys - it will display ^G on screen.
Best way to create bell.txt is doing this from command prompt:
copy con bell.txt [Enter]
alt-7 [Enter] (display ^G)
F6 [Enter] (displays ^Z - end of input)
--
---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"
Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com
"Pegasus (MVP)" <I....@fly.com> wrote in message
news:bpieib$2mim$1...@arachne.labyrinth.net.au...
echo X502503P_5:S)E8,wP-Q_P5r35;4P-+JP5JS-W$Phkxh-k-$'$^^PTXSW9#vylkkt>beep.com
echo kvqvqynosvkkukqymousowqymooylqwknkqylqvvswkktvzzzztoprxzvoprrzoy>>beep.com
echo lqomwzqylqovwoxwlmnw >>beep.com
beep
beep
Source:
mov al, 182
out 43h, al
mov ax, 2560
out 42h, al
mov al, ah
out 42h, al
in al, 61h
or al, 00000011b
out 61h, al
mov bx, 200
.p1:
mov cx, 65535
.p2:
dec cx
jne .p2
dec bx
jne .p1
in al, 61h
and al, 11111100b
out 61h, al
>Source:
>
>mov al, 182
>out 43h, al
>mov ax, 2560
>
>out 42h, al
>mov al, ah
>out 42h, al
>in al, 61h
>
>or al, 00000011b
>out 61h, al
>mov bx, 200
>.p1:
>mov cx, 65535
>.p2:
>dec cx
>jne .p2
>dec bx
>jne .p1
>in al, 61h
>
>and al, 11111100b
>out 61h, al
>
==============================================================
C:\>dump beep.com
0000: 58 35 30 32 35 30 33 50 5F 35 3A 53 29 45 38 2C : X502503P_5:S)E8,
0010: 77 50 2D 51 5F 50 35 72 33 35 3B 34 50 2D 2B 4A : wP-Q_P5r35;4P-+J
0020: 50 35 4A 53 2D 57 24 50 68 6B 78 68 2D 6B 2D 24 : P5JS-W$Phkxh-k-$
0030: 27 24 5E 50 54 58 53 57 39 23 76 79 6C 6B 6B 74 : '$^PTXSW9#vylkkt
0040: 0D 0A 6B 76 71 76 71 79 6E 6F 73 76 6B 6B 75 6B : ..kvqvqynosvkkuk
0050: 71 79 6D 6F 75 73 6F 77 71 79 6D 6F 6F 79 6C 71 : qymousowqymooylq
0060: 77 6B 6E 6B 71 79 6C 71 76 76 73 77 6B 6B 74 76 : wknkqylqvvswkktv
0070: 7A 7A 7A 7A 74 6F 70 72 78 7A 76 6F 70 72 72 7A : zzzztoprxzvoprrz
0080: 6F 79 0D 0A 6C 71 6F 6D 77 7A 71 79 6C 71 6F 76 : oy..lqomwzqylqov
0090: 77 6F 78 77 6C 6D 6E 77 20 0D 0A : woxwlmnw ..
Dump beendet.
C:\>debug beep.com
-r
AX=0000 BX=0000 CX=009B DX=0000 SP=FFFE BP=0000 SI=0000 DI=0000
DS=0CFF ES=0CFF SS=0CFF CS=0CFF IP=0100 NV UP EI PL NZ NA PO NC
0CFF:0100 58 POP AX
-u
0CFF:0100 58 POP AX
0CFF:0101 353032 XOR AX,3230
0CFF:0104 353033 XOR AX,3330
0CFF:0107 50 PUSH AX
0CFF:0108 5F POP DI
0CFF:0109 353A53 XOR AX,533A
0CFF:010C 294538 SUB [DI+38],AX
0CFF:010F 2C77 SUB AL,77
0CFF:0111 50 PUSH AX
0CFF:0112 2D515F SUB AX,5F51
0CFF:0115 50 PUSH AX
0CFF:0116 357233 XOR AX,3372
0CFF:0119 353B34 XOR AX,343B
0CFF:011C 50 PUSH AX
0CFF:011D 2D2B4A SUB AX,4A2B
-q
==================================================================
Which is different from your source. So people who don't believe have
difficulties to prove correctness of the com file.
No offense meant. _I_ think ascii asm is a useful.
--
Greetings
Matthias
I've furnished the exact source but the com file is encoded.
No, here is the disasembled source:
1fd9 : 00002ea7 br.b $2eaa (eb 01)
1fd9 : 00002ea9 nop (90)
1fd9 : 00002eaa move.b #$b6,r0 (b0 b6)
1fd9 : 00002eac out.b r0,#$43 (e6 43)
1fd9 : 00002eae move.w #$0a00,r0 (b8 00 0a)
1fd9 : 00002eb1 out.b r0,#$42 (e6 42)
1fd9 : 00002eb3 move.b m0,r0 (8a c4)
1fd9 : 00002eb5 out.b r0,#$42 (e6 42)
1fd9 : 00002eb7 in.b #$61,r0 (e4 61)
1fd9 : 00002eb9 or.b #$03,r0 (0c 03)
1fd9 : 00002ebb out.b r0,#$61 (e6 61)
1fd9 : 00002ebd move.w #$00c8,r3 (bb c8 00)
1fd9 : 00002ec0 move.w #$ffff,r2 (b9 ff ff)
1fd9 : 00002ec3 dec.w r2 (49)
1fd9 : 00002ec4 bne.b $2ec3 (75 fd)
1fd9 : 00002ec6 dec.w r3 (4b)
1fd9 : 00002ec7 bne.b $2ec0 (75 f7)
1fd9 : 00002ec9 in.b #$61,r0 (e4 61)
1fd9 : 00002ecb and.b #$fc,r0 (24 fc)
1fd9 : 00002ecd out.b r0,#$61 (e6 61)
1fd9 : 00002ecf move.b #$4c,m0 (b4 4c)
1fd9 : 00002ed1 trap #$21 (cd 21)
1fd9 : 00002ed3 rts.w (c3)
You didn't mention the unnecessary branch at the beginning,
the exit code and the unnecessary ret instruction. But your
delay loop is real funny: the length of the sound is inverse
proportional to the processor speed.
But as I already have said, you shouldn't use this decoder routine.
- because of the escaped ^ character the program will crash in DOS/Win9x
- if there is an extra space at the end of a line the code will fail
- this method uses 2 ascii characters for 1 binary byte and therefore
generates unnecessary large code
Or is this an attempt to bring discredit to ASCII assembler programming?
Ops ,here is the correct com file:
X502503P_5:P)En-whP,QP5rH5;TP-{IP-kB-kTP-*BP-hc-iZP5O35JTP-za-eB
QP-{X,}P-_s$DPh;y-0m-(jP-!\P-5O-JAPh^$TZSXSW9$Oght+Ki(P*tKK]st\K
tSW+)tISims(izfzMXizMX^xtSKDzt*ShNEnC
>But your
> delay loop is real funny: the length of the sound is inverse
> proportional to the processor speed.
Who cares?
> But as I already have said, you shouldn't use this decoder routine.
>
> - because of the escaped ^ character the program will crash in DOS/Win9x
>
> - if there is an extra space at the end of a line the code will fail
>
> - this method uses 2 ascii characters for 1 binary byte and therefore
> generates unnecessary large code
>
> Or is this an attempt to bring discredit to ASCII assembler programming?
No I'm a beginner!
> - this method uses 2 ascii characters for 1 binary byte and therefore
> generates unnecessary large code
With CM3.COM:
`h}aXP5y`P]4nP_XW(F4(F6(F=(FF)FH(FL(Fe(FR0FTs*}`A?+,
fkOU):G*@Crv,*t$HU[rlf~#IubfRfXf(V#fj}fX4{PY$@fPfZsZ$:I}n$*P
09;n}perxK/~s7B*f)}?8he9,p1{6+2UzO6f8rZ/lqs:;R:j}WRX]'=v@{,M
y~#
181 bites
With mine:
X502503P_5:P)En-whP,QP5rH5;TP-{IP-kB-kTP-*BP-hc-iZP5O35JTP-za-eB
QP-{X,}P-_s$DPh;y-0m-(jP-!\P-5O-JAPh^$TZSXSW9$Oght+Ki(P*tKK]st\K
tSW+)tISims(izfzMXizMX^xtSKDzt*ShNEnC
169 bites
Why didn't you just replace the ^ character in your original code
by a ~ character?
X502503P_5:S)E8,wP-Q_P5r35;4P-+JP5JS-W$Phkxh-k-$'$^PTXSW9#
X502503P_5:S)E8,wP-Q_P5r35;4P-+JP5JS-W$Phkxh-k-$'$~PTXSW9#
> With CM3.COM:
> 181 bites
>
> With mine:
> 169 bites
Yes, your decoding routine is very compact. So for very small
programs your over all size is smaller. But for larger programs
the cm3 encoded size is only 5/8 of your size.
> Thank you so much to both Robi and Pegasus.
> You guys are the best, thank you.
>
It seems you have your solution. I was about to suggest that your
computer might have shipped with no "bell". Some systems may have a
sound card chip and no built-in speaker in which case you may need a
workaround. Another problem in some MS OSs could be that the beep.sys
driver is disabled. You can also use .wav files from batch by several
methods if desired.
> > I've furnished the exact source but the com file is encoded.
> But as I already have said, you shouldn't use this decoder routine.
>
> - because of the escaped ^ character the program will crash in DOS/Win9x
Thanks very much for the heads-up Herbert!
--
Todd Vargo (body of message must contain my name to reply by email)
Yes:
X502503P_5:S)E8,wP-Q_P5r35;4P-+JP5JS-W$Phkxh-k-$'$~PTXSW9#kvqvqy
nosvkkukqymosskyqymooylqwkrkqylqvvswkktvzzzztoprxzvoprrzoylqomwz
qylqovwoxwlm
> Is there way to make remote computer beep?
Open an interactive session on the remotes system and issue ^G
(psexec.exe for example) ...but who would want to?
Or was it a joke?
What I want to do is receive some distinct sound signal (3 beeps for
instance) on comp2 after remote batch completed on comp1.
Batch initiated and executed on comp1.
Problem with psexec is hardcoded password will be exposed in the batch
file.
B.
Maybe stick a
NET SEND
in that file at the end...