Mercurial > hg-old > index.cgi
comparison src/pass1.c @ 13:05d4115b4860
Started work on new expression evaluator system and major code re-work for next release
author | lost |
---|---|
date | Wed, 22 Oct 2008 04:51:16 +0000 |
parents | |
children | 3c0e5f311c95 |
comparison
equal
deleted
inserted
replaced
5:287a6905a63c | 13:05d4115b4860 |
---|---|
1 /* | |
2 pass1.c | |
3 Copyright © 2008 William Astle | |
4 | |
5 This file is part of LWASM. | |
6 | |
7 LWASM is free software: you can redistribute it and/or modify it under the | |
8 terms of the GNU General Public License as published by the Free Software | |
9 Foundation, either version 3 of the License, or (at your option) any later | |
10 version. | |
11 | |
12 This program is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
15 more details. | |
16 | |
17 You should have received a copy of the GNU General Public License along with | |
18 this program. If not, see <http://www.gnu.org/licenses/>. | |
19 | |
20 | |
21 Handles first pass of assembly | |
22 | |
23 First pass involves the following: | |
24 | |
25 1. read all lines from the main source file, following all "include" | |
26 directives as appropriate | |
27 2. parse each line into a symbol, operation code, and operand as appropriate | |
28 3. each operand is evaluated for syntax and futher for value if there are | |
29 multiple addressing sizes available; any undefined or not fully resolved | |
30 value will default to the largest addressing size available (16 bit) | |
31 4. addresses are assigned to every symbol defined in the assembly | |
32 5. macros are defined and expanded at this pass | |
33 | |
34 | |
35 */ | |
36 | |
37 #ifdef HAVE_CONFIG_H | |
38 #include "config.h" | |
39 #endif | |
40 | |
41 #include <argp.h> | |
42 #include <errno.h> | |
43 #include <stdio.h> | |
44 #include <stdlib.h> | |
45 | |
46 #include "lwasm.h" | |
47 | |
48 void lwasm_pass1(asmstate_t *as) | |
49 { | |
50 } |