TSR and Batch file 
Author Message
 TSR and Batch file

Hello,

I'v wriiten a TSR program which reads the joystick poort, the results can be
retrieved through an interrupt, code seems to work fine. Only, the values
differ very much if I do this in a batch file:
    - Unload TSR
    - Load TSR
    - Check value

instead of  ie. 112 it now return 94, that's a big difference, since the
values are used to calculate the temperature.

this is the routine:

LEES_JOYPOORT_UIT PROC

 PUSH AX
 PUSH BX
 PUSH DX

 CLI
 MOV BH,1

 XOR CX,CX                        ; initialize counter
 MOV DX,JOYPOORT        ; init.   register
 MOV AL,7Fh                       ; random value
 OUT DX,AL                         ; write it

COUNT_AGAIN:
 INC CX                                ; inc counter
 IN AL,DX                             ; read port
 TEST AL,BH                        ; check if first bit is set
 JNZ COUNT_AGAIN

 STI

 POP DX
 POP BX
 POP AX

 RET                                        ; result should be in CX
LEES_JOYPOORT_UIT ENDP

Anybody got solution?  Or maybe a doc  on DOS en Batch files  (or TSR
unloading  ;-)  )

Greetz  Bas Nedermeijer



Fri, 28 Dec 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. TSR and batch file

2. Assembly routine to use a crack on any file, as %1 in a batch file

3. How to pass the argv variables from batch file to .tcl file

4. How to pass the argv variables from batch file to .tcl file

5. Image stripping and batch files

6. embedding awk script in DOS batch file

7. batch renaming files

8. Batch conversion of MS-WORD *.DOC files

9. VW Batch File Execute?

10. Batch Building Keys for dBase III files

11. Windows 2000/NT and batch files

12. Batch File to Backup APP and DCT

 

 
Powered by phpBB® Forum Software