Crazy-Blaster/Crazy BIOS/rom/SETUP/IM2_INT.asm
Anatoliy Belyanskiy ace6b0904b First init
2024-07-29 01:59:31 +10:00

48 lines
845 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
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
;