fox32rom/vsync.asm

44 lines
707 B
NASM
Raw Permalink Normal View History

; vsync interrupt routine
system_vsync_handler:
add rsp, 4
push r0
push r1
push r2
push r3
push r4
push r5
push r6
push r7
call mouse_update
call keyboard_update
2023-03-08 03:36:12 +01:00
cmp.8 [UPDATE_ICON], 0
ifnz call icon_update
2023-12-22 21:52:35 +01:00
; check if monitor should be started
cmp r0, 0
ifnz jmp system_vsync_handler_breakpoint
pop r7
pop r6
pop r5
pop r4
pop r3
pop r2
pop r1
pop r0
reti
2023-12-22 21:52:35 +01:00
system_vsync_handler_breakpoint:
pop r7
pop r6
pop r5
pop r4
pop r3
pop r2
pop r1
pop r0
; breakpoint handler expects that there is an extra 4 bytes on the stack
sub rsp, 4
jmp system_breakpoint_handler