1
0
mirror of https://github.com/ksherlock/x65.git synced 2024-12-30 17:30:58 +00:00
Commit Graph

111 Commits

Author SHA1 Message Date
Carl-Henrik Skårstedt
07b1a52bb4 Updating binaries 2016-03-11 17:55:32 -08:00
Carl-Henrik Skårstedt
4f6db98637 Removing the disassembler and putting it into its own repo
- The disassembler was taking on some girth and weighing the assembler
code down.
2016-03-11 17:43:16 -08:00
Carl-Henrik Skårstedt
d9d386a260 Adding error handling for flushing local labels
- Errors were ignored in a couple of places
2016-03-11 17:08:44 -08:00
Carl-Henrik Skårstedt
273bdcc92d Fix for local labels within rept/LUP and force org with command line argument
- Flushing local labels after each rept/LUP source segment so local
labels within won't cross over the segment boundary
- The command line argument -org will force fixed address rather than
suggest a location, which in turn makes the -lst command line more
readable.
2016-03-11 16:58:24 -08:00
Carl-Henrik Skårstedt
ee53c41776 Fix for Merlin macros with arguments
- Macro argument was assembled and first argument was defined as a label
2016-03-11 14:12:32 -08:00
Carl-Henrik Skårstedt
341cc8f2ad Labels can begin with numbers
- It is a bad idea to define labels starting with numbers but apparently
Merlin allows it.
2016-03-01 18:34:20 -08:00
Carl-Henrik Skårstedt
462eaeccf6 Fixed bad fix (INCSYM was not properly fixed) 2016-02-15 21:11:10 -08:00
Carl-Henrik Skårstedt
0605a1d6d2 Fix for INCSYM directive when loading files with local labels 2016-02-14 12:36:01 -08:00
Carl-Henrik Skårstedt
7d59943d35 Fixed broken INCBIN and IMPORT BINARY directives 2016-02-13 16:41:33 -08:00
Carl-Henrik Skårstedt
60780a514a Pool labels of even 16ths would be re-reserved due to a left-right bug
- Shifted left when I should have shifted right.
2016-01-28 21:06:41 -08:00
Carl-Henrik Skårstedt
5b9e5f6d46 Disassembler calling graph skips fallthrough labels
- significantly cleaner calling graph in complex projects.
2016-01-14 22:08:38 -08:00
Carl-Henrik Skårstedt
1f50f07c24 STRUCT Directive fix
- Structs can contain empty lines
- Structs can be empty
- All structs have a size member named bytes, the number of bytes used
by a struct is <struct>.bytes
2016-01-04 20:55:32 -08:00
Carl-Henrik Skårstedt
e3241c66aa Disassembler swapping the order of a couple of things
- Re-evaluating code separators (jmp, rts, etc) before determining local
labels
- Re-evaluated label separator was off by one.
2015-12-18 22:41:16 -08:00
Carl-Henrik Skårstedt
794171d48b Fixed disassembler call graph function fall-through
- forgot that functions can fall through to the next label if there is
nothing separates the function from the next label
2015-12-17 23:27:16 -08:00
Carl-Henrik Skårstedt
7833ddc188 Missing character 2015-12-16 22:21:35 -08:00
Carl-Henrik Skårstedt
c4921552ba Disassembler calling graph
- graph command line option adds a calling graph to the disassembly file
- graph+bra includes branches in the calling graph
- re-evaluating separating code/data segments after the segments have
been culled.
- Added a c64kernal.lbl file that includes kernal calls
2015-12-16 22:19:25 -08:00
Carl-Henrik Skårstedt
b8362cbb0b Improving some code and data distinction rules
- If an address is unreachable it is data even if a branch crosses
- If a branch crosses data then that branch can be valid code
- If a segment is initially considered code but not reachable after all
is said and done it is reverted to data
2015-12-14 22:07:30 -08:00
Carl-Henrik Skårstedt
ec01fcc6e1 Disassembler memory access check 2015-12-14 00:27:12 -08:00
Carl-Henrik Skårstedt
5dbe08b1b3 Minor disassembler annoyances addressing
- Label ranges outside of data would be ignored for instructions
- If last code reference was a jump table then its references would get
stripped
2015-12-12 14:00:36 -08:00
Carl-Henrik Skårstedt
3b2b0f7778 Disassembler local label improvement
- Determination for negative branches to local labels were one off which
meant lots of unnecessary local labels at end of long functions
- struse null/0-length check was reverse causing access to 0
2015-12-12 13:22:23 -08:00
Carl-Henrik Skårstedt
0f740c25bd Fixes to disassembling code pointer arrays
- Removing some filters that pulled out relevant references from pointer
arrays
- Separating 6502 illegal opcodes (6502ill) and WDC specific 65C02
instructions (65C02WDC) from general disassembly
- invalid instructions will always be disassembled as dc.b $hh instead
of the non-assemblable instruction
2015-12-11 23:01:52 -08:00
Carl-Henrik Skårstedt
c96399d896 Adding read-only labels to disassembler and Atari 7800 memory map file
- Changed how the instruction lookup is stored to more easily
distinguish between read-only and other instructions
- Added Atari 7800 labels (a78.lbl)
- Added a keyword "read" to declare a read-only version of a data label
to the labels file
- Fixes to determining addresses representing data or code
- Fixed missing data blocks that were exactly 16 bytes
2015-12-10 22:27:49 -08:00
Carl-Henrik Skårstedt
214c32931a Adding pointer array to data
- Allow assign data type to pointer arrays (label = start-end pointers
data comment)
2015-12-09 23:53:43 -08:00
Carl-Henrik Skårstedt
798b657c70 Better logic for what separates code segments
- Allows jump tables without separating between each instruction
- Branch to instruction after jump instruction does not inject a
function separator
- Jump relative does not reference code
2015-12-09 18:22:07 -08:00
Carl-Henrik Skårstedt
a674f7f165 Fix user defined labels not keeping up with current address
- can skip multiple labels per instruction
2015-12-09 00:06:38 -08:00
Carl-Henrik Skårstedt
0e64a58375 Disassembler improvements
- More aggressive local labels
- Double checking code sections after detection phase
- Zero page instructions added to labels (65816 uses direct page and
will generate slightly off labels)
2015-12-07 22:26:04 -08:00
Carl-Henrik Skårstedt
acf26cf7d7 Fixing and adding to x65macro.i
- Adding shift operations to macros
- Adding README.MD to macros
2015-12-04 22:10:27 -08:00
Carl-Henrik Skårstedt
9cdfeeb0ca Disassembler improvements and c64 labels file
- Adding a labels file with all the c64 hardware addresses
- Labels are tracked outside of the binary file range
- Zero page tracking
- Improved code vs data tracking a bit
2015-12-03 22:53:16 -08:00
Carl-Henrik Skårstedt
6cbf7f8754 x65macro.i added
- Adding standard macros with for loops, memory copy, add, subtract,
move and set
- macros can be named with dots
- double negatives won't cause errors in expressions
- vice output will convert labels named "debugbreak" to vice breakpoints
rather than vice labels
- fixed issues with mixing conditional operators with math operators in
expressions
2015-12-02 22:16:31 -08:00
Carl-Henrik Skårstedt
260f48e126 Bug fixes
- struse.h replace with bookend didn't check bookends in all cases
- macros can be inside of conditionals (within if/else/endif, etc)
- string symbols mistake caused garbage code (missing braces around
assignment and return)
2015-12-01 21:21:00 -08:00
Carl-Henrik Skårstedt
72b81efc87 Local labels attempted in disassembler 2015-11-30 23:03:51 -08:00
Carl-Henrik Skårstedt
2919e0556c Disassembler label file additions
- adding ranges to labels file
- bug fixes
2015-11-29 22:24:42 -08:00
Carl-Henrik Skårstedt
6adcdc92b6 Disassembler improvements
- Added a way to instrument labels for the disassembler
- Added pointers section to disassembler, needs to be instrumented
- Fixes
2015-11-28 14:21:54 -08:00
Carl-Henrik Skårstedt
65f19b4a47 Bug fixes
- rtl instruction had wrong opcode
- disassembler works a lot better with correct rtl, even for 6502
- disassembler can specify n bytes of data before code starts in src
mode (data=initial data size)
2015-11-27 18:01:53 -08:00
Carl-Henrik Skårstedt
bdc013350c Adding imagery 2015-11-26 13:48:04 -08:00
Carl-Henrik Skårstedt
f6531d3bbc Adding one character to README.ME 2015-11-26 13:19:35 -08:00
Carl-Henrik Skårstedt
482640fb1e README.MD cleanup 2015-11-26 13:12:02 -08:00
Carl-Henrik Skårstedt
9f8ad61fe2 Adding string symbols
- String Symbols can be evaluated as expressions or assembled as code
- String Symbols can be generated by macros
- Cleaning up first page
- Adding more to the x65.txt documentation
2015-11-26 13:10:58 -08:00
Carl-Henrik Skårstedt
5459c6c0e0 More line in the documentation
- Fleshed out the sections section
- Added some notes about symbols
- Put the label pool section in
2015-11-24 23:28:56 -08:00
Carl-Henrik Skårstedt
05bdc73b86 Added doc & binaries
- Started text documentation of assembler
- Built binary zip files (Windows)
- Fix for conditional + scope characters
- Fix for empty section "default" defaulting to BSS
2015-11-23 22:34:30 -08:00
Carl-Henrik Skårstedt
d73b7c8581 Iterating on the disassembler
- exploring rules to better distinguish between code and data
2015-11-19 23:50:59 -08:00
Carl-Henrik Skårstedt
bf2e281751 Resolved OMF Directpage+stack seg, Disassembler "smarter"
- Using a section named DirectPage_Stack to adjust same named segment in
OMF file
- Resolving all zero page sections to fixed addresses before exporting
OMF
- Disassembler does more shenanigans to output more assemblable code
- Automatically determine the code address for c64 prg files
2015-11-17 23:47:35 -08:00
Carl-Henrik Skårstedt
055c92ded7 README.MD for x65dsasm was a bit out of date 2015-11-17 00:00:05 -08:00
Carl-Henrik Skårstedt
5792f6ee7b Copied in struse.h, added some reference visualization in x65dsasm
- x65dsasm now adds labels for internal referenced addresses
- x65dsasm has a src option that displays disassembly as code that could
assemble as is
- fixed the help output for dump_x65
- copied in struse.h
2015-11-16 23:55:16 -08:00
Carl-Henrik Skårstedt
7fbe9661fa Fixing analyzer issues 2015-11-15 22:15:41 -08:00
Carl-Henrik Skårstedt
563ff4d1ec utf8??? 2015-11-15 21:17:34 -08:00
Carl-Henrik Skårstedt
43931568aa Apple II GS executable generation
- Lots of managing section support
- a2o command line argument
- DASM directives added
2015-11-15 21:14:46 -08:00
Carl-Henrik Skårstedt
25eab76c95 Fixed Merlin LNK directive and streamlined the LINK directive
- No longer merging sections but assigning sequential addresses to
sections
- Required separate linking logic for Merlin.
2015-11-09 22:15:14 -08:00
Carl-Henrik Skårstedt
90fc74a6fb Adding -org command line option
- -org allows for command line control of fixed address binary output
start address
- fixed a quirk in merged section reloc resolve
2015-11-09 00:07:55 -08:00
Carl-Henrik Skårstedt
b5ab013cb5 Rebuilt the fixed address linker
- Code and data segments are not just merged together, each segment in
each export group just gets address assigned and relocs / labels are
fixed up.
- BSS sections won't generate binary data if not inbetween code and data
segments for an export group (labels and relocs are still extended)
- DC directive now allows for .t (3 byte values) and .l (4 byte values)
decoration
- .lst includes all section info and address ranges if fixed
- Updated x65 dump tool with fixes to x65 data
2015-11-08 18:06:45 -08:00