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:
parent
2ad0285dc6
commit
a55f7477de
14
src/main/kc/include/6502.h
Normal file
14
src/main/kc/include/6502.h
Normal 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
21
src/main/kc/lib/6502.c
Normal 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 }};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user