to make a TSR
- From: "almas" <almes@xxxxxxxxxx>
- Date: Sat, 26 Apr 2008 14:10:34 +0200
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
.
- Follow-Ups:
- Re: to make a TSR
- From: almas
- Re: to make a TSR
- From: Dirk Wolfgang Glomp
- Re: to make a TSR
- Prev by Date: Re: PT_NOTE section in the ELF header
- Next by Date: Re: to make a TSR
- Previous by thread: PT_NOTE section in the ELF header
- Next by thread: Re: to make a TSR
- Index(es):
Relevant Pages
|