Re: to make a TSR
- From: "almas" <almes@xxxxxxxxxx>
- Date: Sun, 27 Apr 2008 11:44:40 +0200
Hi everybody.
I download TSR-Programs from Garbo...
I have not new ideas.
The actual file do not works "TSR"
I modify my faile, now 110 bytes
Below, the actual code
If somebody can make it "TSR" ...
Regards
Almas
mov si,80h
lodsb
cmp al,0
jz error
inc si ; mov si,82h ; Sure i type 3 numbers !
mov bl,64h ; ;;;; push dx
call rout ; engine
mov cx,ax ; keep the hundred
mov bl,0Ah ; prepare the ten ;;;; pop dx
call rout
mov dx,ax ; save second number in DX
push dx
mov bl,1 ; for Unit calcul
call rout
add ax,cx
pop dx
add ax,dx ; get the value in Hexa
xchg ax,bx
mov ax,18 ; 1080 for minutes
mul bx
xchg ax,bx ; save the timer value
push ds ; wait 55 ms
push 40h
pop ds
mov ax,ds:[6ch]
add ax,bx
m_wait:
cmp ax, ds:[6ch]
jnz m_wait
pop ds
mov ax, 1000h ; make white back ground
m_sound:
mov bx, 0700h ; 7=White, do also a noise
int 10h
son:
mov ah,0Bh ; wait key-press
int 21h
cmp al,0FFh
jz m_cls
mov dx, offset [m_sound+1]
mov ax,0924h ; 24=$ end of text
int 21h
jmp short son
;- againbip: dec bx old way to make noise
;- mov ax,0a0a3h
;- out 61h,al
;- sub cx,cx
;- loopici: loop loopici
;- mov al,ah
;- out 61h,al
;- cmp bx,0
;- jnz againbip
;- final:
;- mov al, 0FFh
;- out 61h,al
;- xor ax,ax
;- int 16h
;- mov al,0a1h
;- out 61h,al
m_cls:
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 !
error:
mov dx, offset text
mov ah,09 ; yes, i CLS then display text !
int 21h
ret ; int 20h ;;;;; numb db: ,0,0,0,0
text db: "3 Nbr$"
rout:
xor ax,ax
lodsb
sub al,30h
mul bx
ret
"almas" <almes@xxxxxxxxxx> a écrit dans le message de news:
48131b42$0$866$ba4acef3@xxxxxxxxxxxxxxxxx
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
.
- References:
- to make a TSR
- From: almas
- to make a TSR
- Prev by Date: Re: to make a TSR
- Next by Date: Re: to make a TSR
- Previous by thread: Re: to make a TSR
- Next by thread: Algorithms In Assembly Language
- Index(es):
Relevant Pages
|