<commit_before>
extern trap_fatal
extern trap_warn

extern hang

%macro ERR 1
	global exception_%1
exception_%1:
	cli
	pusha

	cld
	lea ebp, [esp - 56]

	push dword %1
	call trap_fatal
%endmacro

%macro NOERR 1
	global exception_%1
exception_%1:
;	cli
	pusha

	mov ax, ds
	push eax

	mov ax, 0x10
	mov ds, ax
	mov es, ax
	mov fs, ax
	mov gs, ax


	push dword %1
	call trap_warn

	pop ebx
	mov ds, bx
	mov es, bx
	mov fs, bx
	mov gs, bx

	popa
	add esp, 0x8
;	sti
	iret
	ret
%endmacro

NOERR 0  ; divide by zero
NOERR 1  ; debug
NOERR 2  ; nmi
NOERR 3  ; breakpoint
NOERR 4  ; overflow
NOERR 5  ; bound range exceeded<commit_msg>src/cpu/exceptions.asm: disabled interrupts in non-fatal exceptions disabled interrupts in non-fatal exceptions<commit_after>
extern trap_fatal
extern trap_warn

%macro ERR 1
	global exception_%1
exception_%1:
	cli
	pusha

	cld
	lea ebp, [esp - 56]

	push dword %1
	call trap_fatal
%endmacro

%macro NOERR 1
	global exception_%1
exception_%1:
	cli
	pusha

	mov ax, ds
	push eax

	mov ax, 0x10
	mov ds, ax
	mov es, ax
	mov fs, ax
	mov gs, ax


	push dword %1
	call trap_warn

	pop ebx
	mov ds, bx
	mov es, bx
	mov fs, bx
	mov gs, bx

	popa
	add esp, 0x8
	sti
	leave
	iret
%endmacro

NOERR 0  ; divide by zero
NOERR 1  ; debug
NOERR 2  ; nmi
NOERR 3  ; breakpoint
NOERR 4  ; overflow
NOERR 5  ; bound range exceeded
{'fraction_non_alphanumeric': 0.05965697240865026, 'fraction_numerical': 0.03131991051454139, 'mean_word_length': 3.1039755351681957, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1840612', 'n_tokens_mistral': 636, 'n_tokens_neox': 568, 'n_words': 213}