flat assembler
Message board for the users of flat assembler.
Index
> DOS > Changing antique software (delay loops) |
Author |
|
alexfru 19 Apr 2014, 10:25
Look at the RDTSC instruction. TSC increments on every CPU clock.
|
|||
19 Apr 2014, 10:25 |
|
revolution 19 Apr 2014, 10:34
If you have a standard mobo with the hardware high-precision timer present then use that. It runs at a fixed frequency independent of the CPU clock speed so things like lower power modes won't affect the timing.
|
|||
19 Apr 2014, 10:34 |
|
prino 19 Apr 2014, 11:21
alexfru wrote: Look at the RDTSC instruction. TSC increments on every CPU clock. _________________ Robert AH Prins robert dot ah dot prins at the big account from Google |
|||
19 Apr 2014, 11:21 |
|
alexfru 19 Apr 2014, 11:55
I lost you there, sorry, can you elaborate? What do PL/I and REXX have to do with changing the presented assembly code? Did you not tell us all the requirements/restrictions the solution must meet?
|
|||
19 Apr 2014, 11:55 |
|
prino 19 Apr 2014, 12:31
alexfru wrote: I lost you there, sorry, can you elaborate? What do PL/I and REXX have to do with changing the presented assembly code? Did you not tell us all the requirements/restrictions the solution must meet? PL/I and REXX are the two languages I use as a programmer on z/OS systems. I know a bit about x86 assembler from looking at the code generated by various PC based compilers (mostly Pascal), but actually writing x86 assembler from scratch is another kettle of fish. I'm sure I will get there in the end using Google, but revolution wrote: If you have a standard mobo with the hardware high-precision timer present then use that. It runs at a fixed frequency independent of the CPU clock speed so things like lower power modes won't affect the timing. In essence I'm looking for a simple routine where I put the required delay (in usec) in (E)CX and it loops for usec. Using Code: RDTSC INT 15/86 (delay 1mS) RDTSC I can determine the CU frequency, now all I need is a reliable way of multiplying ECX with a fraction of that frequency to get the (approximate) delays that used to occur with the values in the initial post on a 20MHz machine. _________________ Robert AH Prins robert dot ah dot prins at the big account from Google |
|||
19 Apr 2014, 12:31 |
|
freecrac 19 Apr 2014, 12:45
Hello.
I never try to use the parrallel port with my own program and so i do not known the timing that we have to wait between to send some commands to the port. But what do you think about to redirect the vector(address 0x20,0x22) of the timer-interrupt(8) to an own ISR for to get a constant delay with it, will it solve those problems? Dirk |
|||
19 Apr 2014, 12:45 |
|
prino 19 Apr 2014, 17:22
freecrac wrote: Hello. If I was that smart or accomplished with x86 assembler, I probably wouldn't have posted here _________________ Robert AH Prins robert dot ah dot prins at the big account from Google |
|||
19 Apr 2014, 17:22 |
|
JohnFound 19 Apr 2014, 18:50
Quote: If I was that smart or accomplished with x86 assembler, I probably wouldn't have posted here Usually, the common visitors of FlatAssembler message board are people with some assembly knowledge. BTW, do you have the sources of your software, or you have to patch the binaries? |
|||
19 Apr 2014, 18:50 |
|
prino 19 Apr 2014, 19:31
JohnFound wrote:
I have quite a bit of knowledge about x86 assembler having converted most of my original Pascal programs to use vast sections of inline assembler. And yes, I do have the sources, but there is no way I can share them with anyone. _________________ Robert AH Prins robert dot ah dot prins at the big account from Google |
|||
19 Apr 2014, 19:31 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.