1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-01-26 15:30:28 +00:00

Added 6502.h with SEI() and CLI().

This commit is contained in:
jespergravgaard 2020-10-18 20:33:36 +02:00
parent 2ad0285dc6
commit a55f7477de
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,14 @@
// Simple functions wrapping 6502 instructions
// Set the processor interrupt flag - disabling IRQ's.
// Uses the SEI instruction
inline void SEI();
// Clear the processor interrupt flag - enabling IRQ's.
// Uses the CLI instruction
inline void CLI();
// Add a KickAssembler breakpoint.
// The breakpoint is compiled be KickAssembler to the output files.
// If you use VICE or C64Debugger they can automatically load the breakpoints when starting.
inline void BREAK();

21
src/main/kc/lib/6502.c Normal file
View File

@ -0,0 +1,21 @@
// Simple functions wrapping 6502 instructions
// Set the processor interrupt flag - disabling IRQ's.
// Uses the SEI instruction
inline void SEI() {
asm { sei };
}
// Clear the processor interrupt flag - enabling IRQ's.
// Uses the CLI instruction
inline void CLI() {
asm { cli };
}
// Add a KickAssembler breakpoint.
// The breakpoint is compiled be KickAssembler to the output files.
// If you use VICE or C64Debugger they can automatically load the breakpoints when starting.
inline void BREAK() {
kickasm {{ .break }};
}