Re: A86: Re: Timings


[Prev][Next][Index][Thread]

Re: A86: Re: Timings




Hmm, I think I'm the one who started that 174 rumor.  174 times a second is
the value that made my clock program work accurately.  But I only tested it
once, so it probably changes with the battery power.  I don't think it's
always 174 times a second.  Maybe if we could find the rom code that check
the battery power...

-----Original Message-----
From: Dark Ryder <DarkRyder@cyberdude.com>
To: assembly-86@lists.ticalc.org <assembly-86@lists.ticalc.org>
Date: Wednesday, November 11, 1998 12:57 AM
Subject: Re: A86: Re: Timings


>
>You also need to remember that your program doesn't get to use all 6 mil
cycles
>unless you disable interrupts - the 'software' interrupt runs approx. 174
times
>per second (or so I've heard).  The easiest way to count off a second,
>therefore, is probably to install a user interrupt that counts down from
174:
>
>seconds:
> .db 0
>
>.org _user_int_ram
>user_int:
> push af
> ld a,(counter)
> dec a
> jr nz,notyet
> ld a,{seconds)
> inc a
> ld (seconds),a
> ld a,174
>notyet:
> ld (counter),a
> pop af
> ret
>counter:
> .db 174
>.end
>
>David Phillips wrote:
>
>> The Z80 in the 86 runs at 6Mhz, or 6,000,000 clock cycles per second.  An
>> instruction is measured in t-states, or time states.  A 4 t-state
>> instruction, such as NOP, would execute 1.5 million times in a second
>> (though I have heard this is not exact, can anyone confirm?).
>
>--
>Dark Ryder
>ICQ#:     8189903
>E-Mail:   DarkRyder@cyberdude.com
>
>Happiness is inversely proportional to how much you want to upgrade your
>computer.
>
>-----BEGIN GEEK CODE BLOCK-----
>Version: 3.12
>GCS/CC/ED/IT/M/MU/P/S/O/AT (!)d-? s++(+):+(++) a?--- C++++$
>UB>L+++ P L>+++ E- W+++$ !N o? K- w(---)$ !O M(+)(-) V?
>PS+(+++) PE-- Y PGP++ t*+(+++) 5++ X+ R*+++ tv b+++ DI++++
>D++ G++>++++ e*>+++++ h!>++ r-(+) y**++
>------END GEEK CODE BLOCK------
>