Subversion Repositories Kolibri OS

Rev

Rev 1039 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
31 halyavin 1
 
2
; Copyright (c) 1999-2011, Tomasz Grysztar.
2287 heavyiron 3
; All rights reserved.
31 halyavin 4
5
 
6
	push	_out_of_memory
692 heavyiron 7
	jmp	fatal_error
8
stack_overflow:
31 halyavin 9
	push	_stack_overflow
692 heavyiron 10
	jmp	fatal_error
11
main_file_not_found:
31 halyavin 12
	push	_main_file_not_found
692 heavyiron 13
	jmp	fatal_error
14
write_failed:
2287 heavyiron 15
	push	_write_failed
16
	jmp	fatal_error
17
18
 
31 halyavin 19
	push	_unexpected_end_of_file
692 heavyiron 20
	jmp	general_error
2287 heavyiron 21
code_cannot_be_generated:
31 halyavin 22
	push	_code_cannot_be_generated
692 heavyiron 23
	jmp	general_error
2287 heavyiron 24
format_limitations_exceeded:
31 halyavin 25
	push	_format_limitations_exceeded
692 heavyiron 26
    general_error:
2287 heavyiron 27
	cmp	[symbols_file],0
28
	je	fatal_error
29
	call	dump_preprocessed_source
30
	jmp	fatal_error
692 heavyiron 31
32
 
31 halyavin 33
	push	_file_not_found
692 heavyiron 34
	jmp	error_with_source
2287 heavyiron 35
error_reading_file:
31 halyavin 36
	push	_error_reading_file
692 heavyiron 37
	jmp	error_with_source
2287 heavyiron 38
invalid_file_format:
31 halyavin 39
	push	_invalid_file_format
692 heavyiron 40
	jmp	error_with_source
2287 heavyiron 41
invalid_macro_arguments:
31 halyavin 42
	push	_invalid_macro_arguments
692 heavyiron 43
	jmp	error_with_source
2287 heavyiron 44
incomplete_macro:
31 halyavin 45
	push	_incomplete_macro
692 heavyiron 46
	jmp	error_with_source
2287 heavyiron 47
unexpected_characters:
31 halyavin 48
	push	_unexpected_characters
692 heavyiron 49
	jmp	error_with_source
2287 heavyiron 50
invalid_argument:
31 halyavin 51
	push	_invalid_argument
692 heavyiron 52
	jmp	error_with_source
2287 heavyiron 53
illegal_instruction:
31 halyavin 54
	push	_illegal_instruction
692 heavyiron 55
	jmp	error_with_source
2287 heavyiron 56
invalid_operand:
31 halyavin 57
	push	_invalid_operand
692 heavyiron 58
	jmp	error_with_source
2287 heavyiron 59
invalid_operand_size:
31 halyavin 60
	push	_invalid_operand_size
692 heavyiron 61
	jmp	error_with_source
2287 heavyiron 62
operand_size_not_specified:
31 halyavin 63
	push	_operand_size_not_specified
692 heavyiron 64
	jmp	error_with_source
2287 heavyiron 65
operand_sizes_do_not_match:
31 halyavin 66
	push	_operand_sizes_do_not_match
692 heavyiron 67
	jmp	error_with_source
2287 heavyiron 68
invalid_address_size:
31 halyavin 69
	push	_invalid_address_size
692 heavyiron 70
	jmp	error_with_source
2287 heavyiron 71
address_sizes_do_not_agree:
31 halyavin 72
	push	_address_sizes_do_not_agree
692 heavyiron 73
	jmp	error_with_source
2287 heavyiron 74
prefix_conflict:
31 halyavin 75
	push	_prefix_conflict
692 heavyiron 76
	jmp	error_with_source
2287 heavyiron 77
long_immediate_not_encodable:
31 halyavin 78
	push	_long_immediate_not_encodable
692 heavyiron 79
	jmp	error_with_source
2287 heavyiron 80
relative_jump_out_of_range:
31 halyavin 81
	push	_relative_jump_out_of_range
692 heavyiron 82
	jmp	error_with_source
2287 heavyiron 83
invalid_expression:
31 halyavin 84
	push	_invalid_expression
692 heavyiron 85
	jmp	error_with_source
2287 heavyiron 86
invalid_address:
31 halyavin 87
	push	_invalid_address
692 heavyiron 88
	jmp	error_with_source
2287 heavyiron 89
invalid_value:
31 halyavin 90
	push	_invalid_value
692 heavyiron 91
	jmp	error_with_source
2287 heavyiron 92
value_out_of_range:
31 halyavin 93
	push	_value_out_of_range
692 heavyiron 94
	jmp	error_with_source
2287 heavyiron 95
undefined_symbol:
31 halyavin 96
	mov	edi,message
692 heavyiron 97
	mov	esi,_undefined_symbol
98
	call	copy_asciiz
99
	push	message
100
	cmp	[error_info],0
101
	je	error_with_source
2287 heavyiron 102
	mov	esi,[error_info]
103
	mov	esi,[esi+24]
104
	or	esi,esi
105
	jz	error_with_source
106
	mov	byte [edi-1],20h
692 heavyiron 107
	call	write_quoted_symbol_name
108
	jmp	error_with_source
2287 heavyiron 109
    copy_asciiz:
692 heavyiron 110
	lods	byte [esi]
111
	stos	byte [edi]
112
	test	al,al
113
	jnz	copy_asciiz
114
	ret
115
    write_quoted_symbol_name:
116
	mov	al,27h
117
	stosb
118
	movzx	ecx,byte [esi-1]
119
	rep	movs byte [edi],[esi]
120
	mov	ax,27h
121
	stosw
122
	ret
123
symbol_out_of_scope:
124
	mov	edi,message
125
	mov	esi,_symbol_out_of_scope_1
126
	call	copy_asciiz
127
	cmp	[error_info],0
128
	je	finish_symbol_out_of_scope_message
129
	mov	esi,[error_info]
2287 heavyiron 130
	mov	esi,[esi+24]
131
	or	esi,esi
132
	jz	finish_symbol_out_of_scope_message
133
	mov	byte [edi-1],20h
692 heavyiron 134
	call	write_quoted_symbol_name
135
    finish_symbol_out_of_scope_message:
136
	mov	byte [edi-1],20h
137
	mov	esi,_symbol_out_of_scope_2
138
	call	copy_asciiz
139
	push	message
140
	jmp	error_with_source
2287 heavyiron 141
invalid_use_of_symbol:
31 halyavin 142
	push	_invalid_use_of_symbol
692 heavyiron 143
	jmp	error_with_source
2287 heavyiron 144
name_too_long:
31 halyavin 145
	push	_name_too_long
692 heavyiron 146
	jmp	error_with_source
2287 heavyiron 147
invalid_name:
31 halyavin 148
	push	_invalid_name
692 heavyiron 149
	jmp	error_with_source
2287 heavyiron 150
reserved_word_used_as_symbol:
31 halyavin 151
	push	_reserved_word_used_as_symbol
692 heavyiron 152
	jmp	error_with_source
2287 heavyiron 153
symbol_already_defined:
31 halyavin 154
	push	_symbol_already_defined
692 heavyiron 155
	jmp	error_with_source
2287 heavyiron 156
missing_end_quote:
31 halyavin 157
	push	_missing_end_quote
692 heavyiron 158
	jmp	error_with_source
2287 heavyiron 159
missing_end_directive:
31 halyavin 160
	push	_missing_end_directive
692 heavyiron 161
	jmp	error_with_source
2287 heavyiron 162
unexpected_instruction:
31 halyavin 163
	push	_unexpected_instruction
692 heavyiron 164
	jmp	error_with_source
2287 heavyiron 165
extra_characters_on_line:
31 halyavin 166
	push	_extra_characters_on_line
692 heavyiron 167
	jmp	error_with_source
2287 heavyiron 168
section_not_aligned_enough:
31 halyavin 169
	push	_section_not_aligned_enough
692 heavyiron 170
	jmp	error_with_source
2287 heavyiron 171
setting_already_specified:
31 halyavin 172
	push	_setting_already_specified
692 heavyiron 173
	jmp	error_with_source
2287 heavyiron 174
data_already_defined:
31 halyavin 175
	push	_data_already_defined
692 heavyiron 176
	jmp	error_with_source
2287 heavyiron 177
too_many_repeats:
31 halyavin 178
	push	_too_many_repeats
692 heavyiron 179
	jmp	error_with_source
2287 heavyiron 180
invoked_error:
1039 heavyiron 181
	push	_invoked_error
182
    error_with_source:
2287 heavyiron 183
	cmp	[symbols_file],0
184
	je	assembler_error
185
	call	dump_preprocessed_source
186
	call	restore_preprocessed_source
187
	jmp	assembler_error
188