neilsf / xc-basic3

A BASIC cross compiler for MOS 6502-based machines

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to set and clear the CPU's IRQ flag

neilsf opened this issue · comments

XC=BASIC version 2.x offered a way to set and clear the CPU's IRQ flag using the commands DISABLEIRQ and ENABLEIRQ. Version 3.1 uses a different approach to interrupts, it can only enable or disable serving specific interrupts but it lacks the ability to turn interrupts on and off completely.

We are discussing this on the Fb group, I was going to comment here that reserving more words for doing something that is practically already possible with the existing functionality (* INTERRUPT OFF/ON commands) wouldn't be the best thing, and you reached the same conclusion :)

If there could be a way to use SYSTEM INTERRUPT OFF/ON to just disable/enable the system IRQ without installing the custom IRQ routine, the compiled program would be shorter (no routine and no runtime-library variables needed).

Closing this as SYSTEM INTERRUPT OFF effectively turns off interrupts.