EASy68K  
It is currently Sat Jun 06, 2020 7:19 am

All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Wed Dec 14, 2005 3:14 am 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 14, 2005 3:29 am 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group