EASy68K
http://www.easy68k.com/EASy68Kforum/

Request window(s) update and Mac questions
http://www.easy68k.com/EASy68Kforum/viewtopic.php?f=6&t=131
Page 2 of 2

Author:  lee [ Wed Dec 14, 2005 3:14 am ]
Post subject: 

Code:
*************************************************************************************
*
* a longword of storage needs to be assigned for the system time value

sys_time
   ds.l      1            * system time

* at the start of the code do ..

   BSR      Set_PIT         * set up interrupt and start timer

* then, to read the system time do ..

   MOVE.l   sys_time,d1         * get time

* instead of ..

   MOVEQ      #8,d0            * get system time
   TRAP      #15            * do I/O function


*------------------------------------------------------------------------------------
*
* PI/T timer interrupt routine

vector_timer
   MOVE.b   #1,$010035         * clear ZDS bit in TSR
   MOVE.l   d1,-(sp)         * save register

   MOVE.l   sys_time,d1         * get time
   ADDQ.l   #1,d1            * increment it
   CMP.l      #$83D600,d1         * compare with 24 hours
   BNE.s      not_midnight      * branch if not midnight

   MOVEQ      #0,d1            * else reset time to zero
not_midnight
   MOVE.l   d1,sys_time         * save new system time
   MOVE.l   (sp)+,d1         * restore register
   RTE

*------------------------------------------------------------------------------------
*
* set up PIT, 100Hz interrupts. although the timer is using the level 2 interrupt
* autovector it is really a vectored interrupt using the PI/Ts timer vector register

Set_PIT
   MOVE.l   #0,sys_time         * set time to midnight
   MOVE.l   #vector_timer,$0068   * set interrupt level 2 vector address

   MOVEA.l   #$010020,a0         * set base address of PI/T timer
   MOVE.b   #$1A,3(a0)         * Initialize TIVR with the level 2 interrupt
                     * vector, same as the level 2 autovector
   MOVE.l   #$000004E2,d0      * preload count value in CPR, ..
   MOVEP.l   d0,5(a0)         * .. set 4E6/32/100Hz interrupt
   MOVE.b   #%10100001,1(a0)      * set up TCR, autovector, enable timer

   RTS

*************************************************************************************


That should do it. 8^)=

Lee.

Author:  lee [ Wed Dec 14, 2005 3:29 am ]
Post subject: 

gtippery wrote:
lee wrote:
I bought one of these ..

http://www.themotionstore.com/leeedavison/68k/dart_pcb/index.html

.. quite a while ago and then got two more for free from the same place when I said I was writing a BASIC interpreter for it. 8^)=

I don't think those are available anymore. Would you part with one?

Not really. One is in use, one is to experiment on and the third one is in case I blow up #2. 8^)=

Quote:
'Though my wife trades treadle sewing machines with a guy in England, and you'd better believe that's not cheap... :)


I have one of those, a Singer. I've got some extra output options as well, offset head for zip stitching and a gather head for pleating. 8^)=

Quote:
Amigas, etc. during upgrades. I don't know how hard it would be to use them without the normal surrounding circuitry.


I'm thinking of doing an Amiga version that is system friendly, but not until sometime in the new year at the earliest.

Lee.

Page 2 of 2 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/