EASy68K  
It is currently Fri Jun 05, 2020 6:13 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: auto-interval
PostPosted: Sat Dec 04, 2010 4:14 am 
Offline

Joined: Fri Dec 03, 2010 4:22 pm
Posts: 3
Hi everyone,
I'm a newbie in assembly, can anyone show me an example in code of how to set the auto-interval (milisecond) by myself (code). I've read the documentation in easy68k about #32 move.l #1000,d3. But it does not work for me.
Thanks and regards


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 04, 2010 8:44 pm 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
You could post your code so we can see but at a guess I'd say you haven't enabled exception processing which you need to do for the auto interval to have any effect.

Enable exceptions with task 32 and d1.b = $05 or check enable exceptions in the options menu.

Lee.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 05, 2010 12:28 am 
Offline

Joined: Fri Dec 03, 2010 4:22 pm
Posts: 3
Code:
digitOff
   dc.b   $00
   dc.b   $00
   dc.b   $00
   dc.b   $00
   dc.b   $00
   dc.b   $00
   dc.b   $00
   dc.b   $00
   ORG   $1050
START:            ; first instruction of program
   move.b   #32,d0
   move.b   #00,d1
   move.l   #500,d3
   trap   #15


   move.l   #irq1,$64
comp   
   cmp.b   #$01,$E00012
   beq      end
off
   lea      digitOff,a0
   bsr      segment
end   bra      comp
irq1
   cmp.b   #$01,$E00012
   bne      out
   eori.b   #$73,$E00000
   eori.b   #$38,$E00002
   eori.b   #$77,$E00004
   eori.b   #$66,$E00006
out   rte
segment   
   move.b   (A0)+,$E00000   
   move.b   (A0)+,$E00002   
   move.b   (A0)+,$E00004   
   move.b   (A0)+,$E00006   
   move.b   (A0)+,$E00008   
   move.b   (A0)+,$E0000A   
   move.b   (A0)+,$E0000C   
   move.b   (A0)+,$E0000E
   rts
   MOVE.B   #9,D0
   TRAP   #15      ; halt simulator

this is my code. I've already check the enable exception. The point is I need the word 'play' to flash twice a sec when I check the 1st interrupt and press switch 0. Hope you can give me a clue. Thank you


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 05, 2010 8:59 am 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
No, please. Don't comment your code. No need for clues as to what each part is supposed to do or what each conditional branch is testing for. I'm psychic and can guess what you thought you were doing.

Lee.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 05, 2010 2:43 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1122
Lee, you would make a great college professor because that is exactly what I tell my students on a regular basis :D

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 06, 2010 12:50 am 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
Quote:
I've read the documentation in easy68k about #32 move.l #1000,d3. But it does not work for me.

That's because you missed the part about setting d2.b

Lee.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 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