1
0
mirror of https://github.com/ksherlock/x65.git synced 2024-12-28 04:31:46 +00:00
Commit Graph

209 Commits

Author SHA1 Message Date
Carl-Henrik Skårstedt
97dc0ad5e6 Fix reloc data
- changed rigid type of reloc target from byte/word/hi byte/lo byte to
number of bytes and bits to shift (Apple II GS OMF format)
2015-11-05 21:23:38 -08:00
Carl-Henrik Skårstedt
89ed6d25cc Adding a disassembler 2015-11-04 21:15:22 -08:00
Carl-Henrik Skårstedt
9f935a8e91 Bug fixes
- REPT caused a crash if expression was resolved after assembly
completed
- Fix expression % as a label at end of scope if another scope ended
before the current scope
- Removed # from conditionals since that doesn't fit with any assembler
style
- Added .l (long) and .t (triple) to label pool sizes, also supporting
.d as double which is the same size but different meaning than .w (word)
2015-11-03 20:57:06 -08:00
Carl-Henrik Skårstedt
95e22ae7a2 Fix for forward reference in REPT block and assigning section relative address to symbol
- Remember the REPT index for values that can't be evaluated yet
- Remember section reference when evaluating symbols dependent on
address labels.
2015-11-02 23:14:01 -08:00
Carl-Henrik Skårstedt
81e71acea5 Linker fix
- Fix for appended section to last instead of target section
2015-11-01 23:02:03 -08:00
Carl-Henrik Skårstedt
4938652d96 Update readme.md 2015-11-01 15:51:50 -08:00
Carl-Henrik Skårstedt
c9d22a02ed Reference to linking page 2015-11-01 15:50:58 -08:00
Carl-Henrik Skårstedt
a4d6c3efbf Cycle timing listing for 65816
- XREF blocked linking with same name label
- REPT also works as a symbols for repeat counter to reduce need for
extra counting labels.
- "<<" got interpreted as a right shift
- Added LONG keyword to declare 32 bit values
2015-11-01 15:08:38 -08:00
Carl-Henrik Skårstedt
c50ae5027d Cycle counter hierarchy
- Each scope in a file shows the cycle count added up for instructions
within it.
- Added Merlin version of XREF which is EXT (was previously ignored)
- Added Merlin cycle counter on/off directive (CYC)
2015-10-31 14:34:45 -07:00
Carl-Henrik Skårstedt
07b2b04763 Fix for enums
- enum assignment (=) was ignored
2015-10-31 00:35:25 -07:00
Carl-Henrik Skårstedt
b1e9797160 XREF support, starting cycle counting
- XREF directive now required for referencing XDEF symbols from other
files
- Created cycle timing table for 6502, displaying for each line in .lst
files
2015-10-30 22:30:16 -07:00
Carl-Henrik Skårstedt
8fdeb287e1 Bug fixes
- Fixed section alignment
- Fixed nested scopes
- Fixed a borked parameter sent to label pools
- Added -all as a command line option for dump_x65
2015-10-28 21:08:23 -07:00
Carl-Henrik Skårstedt
662982404b Link issues
- Map symbols might not have been updated with their labels
- Relocation index may be off
- Map symbols stored in 16 bits causing truncation of value in symbol
output
- Added a tool to dump the values in object files
2015-10-27 20:57:14 -07:00
Carl-Henrik Skårstedt
74a34585d4 Rastan IIgs builds with x65
- Fixed issue with CPU indexing
- Added missing 65816 jmp (addr,x) and jmp $123456,x and jsl
- Added a method for Merlin style linking to work in x65
- Made low byte / high byte (<, >) very low precedence
- Some more Merlin directives
- Split out some directive code from the huge ApplyDirective function
- Add source lines of keywords and labels to the output listing file
- x65 object file fixes
2015-10-26 20:50:26 -07:00
Carl-Henrik Skårstedt
72b9842354 Leftover fixes
- added -acc=16 and -xy=16 command line options for 65816 immediate mode
instruction size
- added conditional expressions (evaluates to 0 for false and 1 for
true)
- fixed macro substitution to be whole word only
2015-10-25 23:48:35 -07:00
Carl-Henrik Skårstedt
c2c6aaef0f Import directive
- IMPORT directive added, works like Kick Assembler
- -endm option also applies to REPT
- REPEAT directive is an alias of REPT
- Merlin macro fix uses ]1, ]2, .. as macro params
- Erroneously flushed local labels when starting to assemble a macro
2015-10-25 14:29:41 -07:00
Carl-Henrik Skårstedt
98886793df 6502 illegal opcodes (-cpu=6502ill)
- Added illegal instructions since it only needed updating of tables.
2015-10-24 15:02:16 -07:00
Carl-Henrik Skårstedt
c11b09c123 Update README.md 2015-10-24 14:08:16 -07:00
Carl-Henrik Skårstedt
d3c6c31fae More updating of language relating to linking 2015-10-24 13:55:42 -07:00
Carl-Henrik Skårstedt
2b148b5e72 Updating language relating to linking 2015-10-24 13:48:03 -07:00
Carl-Henrik Skårstedt
d279d35f7e Alias opcodes
- Added aliases to opcodes
- Fixed XCode warnings
- Revisited outdated comments
- Fixed CPU / PROCESSOR keyword giving an error even if the argument was
valid
- Rearranged switch statements to be in a more logical order
2015-10-24 13:41:11 -07:00
Carl-Henrik Skårstedt
2c07d9285f Revision increment 2015-10-23 23:32:43 -07:00
Carl-Henrik Skårstedt
46cb57f231 65816 documentation
- Starting to scratch the surface of 65816 documentation
2015-10-23 23:31:35 -07:00
Carl-Henrik Skårstedt
fa0c6b0187 65816 Added
- Addressing modes
- Opcodes
- Directives
- Cleanup
2015-10-23 22:44:56 -07:00
Carl-Henrik Skårstedt
cc99faed16 65C02 CPU added
- Added SAV as a Merlin directive
- cpu command line option to switch CPU target
2015-10-21 22:34:01 -07:00
Carl-Henrik Skårstedt
fbade4eb06 Fix negative numbers, Merlin MAC and LUP, endmacro switch
- Could not declare negative numbers
- Support for LUP (Merlin rept) and MAC (Merlin macro)
- Support for endmacro instead of scoped macros
2015-10-20 22:28:53 -07:00
Carl-Henrik Skårstedt
521e3b98a8 Merlin syntax support, symbol file fix, list file fix
- don't allow ! in merlin labels
- don't skip initial : in merlin labels
- symbol files resolves labels from incobj relative sections
- assembler listing skipping disassembly for lines that was not built
from source code
2015-10-19 22:44:02 -07:00
Carl-Henrik Skårstedt
d6bc17414a Added updates to readme.md 2015-10-18 19:51:38 -07:00
Carl-Henrik Skårstedt
38e0abcc6e Export now writes all sections instead of just the last fixed one
- Combines all fixed sections into a single binary
- Export directive allows for writing multiple binaries from one source
file
2015-10-18 19:48:03 -07:00
Carl-Henrik Skårstedt
4ce149af26 Adding a note about linking 2015-10-18 12:50:51 -07:00
Carl-Henrik Skårstedt
b7d0b195af List file option added
- using -lst the disassembled and assembled source is written out side
by side
- option -opcodes saves out a source file with all opcodes & addressing
modes for testing
- cleaned up opcode table to be simpler and more robust so I can
consider supporting other cpus
- bug fixes
2015-10-18 12:42:10 -07:00
Carl-Henrik Skårstedt
c8ceffdbf6 Compile issues fixed for xcode
- Additional stability checks
2015-10-17 12:13:23 -07:00
Carl-Henrik Skårstedt
071d64de80 Object file now protects local labels
- XDEF declares labels as global
- Each incobj file keeps its own protected set of labels for link-time
evalulations
2015-10-16 20:27:56 -07:00
Carl-Henrik Skårstedt
12cfe830f9 Fixes
- Sections got overwritten (reference vs pointer mistake)
- Check that relocs and late evals apply the adjustments within the
existing binary
2015-10-15 20:58:17 -07:00
Carl-Henrik Skårstedt
ca604ad81c Export and import of object files
First pass implementation of object files - all imported labels are
currently global.
2015-10-13 19:38:13 -07:00
Carl-Henrik Skårstedt
6962a98419 Renaming asm6502 to x65 2015-10-13 19:25:24 -07:00
Carl-Henrik Skårstedt
3534ee4faa Error Fix IV
- Extraneous conditional expression borked late evaluation of branch
address
2015-10-12 20:51:12 -07:00
Carl-Henrik Skårstedt
d17fbfb710 Error Fix III, Switching default section to be relative section
- Merlin support broke colon-overrides-directive-as-label trick, fixed.
- Relative section fixes
- If no section is specified the default section will be relative. If a
binary output is requested the default section is applied to address
$1000
2015-10-12 00:05:06 -07:00
Carl-Henrik Skårstedt
83ffae8812 Some more notes on Merlin syntax support 2015-10-11 15:10:58 -07:00
Carl-Henrik Skårstedt
a946243bab Error fix II, debug symbol table rewrite
- Merlin syntax also broke non-merlin local labels starting with a
period
- Symbols in relative sections wouldn't work in the text based map
system so the symbols are now a map instead.
2015-10-11 14:55:55 -07:00
Carl-Henrik Skårstedt
db6f6887e5 Error fixes
-Declaring an enum is apparently not proper c++, Visual Studio did not
complain.. Moved the whole EvalOperator enum up to the top of the file
-If a line can't be processed, error out instead of infinite looping
(freeze)
-Kick Assembler syntax for using a macro was broken with recent changes
to support Merlin syntax, colon prefix for using macros is now only
allowed if not specifying -merlin.
2015-10-11 12:04:49 -07:00
Carl-Henrik Skårstedt
feb79990ee Export section selection, bug fixes
Picking the most viable section for export for now
cleaning up some Merlin syntax issues
showable version of section and link directives
2015-10-10 20:08:30 -07:00
Carl-Henrik Skårstedt
8f5785702d Bug fixes for link directive
Making sure that relative addresses work in bytes/words/dc.b/dc.w etc.
A few fixes to absolute addresses
Figured out how to safely reloc separate hi byte / lo byte references
Fixed a few instances of reversed byte order
2015-10-10 17:53:15 -07:00
Carl-Henrik Skårstedt
1a192d308a First pass sections
Supports same file relative sections (no object files yet)
Supports relative addresses
Supports absolute addresses
Thinking about high byte / low byte references to absolute addresses
2015-10-10 15:25:08 -07:00
Carl-Henrik Skårstedt
dfc0c46160 Apple II Binary and Merlin Assembler compatibility improved
Not fully tested yet
2015-10-07 22:27:03 -07:00
Carl-Henrik Skårstedt
ad62e04afb Adding ENUM and assembler directives from LISA and MERLIN assemblers. 2015-10-06 22:42:22 -07:00
Carl-Henrik Skårstedt
a4598a5c43 INCDIR, -D, -i, sublime
More stuff for 6502 fun time
2015-10-05 22:45:42 -07:00
Carl-Henrik Skårstedt
00b149a23d Added REPT directive 2015-10-04 16:06:45 -07:00
Carl-Henrik Skårstedt
9af85f3a8a Adding dc.b/dc.w directive documentation 2015-10-04 15:00:54 -07:00
Carl-Henrik Skårstedt
f9ac2253a9 Added 'STRUCT' directive, fixed bugs, rearranged functions 2015-10-04 14:05:38 -07:00