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 > Make a TSR
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 9 Topic 5006 of 5083
Post > Topic >>

Make a TSR

by "almas" <almes@[EMAIL PROTECTED] > May 11, 2008 at 07:32 PM

Hi everybody.
I found a file : display time....
i modify it, the aim make a noise, or a red screen

In version "No TSR" it is ok,  but computer must wait.
In version TSR, it is not ok.
I try on cession DOS of Windows XP

Below, the code i used
If somebody have an idea to make it fonctionnal

Best regards
Almas

Note : in UPPER CASES the original code
in lower cases, at left of screen, my lines

; Example, i type  "time 11:10:45"  then file 1111
; 15 seconds after, i would have a red screen !

Time               SEGMENT
                   ORG 100h
                   ASSUME CS:Time,DS:Time

Start:  JMP short Init

MoveIt:            PUSH DS
                   PUSH ES
                   PUSH SI
                   PUSH DI
                   MOV SI,CS
                   MOV DS,SI
                   MOV ES,SI
                   MOV SI,(OFFSET NewInt1C) + 2 + 5
                   XOR DI,DI
                   CLD
                   MOV CX,Attente-(OFFSET NewInt1C)
                   REP MOVSB
                   MOV AX,251Ch
                   XOR DX,DX
                   INT 21h
                   POP DI
                   POP SI
                   POP ES
                   POP DS

NewInt1C PROC
                   DEC BYTE PTR CS:Attente
                   JZ MoveIt

                   PUSH AX
                   PUSH BX
                   PUSH CX
              PUSH DX ; lors de l'int 1A, DL = DaylightBROL ..=> DL=
buffer
                   PUSH ES
                   PUSH DI

                   CLD ; on affiche par addr video croissante (cnf CST)
                   MOV ES,AX

                   MOV AH,2
                   INT 1Ah ; get RTC value (HH-MM-SS in BCD !!!)
                   MOV BX,CX ; CX = count

                   MOV AL,BH ; heures
                   MOV CL,4 ; attention : il est utilise 3 fois !!!
                   SHR AL,CL ; clear lower nibble
                   OR AL,30h
mov ah,al
                   MOV AL,BH
                   AND AL,0Fh ; keep lower nibble
                   OR AL,30h
cmp ax, [offset heure]
jne again


                   MOV AL,BL ; minutes
                   SHR AL,CL
                   OR AL,30h
mov ah,al    ;
                   MOV AL,BL
                   AND AL,0Fh
                   OR AL,30h
cmp ax, [offset minute]
jne again
mov ax,1000h
mov bx,0400h  ; make red back ground
int 10h

again:
                   POP DI
                   POP ES
                   POP DX
                   POP CX
                   POP BX
                   POP AX

       DB 0EAh ; opcode d'un jump far,direction l'ancien gestionnaire
Int1COfs           DW ?
Int1CSeg           DW ?
heure  dw: ,0                    ; hour
minute dw: ,0

NewInt1C           ENDP

Attente         DB 5 ; 5/18 sec d'attente !!!  wait 1/4 of second
; hey DOS , cut here !!!

Init:
mov si,82h    ; suppose i type "  file.com 1111  "  (hour=11 minute=11)
lodsw
mov [offset heure], ax
lodsw
mov [offset minute], ax

             CLI ; let me work
                   MOV AX,351Ch
                   INT 21h ; get int 1C vector (timer)
                   MOV Int1COfs,BX
                   MOV Int1CSeg,ES

                   MOV AX,251Ch
                   MOV DX,OFFSET NewInt1C
                   INT 21h ;  timer

                   PUSH CS
                   POP ES
                   MOV ES,WORD PTR ES:2Ch ; seg de l'envir contenu dans
PSP
                   MOV AH,49h
                   INT 21h ; free environnement memory !!!

                   STI ;
                   MOV AX,3100h
lea     dx, init
        shr     dx, 4
        inc     dx      ; MOV DX,8 ; Cut  PSP !!!
                   INT 21h ; rester resident
; Copyright   DB 13,10,'Time! 3.4 - Coded By Sam In 1994 - The Flamoots $'
Time               ENDS
                   END Start
 




 9 Posts in Topic:
Make a TSR
"almas" <alm  2008-05-11 19:32:23 
Re: Make a TSR
"Rod Pemberton"  2008-05-11 13:24:02 
Re: Make a TSR
"Benjamin David Lunt  2008-05-11 12:18:11 
Re: Make a TSR
"Rod Pemberton"  2008-05-14 15:39:18 
Re: Make a TSR
"Benjamin David Lunt  2008-05-15 08:23:48 
Re: Make a TSR
Viel Spass <andy77017@  2008-05-17 06:07:01 
Re: Make a TSR
Frank Kotler <fbkotler  2008-05-17 19:47:38 
Re: Make a TSR
"Rod Pemberton"  2008-05-17 17:29:46 
Re: Make a TSR
Evenbit <nbaker2328@[E  2008-05-17 13:11:22 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Fri Jul 25 19:43:26 CDT 2008.