against AOH's

ZXNet echo conference «code.zx»

From Kirill Frolov To All 17 August 1998

├┤i, All! There was no way I could call Eagle Station and I had to write a subject program. And then I thought and decided that maybe it will be useful to someone... In general, the program sends using a momed like vikomnik AOH has a telephone number, just like a PBX. Of course AOH will see this number if the PBX does not respond to the request (this is exactly I had a case) or the AOH will be too early to send the request and listen to the answer. NUMOUT DI LD DE,NUMBUF ; number and category LD HL,GENBUF+9 ; buffer (end) LD BC,#08FF ; 7 digits number and 1 category LD (HL),12 ; START ; code 13 - end of parcel DEC HL PUTNUM1 LD A,(DE) : INC DE AND #0F JR NZ,$+4 : LD A,10 ; 0 is 10 DEC A ; everything is 1 less - to select from the table CP C JR NZ,$+4 : LD A,13 ; when repeated, replace with 14 LD C,A LD (HL),A : DEC HL ; the buffer is full from the end DJNZ PUTNUM1 LD (HL),12 ; END ; beginning of the parcel LD B,10 ; only 10 codes will be sent NUMGEN1 PUSH BC LD A,(HL) INC HL PUSH HL ADD A,A : ADD A,A ; selecting frequencies from the table LD L,A : LD H,0 LD DE,FRQTBL ADD HL,DE LD E,(HL) : INC HL LD D,(HL) : INC HL PUSH DE LD E,(HL) : INC HLLD D,(HL) : INC HL EXX POP DE LD IX,854*2 ; Send duration - 40 ms. CALL TWT ; beeps 2 frequencies DE and DE' time IX POP HL POP B.C. DJNZ NUMGEN1 ; the following combination XOR A OUT (#FE),A ; put down the pipe RET ;--------------------------------------- ;TWO_TONE_GENERATOR ; ; DE AND DE' = FREQUENCY ; ; IX = TIME ; ; TWT DI LD BC,#20FE ; port and data LD HL,#0000 EXX LD BC,#20FE LD HL,#0000 ;initial value of counters ;You don’t have to install it. TW0 EXX ADD HL,DE BIT 7,H JP Z,TW1 OUT(C),B DEC IX LD A,XL OR XH JP NZ,TW3 RET TW3 EXX ADD HL,DE BIT 7,H JP Z,TW2 TW5 OUT(C),B DEC IX LD A,XL OR XH JP NZ,TW0 ; 164 clock cycles whole procedure RET TW1 OUT(C),C DEC IX LD A,XL OR XH JP NZ,TW4 RET TW4 EXX ADD HL,DE BIT 7,H JP NZ,TW5 TW2 OUT(C),C DEC IX LD A,XL OR XH JP NZ,TW0 RET ;to calculate duration ;T=IX*1000*(164/3500000) MS ; ;IX=T/0.046857142 MS ; ; 40MS - IX=854 ; ;to calculate frequencies ;N=F*(32768/Fw) Fw=3500000/(164*2) ; ;N=F*3.070829714 ; ;; F(Hz) N(DE) ; ; 700 2150 ; 900 2764 ; 1100 3378 ; 1300 3992 ; 1500 4606 ; 1700 5220 ; ; The number goes like this ; Start 7 6 5 4 3 2 1 Cat. Stop ; base frequencies ; F0 - 700 Hz F3 - 1300 Hz ; F1 - 900 Hz F4 - 1500 Hz ; F2 - 1100 Hz F5 - 1700 Hz ;+-15 Hz. Duration 40 ms, level ; list of frequency combinations in code 2 of 6 ; (1)-01 (6) -23 (11)-05 ; (2)-02 (7) -04 (12)-15 ; (3)-12 (8) -14 (13)-25-beginning ; (4)-03 (9) -24 (14)-35-repeat ; (5)-13 (10)-34 (15)-45 ; code table 2 of 6 filled with values ; DE and DE' to generate the corresponding frequencies FRQTBL DW 2150,2764 DW 2150.3378 DW 2764.3378 DW 2150.3992 DW 2764.3992 DW 3378.3992 DW 2150.4606 DW 2764.4606 DW 3378.4606 DW 3992.4606 DW 2150.5220 DW 2764.5220 DW 3378.5220 DW 3992.5220 DW 4606.5220 ;telephone number 7 digits and category 1 digit (0). NUMBUF DB "12345670" ; ASCII PHONE+CAT. ;buffer for bringing the number into a more different form. ;you can do without it - recode and transmit immediately. GENBUF DS 10 That's all... It works 100% if the PBX does not respond, otherwise, the probability is close to zero.