-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGELOG
140 lines (138 loc) · 7.52 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
+ implement full getopt interface
+ full source restructuring, broken up into modules
+ fix the symbol table stuff, added 'where' to them
+ add generating hex files for output
+ add << and >> operators in expressions
+ fix the ^ and / operators in expressions
+ fix the ! (NOT) operator, added the ~ alias
+ added "EQU" in addition to "="
+ allow 'X' for .byte
+ add '.', '*' and '$' for "current pc", not just @
+ fix .org to auto-fill
+ implement ".end" directive
+ implement ".page [plen[,pwidth]" and ".title [str]" directives
+ implement paged listing file
+ implement .binary (and .blob) for binary blob imports
+ add .cpu directive and underlying multi-target support
+ add generating .s19 et al (Motorola) files for output
+ move the processor-specific errors to the backend.
+ implement multiple source files on command line
+ reading raw source data.
We currently perform binary-mode reads on the input source files and all
included files. Although this works fine on Linux (and, assumedly, on all
such systems), it does not seem to behave the same way on Windows systems.
The problem is that while we do an ftell() to get the size of a file, that
will give us the "raw" size of the file, as it is on disk. We then allocate
a buffer for the file using that size, and then read the file's data into
the buffer using the fread(3) function. This is where things go wrong: EVEN
if we open the file in BINARY ("rb") mode, the fread() function will STILL
perform newline processing, resulting it it returning LESS data than we
requested: it has stripped off the CR characters.. This was confirmed to
be the case with both the MinGW-w64 (gcc) AND Microsoft's own Visual Studio
compilers. Since MinGW uses the actual runtime from Microsoft (relatively
old versions of the msvcrt.dll), this is most likely the source of it.
That said, reading text files in binary mode is not a good practice to
begin with, so most likely this problem will be fixed by changing the input
scanner to process all input files in ASCII (text) mode instead. DONE.
+ implement .if/ifdef/ifndef .. .else .. .endif directives
+ implement .def() inside expression handler for use with .if
+ implement ".fill" directive
+ implement ".align" directive
- implement ".nol option" directive
+ implement ".sym option" directive
+ implement ".radix" directive for default numbering
+ implement ".asciz" directive
+ allow argument to .title to have no quotes
+ implement predefined symbols ("P65C02" etc) for processors
+ allow register A for accu-based (implied) operations
+ re-implement expression comparisons with upstream code
+ re-added the NOT operators, must have deleted those earlier..
+ reworked expression handler to (also) recognize keywords such as
NOT, AND, ASR and such, instead of just the ! and & etc chars.
+ added .func() functions as part of the expression handler
+ move .def( special-case from expr.c to new func.c.
+ implement .sum() function
+ allow labels to start with .
These are sometimes found in assemblers, either the same way we use
@ now, but sometimes also as 'extenders' for the previous global labels.
foo: ldx #$00
.1 lda .msg, x
beq .2
jsr $ffd2
jmp .1
.2 rts
.msg: .asciz "Hello!"
The above looks the same as when using but '@' local labels, but,
not completely. With "dot labels", they (internally) get *added* to
the previous global label, so the above would be in the symbol table
as 'foo.1', 'foo.2' and 'foo.msg', respectively.
+ Implement the .ifn directive.
+ Implement the [!b] and [!w] (forced cast) modifiers.
+ Implement the ?: operator for providing a default in case of undef variable.
+ implement logical AND (&&) and OR (||) operators
+ parentheses (precedence levels within an expression) ?
+ documented code in expr.c to clarify operators
+ The basic infrastructure for multi-CPU support is now in place; we can
start adding more processors and their (sub-)models in the backend files.
- Add C02/RC02/WC02/816, 68xx, 80xx et al support.
+ Added MC6800,MC6805,MC6809,MC6811,CDP1802,SC/MP,SCN2650 targets.
- We now support byte, word and doubleword values. However, are we consistent
in checking these types within the symbols, labels and expressions?
+ Filling, ORG and hex files.
We currently allow for filling spaces and auto-filling the .org directive
for use with straight-binary output files. This is, however, not necessary
if we are using hex (IntelHEX) or srec (Motorola SRecord) output files, as
those formats "know" that data does not have to be linear. For this to be
implemented properly, we will have to re-work the "generating output" code
to do it as it goes (in pass 2), and not only at the end of that pass. This
allows such "jumping" to be handled by those file formats.
+ Added the NOFILL directive (same as -F on commandline.)
+ Added Motorola SRecord support for the 16-bit S19 format.
+ fix the sub-relative include path
If one includes a "../foo/bar/bla.inc" file, and then that file also does
an include of, say, "xxx.inc", then that file is considered "local" to its
parent. So, we should check for that.
- add include search paths using system path and/or -I option?
+ implement all directives as pseudo's (i.e. make the . optional), many old
sources need this.
+ OOps.. END was not really stopping the parser from processing input!
+ implement the '0xxH' notation for hex values.
+ implement the H'xx' notation for hex values.
+ implement the 'stitle' and 'subttl' directives.
+ imported the REPEAT and ENDREP directives from upstream.
/ implement the 'width' directive and, maybe, line folding?
This will require us to keep a 'column' counter, and, most likely, unfolding
TAB characters into spaces.
+ fixed some if..else..endif issues.
+ finalized (I hope..) the SCN2650 backend so it can be committed soon.
+ reworked the way we handle pseudo's and directives.
+ added commandline 'T' option, to show all supported devices.
+ added builtin macros __VASM__ (set to 1) and __VASM_VER__ (set to the
binary version number, so 0x01000E00 for version 1.0.14 for example.)
+ target-device macros (P6502 etc) now start with a _ (underscore), so
be sure to update your files!
+ reworked some small issues in the listing output.
+ added option that page-length of 255 lines *disables* paging.
+ added the DS directive (alias for FILL, really.)
+ Removed old -C option (show list_oc value in listing.)
+ Add -C option to allow for case-insensitivity of symbol names.
- add symbol-table listing in numeric order.
+ cleaned up parser, added listing output for directives.
+ Re-wrote output module to properly implement binary, ihex and srec
formats; update operation of the .ORG directive.
+ Do not display or generate output on errors.
+ Implemented the "{*,$,.} = value" constructs to set origin.
+ Updated -P commandline option; one adds FF to listings, second
adds SO/SI to listing (compressed format for matrix printers.)
+ finalized initial SC/MP backend.
+ implement the X'xx' notation for hex values.
+ implemented the '.LOCAL' directive (mainly for SC/MP.)
+ fixed .PAGE to check for illegal values.
- We currently do not allow labels to have the same name as a pseudo
or machine instruction. This is not OK for an actual label, but maybe
it should be OK for a variable with an EQU/= ?
+ Fixed issue in output.c (not resetting orgdone per pass.)
+ Implemented SET directive (alias to .EQU)
+ Implemented macros using the .MACRO .. .ENDM directives.
+ Implemented .ADDR,.DBYTE directives (for SC/MP.)
+ Implemented functions H(), HI(), L() and LO() for expressions.