mirror of
https://github.com/rkujawa/rk65c02.git
synced 2026-03-11 03:16:11 +00:00
- interrupts: IRQ vector at $FFFE, vector device at $FFFC, idle_wait + assert_irq - hello_serial: custom bus device at $DE00, guest writes host prints - stepper: rk65c02_step(1) loop with regs and disassembly - jit_bench: min3.rom interpreter vs JIT wall time - breakpoints: debug_breakpoint_add at min3 entry, inspect then continue - README: document new examples, run from examples/ or make run-<name> - Makefile: EXAMPLES and run-* targets for all five Made-with: Cursor
23 lines
360 B
ArmAsm
23 lines
360 B
ArmAsm
; Interrupts example — IRQ vector at $FFFE, minimal handler, host asserts IRQ.
|
|
; 0x0200 = IRQ count (handler increments), 0x0201 = WAI wake count.
|
|
; Host sets vectors at $FFFC (reset -> start) and $FFFE (IRQ -> irq_handler).
|
|
|
|
.org 0xC000
|
|
|
|
start:
|
|
jmp main
|
|
|
|
irq_handler:
|
|
inc 0x0200
|
|
rti
|
|
|
|
main:
|
|
cli
|
|
loop:
|
|
wai
|
|
inc 0x0201
|
|
lda 0x0201
|
|
cmp #3
|
|
bne loop
|
|
stp
|