Subversion Repositories Kolibri OS

Rev

Rev 4039 | 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-2016, Tomasz Grysztar.
6467 dunkaist 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
	jmp	general_error
6467 dunkaist 27
invalid_definition:
28
	push	_invalid_definition
29
    general_error:
2287 heavyiron 30
	cmp	[symbols_file],0
31
	je	fatal_error
32
	call	dump_preprocessed_source
33
	jmp	fatal_error
692 heavyiron 34
35
 
31 halyavin 36
	push	_file_not_found
692 heavyiron 37
	jmp	error_with_source
2287 heavyiron 38
error_reading_file:
31 halyavin 39
	push	_error_reading_file
692 heavyiron 40
	jmp	error_with_source
2287 heavyiron 41
invalid_file_format:
31 halyavin 42
	push	_invalid_file_format
692 heavyiron 43
	jmp	error_with_source
2287 heavyiron 44
invalid_macro_arguments:
31 halyavin 45
	push	_invalid_macro_arguments
692 heavyiron 46
	jmp	error_with_source
2287 heavyiron 47
incomplete_macro:
31 halyavin 48
	push	_incomplete_macro
692 heavyiron 49
	jmp	error_with_source
2287 heavyiron 50
unexpected_characters:
31 halyavin 51
	push	_unexpected_characters
692 heavyiron 52
	jmp	error_with_source
2287 heavyiron 53
invalid_argument:
31 halyavin 54
	push	_invalid_argument
692 heavyiron 55
	jmp	error_with_source
2287 heavyiron 56
illegal_instruction:
31 halyavin 57
	push	_illegal_instruction
692 heavyiron 58
	jmp	error_with_source
2287 heavyiron 59
invalid_operand:
31 halyavin 60
	push	_invalid_operand
692 heavyiron 61
	jmp	error_with_source
2287 heavyiron 62
invalid_operand_size:
31 halyavin 63
	push	_invalid_operand_size
692 heavyiron 64
	jmp	error_with_source
2287 heavyiron 65
operand_size_not_specified:
31 halyavin 66
	push	_operand_size_not_specified
692 heavyiron 67
	jmp	error_with_source
2287 heavyiron 68
operand_sizes_do_not_match:
31 halyavin 69
	push	_operand_sizes_do_not_match
692 heavyiron 70
	jmp	error_with_source
2287 heavyiron 71
invalid_address_size:
31 halyavin 72
	push	_invalid_address_size
692 heavyiron 73
	jmp	error_with_source
2287 heavyiron 74
address_sizes_do_not_agree:
31 halyavin 75
	push	_address_sizes_do_not_agree
692 heavyiron 76
	jmp	error_with_source
2287 heavyiron 77
disallowed_combination_of_registers:
2665 dunkaist 78
	push	_disallowed_combination_of_registers
79
	jmp	error_with_source
2287 heavyiron 80
long_immediate_not_encodable:
31 halyavin 81
	push	_long_immediate_not_encodable
692 heavyiron 82
	jmp	error_with_source
2287 heavyiron 83
relative_jump_out_of_range:
31 halyavin 84
	push	_relative_jump_out_of_range
692 heavyiron 85
	jmp	error_with_source
2287 heavyiron 86
invalid_expression:
31 halyavin 87
	push	_invalid_expression
692 heavyiron 88
	jmp	error_with_source
2287 heavyiron 89
invalid_address:
31 halyavin 90
	push	_invalid_address
692 heavyiron 91
	jmp	error_with_source
2287 heavyiron 92
invalid_value:
31 halyavin 93
	push	_invalid_value
692 heavyiron 94
	jmp	error_with_source
2287 heavyiron 95
value_out_of_range:
31 halyavin 96
	push	_value_out_of_range
692 heavyiron 97
	jmp	error_with_source
2287 heavyiron 98
undefined_symbol:
31 halyavin 99
	mov	edi,message
692 heavyiron 100
	mov	esi,_undefined_symbol
101
	call	copy_asciiz
102
	push	message
103
	cmp	[error_info],0
104
	je	error_with_source
2287 heavyiron 105
	mov	esi,[error_info]
106
	mov	esi,[esi+24]
107
	or	esi,esi
108
	jz	error_with_source
109
	mov	byte [edi-1],20h
692 heavyiron 110
	call	write_quoted_symbol_name
111
	jmp	error_with_source
2287 heavyiron 112
    copy_asciiz:
692 heavyiron 113
	lods	byte [esi]
114
	stos	byte [edi]
115
	test	al,al
116
	jnz	copy_asciiz
117
	ret
118
    write_quoted_symbol_name:
119
	mov	al,27h
120
	stosb
121
	movzx	ecx,byte [esi-1]
122
	rep	movs byte [edi],[esi]
123
	mov	ax,27h
124
	stosw
125
	ret
126
symbol_out_of_scope:
127
	mov	edi,message
128
	mov	esi,_symbol_out_of_scope_1
129
	call	copy_asciiz
130
	cmp	[error_info],0
131
	je	finish_symbol_out_of_scope_message
132
	mov	esi,[error_info]
2287 heavyiron 133
	mov	esi,[esi+24]
134
	or	esi,esi
135
	jz	finish_symbol_out_of_scope_message
136
	mov	byte [edi-1],20h
692 heavyiron 137
	call	write_quoted_symbol_name
138
    finish_symbol_out_of_scope_message:
139
	mov	byte [edi-1],20h
140
	mov	esi,_symbol_out_of_scope_2
141
	call	copy_asciiz
142
	push	message
143
	jmp	error_with_source
2287 heavyiron 144
invalid_use_of_symbol:
31 halyavin 145
	push	_invalid_use_of_symbol
692 heavyiron 146
	jmp	error_with_source
2287 heavyiron 147
name_too_long:
31 halyavin 148
	push	_name_too_long
692 heavyiron 149
	jmp	error_with_source
2287 heavyiron 150
invalid_name:
31 halyavin 151
	push	_invalid_name
692 heavyiron 152
	jmp	error_with_source
2287 heavyiron 153
reserved_word_used_as_symbol:
31 halyavin 154
	push	_reserved_word_used_as_symbol
692 heavyiron 155
	jmp	error_with_source
2287 heavyiron 156
symbol_already_defined:
31 halyavin 157
	push	_symbol_already_defined
692 heavyiron 158
	jmp	error_with_source
2287 heavyiron 159
missing_end_quote:
31 halyavin 160
	push	_missing_end_quote
692 heavyiron 161
	jmp	error_with_source
2287 heavyiron 162
missing_end_directive:
31 halyavin 163
	push	_missing_end_directive
692 heavyiron 164
	jmp	error_with_source
2287 heavyiron 165
unexpected_instruction:
31 halyavin 166
	push	_unexpected_instruction
692 heavyiron 167
	jmp	error_with_source
2287 heavyiron 168
extra_characters_on_line:
31 halyavin 169
	push	_extra_characters_on_line
692 heavyiron 170
	jmp	error_with_source
2287 heavyiron 171
section_not_aligned_enough:
31 halyavin 172
	push	_section_not_aligned_enough
692 heavyiron 173
	jmp	error_with_source
2287 heavyiron 174
setting_already_specified:
31 halyavin 175
	push	_setting_already_specified
692 heavyiron 176
	jmp	error_with_source
2287 heavyiron 177
data_already_defined:
31 halyavin 178
	push	_data_already_defined
692 heavyiron 179
	jmp	error_with_source
2287 heavyiron 180
too_many_repeats:
31 halyavin 181
	push	_too_many_repeats
692 heavyiron 182
	jmp	error_with_source
2287 heavyiron 183
assertion_failed:
2664 dunkaist 184
	push	_assertion_failed
185
	jmp	error_with_source
186
invoked_error:
1039 heavyiron 187
	push	_invoked_error
188
    error_with_source:
2287 heavyiron 189
	cmp	[symbols_file],0
190
	je	assembler_error
191
	call	dump_preprocessed_source
192
	call	restore_preprocessed_source
193
	jmp	assembler_error
194