to make a TSR



Hi everybody
I have an file callde ALARM.COM, it display the time, and can make a beep at
an other time.
.... Sure you know it !

My aim : just make a noise after ... X seconds.
I have a solution : calculate 1 second ...OK, sure if i want a minute, it
will be OK
I can type the value of duration.... OK
then, it display a red back ground screen
make a 1st noise, the an other with more high frequency ...OK
NOTE : if run alone, the second noise do not work, si i run a first noise,
the the second.

But i would make a TSR.
The aim : i type the file name ALARM, ... ican forget the program, do an
other thing
....do what i want on DOS cession.... and after X seconds, or minutes, the
noise ring
and i remerber that i have do do something..

If somebody have a better idea, i will appréciate

Regards Almas


the file alarm, i found have 800 bytes, this file have about 120 bytes

; mov si,80h ;LODSB ;cmp al,4 ; controle synthax ;jnz use ;inc si

mov si,82h ; this part register a number
mov bl,64h ; for cent
push dx ;;
call rout ; engine
mov cx,ax ; keep the hundred
mov bl,0Ah ; prepare the ten
pop dx ;;
call rout
mov dx,ax
push dx
mov bl,1 ; for Unit calcul
call rout
add ax,cx
pop dx
add ax,dx
mov offset numb,ax ; the number look correct

jmp short tmp0
numb db: ,0,0,0,0

rout:
xor ax,ax
lodsb
sub al,30h
mul bx
ret

tmp0: ; this part spend time
mov ax,18 ;18 for second 1080 for minute
mov bx, [offset numb]
mul bx
xchg ax,bx

;--- wait about 18*55ms
push ds
push 40h
pop ds
mov ax,ds:[6ch]
; add ax,18
add ax,bx

m_wait:
cmp ax, ds:[6ch]
jnz m_wait
pop ds
; int 20h

mov ax, 1000h ; make red back ground
mov bx, 0400h
int 10h


mov bx,0010h ; do a first bip, then a second
againbip:
dec bx
mov ax,0a0a3h
out 61h,al
sub cx,cx
loopici:
loop loopici
mov al,ah
out 61h,al
cmp bx,0
jnz againbip

; if i run alone this noise, sometimes, no thing happen
; if i run first the noise above, all is OK

final: second noise
mov ax, 0FFFFh
out 61h,al
xor ax,ax
int 16h
mov al,0a1h
out 61h,al

mov ax,0003 ; sure, my screen is VGA
int 10h ; do a CL_ean S_creen

;;;; mov dx, 0120h ; i would forgen the COM file
;;;; mov ah, 31h ; a do an other work, sure that
;;;; int 21h ; i will have a noise !

int 20h




.



Relevant Pages

  • Re: to make a TSR
    ... then i run B25 i have always a low frequency noise. ... i run again B12 and i have always a noise ... mov al, 0B6h ... DX = number of paragraphs to keep resident ...
    (alt.lang.asm)
  • Re: to make a TSR
    ... I will try the TSR, it the most important for me. ... What do you mean about " Transient Label word " ... About the noise... ... mov al, 0B6h ...
    (alt.lang.asm)
  • Re: Speaking of Toscanini....
    ... Mov 1 goes quite good as for equalization and natural sound, ... though of low intensity noise which follows the music, ...
    (rec.music.classical.recordings)
  • Re: to make a TSR
    ... call rout; engine ... mov cx,ax; keep the hundred ... int 10h ... dec bx old way to make noise ...
    (alt.lang.asm)
  • ascii to st0
    ... push IDC_ARROW ... cmp eax, 0 ... mov ebp, esp ... cmp dword @Message, WM_CLOSE ...
    (alt.lang.asm)