Interpreted interrupt handlers

GFA, ASM, STOS, ...

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
daeghnao
Captain Atari
Captain Atari
Posts: 479
Joined: Wed Oct 27, 2004 12:41 pm
Location: York, UK
Contact:

Interpreted interrupt handlers

Postby daeghnao » Mon Feb 07, 2011 10:28 pm

Reading some recent discussions got me thinking. We currently have to write interrupt handlers in compiled languages, because our interpreted language frameworks aren't built for the environment inside interrupt-handling. What if one were to design an interpreted language that could be used to implement interpreted interrupt handlers? What would it look like? How would you arrange to have feedback on its behaviour in the IDE? And, most importantly, could it be implemented in our favourite little Atari ST?

User avatar
Nyh
Atari God
Atari God
Posts: 1496
Joined: Tue Oct 12, 2004 2:25 pm
Location: Netherlands

Re: Interpreted interrupt handlers

Postby Nyh » Tue Feb 08, 2011 3:33 pm

daeghnao wrote:Reading some recent discussions got me thinking. We currently have to write interrupt handlers in compiled languages, because our interpreted language frameworks aren't built for the environment inside interrupt-handling. What if one were to design an interpreted language that could be used to implement interpreted interrupt handlers? What would it look like? How would you arrange to have feedback on its behaviour in the IDE? And, most importantly, could it be implemented in our favourite little Atari ST?

Writing a interpreted interrupt handler would be such a big problem. A routine should be declared as an interrupt routine. During the interrupt the interpreter would be called and start to process the code. At the end the interpreter cleans the mess up and executes the RTE.

Just as in a languages the programmer has to take care about not modifying data that could be modified during an interrupt.

The big question is why? Why would one want to have an interpreted interrupt routine?
There is no big need for interrupt routines. The number of compilers supporting interrupt routines on the ST is close to zero. I don't know any, do you? For years programmers have been creating the most wonderful programs without interrupt routine support.

Interrupt routines are only very small routines doing very specific tasks. Usually those tasks are very time critical. Those few who really need an interrupt routine will write a few lines assembly code to suit their needs.

Now this forum is blessed with an idiot* who doesn't understand much of programming and hasn't the faintest clue about how an Atari ST works on hardware level. His state of mind is that there is somewhere hidden a Silver Bullet that will magically solve all his problems. He has been searching for this bullet for about the last decade (I have lost count). Unfortunately for us and him the Silver Bullet does not exist.

Writing a interpreter that can handle interrupt is an interesting project just because it is fun. It will not have any practical value other than hack value. It will not solve the problems for those who cannot write an interrupt routine in assembly.

Hans Wessels
*if you are insulted by this remark then I am right. If not the remark was obviously not meant for you.


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 4 guests