Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly Language > to make a TSR
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 7 Topic 4975 of 5072
Post > Topic >>

to make a TSR

by "almas" <almes@[EMAIL PROTECTED] > Apr 26, 2008 at 02:10 PM

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
 




 7 Posts in Topic:
to make a TSR
"almas" <alm  2008-04-26 14:10:34 
Re: to make a TSR
"almas" <alm  2008-04-27 11:44:40 
Re: to make a TSR
Dirk Wolfgang Glomp <d  2008-04-27 11:29:14 
Re: to make a TSR
"almas" <alm  2008-04-27 23:04:00 
Re: to make a TSR
Dirk Wolfgang Glomp <d  2008-04-28 09:03:08 
Re: to make a TSR
"almas" <alm  2008-04-28 11:22:51 
Re: to make a TSR
Dirk Wolfgang Glomp <d  2008-04-28 16:52:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 16:09:58 CDT 2008.