EASy68K  
It is currently Sun Apr 05, 2020 10:16 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: auto interrupt
PostPosted: Sat Apr 16, 2011 5:57 am 
Offline

Joined: Fri Apr 15, 2011 8:12 pm
Posts: 6
Location: malaysia
i have been looking at the example of scrolling text in easy68k, is it possible to use auto interrupt to implement run time user input mode so that i can change the choice of message at any time, instead of reload the program? and another interrupt to exit and terminate the program? how? i do not know how to start.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 16, 2011 7:10 pm 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
I would do it like this.

The program would get a new string. If the new string is empty it would just exit otherwise it would setup for the scrolling.

The scrolling would scroll one step, check for user input and wait for a time to elapse each go through.

If there was use input branch back and get another string

The program would look something like this ..

Code:
start
      program set up

input
      get a string
      if the string is empty then exit

      set up the scroll
main_loop
      save the time

      redraw the display

      if key waiting goto input

wait
      get the new time
      compare it with the saved time
      if not done goto wait

      goto main_loop

I use this arrangement in some of my programmes like Invader 1000 and Lightsout.

Lee.


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

All times are UTC


Who is online

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