Sprinter-BIOS/bios/rom/SETUP/IM2_INT.asm
2026-05-19 19:46:03 +10:00

54 lines
962 B
NASM
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;
; before_intPointer EQU #C000
; INT_POINTER EQU #C002
; INT_HANDLER EQU #C004
before_intPointer EQU $
BLOCK #FF - low $,0 ; ¢ëà ¢­¨¢ ­¨¥ ­  #xxFF
INT_POINTER: WORD 0
ASSERT +low INT_POINTER = #FF, 'ERROR! Not valid interrupt pointer!'
IFDEF PREBUILD
ASSERT INT_POINTER-before_intPointer < 16, 'Warning! To much space before INT_POINTER.'
ELSE
IF INT_POINTER-before_intPointer > 16
DISPLAY 'Warning! To much space before INT_POINTER: ',/D,INT_POINTER-before_intPointer
ENDIF
ENDIF
INT_HANDLER: PUSH AF
EX AF,AF'
PUSH AF
PUSH BC
PUSH DE
PUSH HL
EXX
PUSH BC
PUSH DE
PUSH HL
PUSH IX
PUSH IY
CALL KEYSCAN
;
IF STARTUP_SND
SCF
.sndSwitch: CCF ; SCF/CCF
CALL C,STARTUP_SOUND
ENDIF
;
POP IY
POP IX
POP HL
POP DE
POP BC
EXX
POP HL
POP DE
POP BC
POP AF
EX AF,AF'
POP AF
EI
RETI
;