Rev 242 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 242 | Rev 340 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ; flat assembler core |
1 | ; flat assembler core |
2 | ; Copyright (c) 1999-2006, Tomasz Grysztar. |
2 | ; Copyright (c) 1999-2007, Tomasz Grysztar. |
3 | ; All rights reserved. |
3 | ; All rights reserved. |
Line 4... | Line 4... | ||
4 | 4 | ||
5 | parser: |
5 | parser: |
6 | mov eax,[memory_end] |
6 | mov eax,[memory_end] |
Line 1295... | Line 1295... | ||
1295 | jb name_first_char_ok |
1295 | jb name_first_char_ok |
1296 | cmp al,39h |
1296 | cmp al,39h |
1297 | jbe invalid_name |
1297 | jbe invalid_name |
1298 | name_first_char_ok: |
1298 | name_first_char_ok: |
1299 | cmp ecx,1 |
1299 | cmp al,'$' |
1300 | jne check_for_reserved_word |
- | |
1301 | cmp al,'$' |
- | |
1302 | je reserved_word |
1300 | jne check_for_reserved_word |
- | 1301 | cmp ecx,1 |
|
- | 1302 | jne invalid_name |
|
- | 1303 | reserved_word: |
|
1303 | check_for_reserved_word: |
1304 | mov eax,0Fh |
- | 1305 | pop edi |
|
- | 1306 | ret |
|
- | 1307 | check_for_reserved_word: |
|
1304 | call get_instruction |
1308 | call get_instruction |
1305 | jnc reserved_word |
1309 | jnc reserved_word |
1306 | call get_data_directive |
1310 | call get_data_directive |
1307 | jnc reserved_word |
1311 | jnc reserved_word |
1308 | call get_symbol |
1312 | call get_symbol |
Line 1339... | Line 1343... | ||
1339 | mov [edx+4],eax |
1343 | mov [edx+4],eax |
1340 | mov [eax+24],ebx |
1344 | mov [eax+24],ebx |
1341 | pop edi |
1345 | pop edi |
1342 | ret |
1346 | ret |
1343 | reserved_word: |
1347 | allocate_label: |
1344 | mov eax,0Fh |
- | |
1345 | pop edi |
- | |
1346 | ret |
- | |
1347 | allocate_label: |
- | |
1348 | mov eax,[labels_list] |
1348 | mov eax,[labels_list] |
1349 | mov ecx,LABEL_STRUCTURE_SIZE shr 2 |
1349 | mov ecx,LABEL_STRUCTURE_SIZE shr 2 |
1350 | initialize_label: |
1350 | initialize_label: |
1351 | sub eax,4 |
1351 | sub eax,4 |
1352 | mov dword [eax],0 |
1352 | mov dword [eax],0 |