[A83] Re: PolySmlt
[Prev][Next][Index][Thread]
[A83] Re: PolySmlt
The code TI provides is:
B_CALL GetBaseVer ; OS version in A, B
CP 2 ; check major version
JR NC, Above112 ; if 2.x, then > 1.12
CP 1 ; if 0.x, then < 1.12
JR NZ, Below112 ; major version = 1
LD A, B ;
CP 13 ; check minor version
JR C, Below112 ; C if minor version < 13
Above112:
LD A, 0FFh ; set fastest speed possible
B_CALL SetExSpeed
Below112:
You could probably optimize that a bit, but if you really need to be as
efficient as possible (but suffer the "risk" of dealing directly with the
hardware), you can do this:
in a,(2) ;Port two bit 7 is HW type (1=SE)
rla
jr nc,NotSE
ld a,1 ;Port 20h 1=15MHZ
out (20h),a
NotSE:
Hope this helps,
-Dan Englender
----- Original Message -----
From: "Peter-Martijn Kuipers" <hyper@hbyte.net>
To: <assembly-83@lists.ticalc.org>
Sent: Monday, January 14, 2002 6:47 PM
Subject: [A83] Re: PolySmlt
>
> Quick question, since I'm lazy right now:
>
> Does anyone have a few lines of code lying around that
> check if we're running OS 1.13 or above, and if so, set speed to
> highest possible?
>
> --Peter-Martijn
>
>
> > Actually, no, the SE's processor will run at either 6 or 15 MHZ. For
> > compatibility reasons, applications and assembly programs run at 6 MHZ
by
> > default. There is a system flag that, if set, will cause all apps and
> > assembly programs to run at 15 MHZ by default instead.
> >
> > Applications that wish to run at 15 MHZ may either set a header entry
> > indicating this (as detailed by the 83P SE Dev Guide addendum, or
probably
> > in the new version of the SDK guide as well), or use the entry point
> > SetExSpeed (available on 1.13 and higher) that sets the CPU speed. If
you
> > want to do it directly, the CPU speed port is port 20h (0 = 6 MHZ, 1 =
15
> > MHZ), but it's probably a "better" idea to use the approved system
methods.
> >
> > -Dan Englender
> >
> >
> > >
> > > 83+ has a 6 Mhz processor
> > > 83SE has a 15 Mhz processor
> > >
> > > I don't think there is a way to run the SE on 6 MHz it's not like send
6
> > to
> > > port 5 and then its 6 MHz. It's 15 MHz, so there is another reason
that
> > it's
> > > slow. A possibility is that PolySmlt uses the 200 Hz interrupt timer
for
> > the
> > > function to make it simultainous, and that PolySmlt is made for 6 MHz
> > > processors, and since the OS on the SE isn't changed, it won't run
faster
> > on
> > > a 15 MHz processor.
> > >
> > > Bye
> > > Cheiz
> > >
> > >
> > > >PolySmlt must not take advantage of the SE's speed then. In that
case, it
> > > >runs at 6 MHz on both calcs.
> > > >
> > > >Michael Vincent
> > > >Detached Solutions - www.detacheds.com
> > > >Radical Software - www.radicalsoft.org
> > >
> > >
> > > _________________________________________________________________
> > > Meld je aan bij de grootste e-mailservice wereldwijd met MSN Hotmail:
> > > http://www.hotmail.com/nl
> > >
> > >
> > >
> >
> >
> >
>
>
>
Follow-Ups:
References: