Compare commits

...

159 Commits

Author SHA1 Message Date
Carl-Henrik Skårstedt 9e542033b8 Macros can use strings 2021-12-12 20:13:05 +01:00
Carl-Henrik Skårstedt 842b68b342 Fixing some illegals 2021-05-15 13:59:44 +02:00
Carl-Henrik Skårstedt c4dff1c872 Merge branch 'master' of https://github.com/Sakrac/x65 2021-02-11 22:20:31 +01:00
Carl-Henrik Skårstedt d4345a2352 Moving x65 binaries to releases 2021-02-11 21:37:10 +01:00
Carl-Henrik Skårstedt 3edff374c9 Moving x65 binaries to releases 2021-02-11 21:37:10 +01:00
Carl-Henrik Skårstedt 73eaa45daa fixed Kick Assembler Debugdata output with symbols relative to sections & section naming 2021-02-11 17:34:46 +01:00
Carl-Henrik Skårstedt 101e6ed3de fixed Kick Assembler Debugdata output with symbols relative to sections & section naming 2021-02-11 17:34:46 +01:00
Carl-Henrik Skårstedt 5339e5c789 Fixed x65 symbol files that broke with source debug changes 2021-02-10 23:31:12 +01:00
Carl-Henrik Skårstedt 4a88deb989 Fixed x65 symbol files that broke with source debug changes 2021-02-10 23:31:12 +01:00
Carl-Henrik Skårstedt 74d517e9d3 Minor progress labels & breakpoint source tracking 2021-01-26 23:24:30 +01:00
Carl-Henrik Skårstedt 1928206659 Minor progress labels & breakpoint source tracking 2021-01-26 23:24:30 +01:00
Carl-Henrik Skårstedt bed84e27cf updating executables 2021-01-14 22:45:56 +01:00
Carl-Henrik Skårstedt dc53ab5174 Merge pull request #20 from Sakrac/source-debug
Source debug
2021-01-14 20:33:43 +01:00
Carl-Henrik Skårstedt 3596224b3c
Merge pull request #20 from Sakrac/source-debug
Source debug
2021-01-14 20:33:43 +01:00
Carl-Henrik Skårstedt e0d3f3c9cd Adding notes about how to use source debug output 2021-01-14 20:32:17 +01:00
Carl-Henrik Skårstedt 2bbe8aab66 Adding notes about how to use source debug output 2021-01-14 20:32:17 +01:00
Carl-Henrik Skårstedt 88fc0cbb60 Fixing Source Debug export 2021-01-14 20:28:06 +01:00
Carl-Henrik Skårstedt efb99fe9ab Fixing Source Debug export 2021-01-14 20:28:06 +01:00
Carl-Henrik Skårstedt 779c7af7ed Source Debug Export 2021-01-14 16:50:33 +01:00
Carl-Henrik Skårstedt 063459efbf Source Debug Export 2021-01-14 16:50:33 +01:00
Carl-Henrik Skårstedt f67a920a06 Writing object files with source debug, load object files breaks 2021-01-13 23:58:26 +01:00
Carl-Henrik Skårstedt b75a8325ee Writing object files with source debug, load object files breaks 2021-01-13 23:58:26 +01:00
Carl-Henrik Skårstedt 7df69d5e36 Source level debugging info wip 2021-01-13 17:42:18 +01:00
Carl-Henrik Skårstedt 56fb34c64b Source level debugging info wip 2021-01-13 17:42:18 +01:00
Carl-Henrik Skårstedt c1fa69d90f added c64 screen codes as a text option 2021-01-12 16:59:41 +01:00
Carl-Henrik Skårstedt 5c98f7c7e8 added c64 screen codes as a text option 2021-01-12 16:59:41 +01:00
Carl-Henrik Skårstedt 060be58f41 Allow code to be compiled in "zero page" 2020-12-13 22:43:53 +01:00
Carl-Henrik Skårstedt 1d70c9b963 Allow code to be compiled in "zero page" 2020-12-13 22:43:53 +01:00
Carl-Henrik Skarstedt f3b33acf88 make a shell script to compile for linux 2020-12-13 13:35:20 +01:00
Carl-Henrik Skarstedt 98ceceb315 make a shell script to compile for linux 2020-12-13 13:35:20 +01:00
Carl-Henrik Skårstedt 3a33dc7056 Merge pull request #18 from ksherlock/merlin_ddb_2
fix merlin ddb
2020-12-05 20:06:53 +01:00
Carl-Henrik Skårstedt 87d88265b0
Merge pull request #18 from ksherlock/merlin_ddb_2
fix merlin ddb
2020-12-05 20:06:53 +01:00
Carl-Henrik Skarstedt 8e95b7ffb9 Fixed missing return in Find 2020-12-02 19:17:07 +01:00
Carl-Henrik Skarstedt 2a2529f237 Fixed missing return in Find 2020-12-02 19:17:07 +01:00
Carl-Henrik Skårstedt 45b998fa2b Merge pull request #19 from ksherlock/blockmove2
fix mvn/mvp operand order
2020-10-21 09:50:34 +02:00
Carl-Henrik Skårstedt bf6c7b0df9
Merge pull request #19 from ksherlock/blockmove2
fix mvn/mvp operand order
2020-10-21 09:50:34 +02:00
Kelvin Sherlock af8c7ae42d fix mvn/mvp argument order
mvn $01,$02 is encoded as: $54 $02 $01
2020-10-20 19:34:38 -04:00
Kelvin Sherlock 34b3c1edb9 fix mvn/mvp argument order
mvn $01,$02 is encoded as: $54 $02 $01
2020-10-20 19:34:38 -04:00
Carl-Henrik Skårstedt fe924aab14 Merge pull request #17 from ksherlock/clang_warnings
fix clang compiler errors and warnings.
2020-10-19 09:04:33 +02:00
Carl-Henrik Skårstedt 4a81aafdc7
Merge pull request #17 from ksherlock/clang_warnings
fix clang compiler errors and warnings.
2020-10-19 09:04:33 +02:00
Kelvin Sherlock 295129cd6c fix merlin ddb
ddb generates a "double byte" which is actually a big-endian 16-bit number.
For relocation purposes, it has to be handled as 2 individual bytes with shifts to adjust it.
2020-10-18 13:39:42 -04:00
Kelvin Sherlock da6ed1159d fix merlin ddb
ddb generates a "double byte" which is actually a big-endian 16-bit number.
For relocation purposes, it has to be handled as 2 individual bytes with shifts to adjust it.
2020-10-18 13:39:42 -04:00
Kelvin Sherlock 06aae43fdd fix clang compiler errors and warnings. 2020-10-18 11:58:35 -04:00
Kelvin Sherlock a2d9c5330d fix clang compiler errors and warnings. 2020-10-18 11:58:35 -04:00
Carl-Henrik Skårstedt c2492ab348 Merge branch 'master' of https://github.com/Sakrac/x65 2020-04-01 16:19:55 +02:00
Carl-Henrik Skårstedt 1f6956c1ec Added a helper switch to show XREFs/XDEFs before linking 2020-04-01 16:19:48 +02:00
Carl-Henrik Skårstedt 45f5d05f54 Merge pull request #15 from dwsJason/ja-pei
pei addressing
2020-04-01 16:18:34 +02:00
Carl-Henrik Skårstedt 56b253880e Merge pull request #16 from dwsJason/sample_omf
Sample OMF
2020-04-01 16:18:16 +02:00
dwsJason e6a63010f2 import Tool macros 2020-02-25 21:29:48 -05:00
dwsJason b8ef00f811 import missing dp.s file 2020-02-25 21:12:55 -05:00
dwsJason 1f61d948fb import: sample OMF application 2020-02-25 21:11:24 -05:00
dwsJason 17a99e46e7 PEI: allow both addressing styles $dp, and ($dp) 2020-02-22 16:20:52 -05:00
dwsJason fd1bc0ba76 Fix address corruption issue with when code segment is pushed beyond 32kb 2020-02-22 14:04:49 -05:00
Jason Andersen b699c1b6f4 Merge pull request #1 from Sakrac/master
Sync with x65 master
2020-02-22 13:53:26 -05:00
Carl-Henrik Skårstedt c1de91e3f1 Fixed a case where addressing mode got confused because a function with multiple parameters was used as the address 2020-01-21 16:49:20 -08:00
Carl-Henrik Skårstedt 53f69edc5a Documented FUNCTION in directives, added errors.md 2020-01-15 11:23:07 -08:00
Carl-Henrik Skårstedt d80f5473a2 Merge pull request #13 from Sakrac/user-functions
User functions:
User Defined Functions added, you can now create predefined expressions that work similar to a macro but returns a value instead of generating binary:
FUNCTION add_values(a, b) a + b
2020-01-15 10:53:32 -08:00
Carl-Henrik Skårstedt 6af905353c User functions first implementation, added a NOT expression operator 2020-01-15 10:51:02 -08:00
Carl-Henrik Skårstedt dda49fda57 progress user functions 2020-01-14 23:41:34 -08:00
Carl-Henrik Skårstedt 846bd5cd63 Starting user defined functions 2020-01-14 18:53:02 -08:00
Carl-Henrik Skårstedt 09796bc6e7 Update eval_functions.md 2020-01-11 19:52:43 -08:00
Carl-Henrik Skårstedt b45da90bce Adding a doc for eval functions. 2020-01-11 13:16:34 -08:00
Carl-Henrik Skårstedt 33e7f72d0b Update directives.md 2020-01-11 13:05:53 -08:00
Carl-Henrik Skårstedt 5cec8f8309 Adding markdown relative links 2020-01-11 13:04:00 -08:00
Carl-Henrik Skårstedt e3fa7b0c83 Finishing the last sentence in the introduction to directives documentation. 2020-01-11 13:00:57 -08:00
Carl-Henrik Skårstedt b469ceef8c Expermenting with starting over on the x65 documentation 2020-01-11 12:58:26 -08:00
Carl-Henrik Skårstedt eb3df4de88 Label pools are 32 bit, added sizeof directive for structs, destructor for Symbol Stacks 2020-01-10 20:52:02 -08:00
Carl-Henrik Skårstedt 4b7e679b20 Merge pull request #12 from Sakrac/functions
Functions
2020-01-10 14:20:45 -08:00
Carl-Henrik Skårstedt a535295929 Implementing Eval Functions, complimented by IFCONST, IFBLANK and IFNBLANK 2020-01-10 14:20:00 -08:00
Carl-Henrik Skårstedt 758b4349eb Starting assembler functions 2020-01-09 23:10:55 -08:00
Carl-Henrik Skårstedt 600567a42e Merge branch 'master' of https://github.com/Sakrac/x65 2020-01-09 16:09:02 -08:00
Carl-Henrik Skårstedt 385155d5eb Update ca65directive.s 2020-01-09 16:08:14 -08:00
Carl-Henrik Skårstedt b3d9b40563 push/pull symbols and strings with directiv 2020-01-09 16:01:16 -08:00
Carl-Henrik Skårstedt 12e158d637 Fixed scoped labels turning into local labels and expiring when endscope is encountered 2020-01-08 18:59:06 -08:00
Carl-Henrik Skårstedt a3f8a7cf44 ca65 uses import/export instead of xref/xdef, section export is not available in this case 2020-01-08 17:04:42 -08:00
Carl-Henrik Skårstedt 66bdac5079 fixed IFDEF/IFNDEF, added partial support for CA65 style SCOPE, fixed -endm style macro parsing. 2020-01-08 14:38:29 -08:00
Carl-Henrik Skårstedt 6e4be1504d Adding an immediate mode version of BRK since the IRQ will treat it as a two byte instruction 2019-11-03 20:34:02 -08:00
Carl-Henrik Skårstedt 963d1925cc changed PEI to zp instead of zp rel 2019-11-03 20:13:28 -08:00
Carl-Henrik Skårstedt c234531d69 Fixed various issues with linking sections, seemingly broke macros in some way but common usage is fine. 2019-10-27 18:09:48 -07:00
Carl-Henrik Skårstedt 019e8d7ae9 Making sure branch out of range error is propagated in late eval 2019-10-18 00:01:19 -07:00
Carl-Henrik Skårstedt 2243803116 Fixed macro issue that defines a label ending with : 2019-10-17 15:53:28 -07:00
Carl-Henrik Skårstedt d5080e925d more testing and fixing of partial expressions 2019-10-17 00:16:55 -07:00
Carl-Henrik Skårstedt 7521d31514 debug output for partial late eval, seems ok, can integrate with more testing 2019-10-16 18:33:17 -07:00
Carl-Henrik Skårstedt 33b229d00a Fixing 16 vs 8 bit immediate load issue (again) 2019-09-20 18:20:30 -07:00
Carl-Henrik Skårstedt 6e8a41acc1 removing WDC 65816 specific syntax for non-65816 cpus to maintain code. 2019-09-19 22:06:11 -07:00
Carl-Henrik Skårstedt de0bc5120f Fixed 16 bit immediate mode, tweaked unit tests, added |/! as WDC syntax for absolute addressing 2019-09-19 21:07:04 -07:00
Carl-Henrik Skårstedt 482470b410 Starting WDC syntax support, adding unit test to repo. 2019-09-19 18:50:30 -07:00
Carl-Henrik Skårstedt 23aedcf686 Fix for bug #1
Force absolute addressing failed when presented with a known long address.
2019-09-18 12:16:58 -07:00
Carl-Henrik Skårstedt da015f3e1c Missing addressing mode for lax 2019-09-08 00:27:10 -07:00
Carl-Henrik Skårstedt 4670be0ce1 Adding a structure to hold one unit of source level debugging 2019-09-06 18:02:18 -07:00
Carl-Henrik Skårstedt efacecf701 Adding 64TASS list/labels output files for no reason. 2019-09-03 17:10:48 -07:00
Carl-Henrik Skårstedt 4c3c1654fb Fix for -DLabel=value option 2019-03-13 12:08:21 -07:00
Carl-Henrik Skårstedt cfb2d1a8d8 Fixed exporting code to addresses below the stack 2018-10-20 18:33:19 -07:00
Carl-Henrik Skårstedt ab2015fc3d Can evaluate characters by single quote '?' 2018-10-15 00:16:44 -07:00
Carl-Henrik Skårstedt eae936dd6a swithcing back to vs2015 2018-02-20 13:40:57 -08:00
Carl-Henrik Skårstedt 4285a14801 fixing import with file offset 2018-02-20 13:30:32 -08:00
Carl-Henrik Skårstedt b16edcd592 Fixed a couple of linker related bugs
did not have any effect, link directive doesn't do what I expect,
probably need to clean up the linker portion.
2017-09-24 22:36:42 -07:00
Carl-Henrik Skårstedt 05b7e253c3 Listing file contains sections including merged sections. 2017-08-06 16:13:11 -07:00
Carl-Henrik Skårstedt efc63864ee Also cleaning up previous install for Visual Studio Code extension 2017-04-15 20:51:09 -07:00
Carl-Henrik Skårstedt 2698f08ab9 .gitignore adding yet more redundant visual studio project files... 2017-04-15 13:40:47 -07:00
Carl-Henrik Skårstedt 9c7f413dac Changing theme from XML to JSON, adding Windows installer
* I don't like XML one bit
* Writing a bat file is easier than putting something on the marketplace
without using javascript.
2017-04-15 13:34:16 -07:00
Carl-Henrik Skårstedt 49ca89f875 Adding dump_x65 as a VS2017 solution project 2017-04-11 16:10:43 -07:00
Carl-Henrik Skårstedt 479300eec7 Adding a solution for Visual Studio 2017 2017-04-11 12:56:10 -07:00
Carl-Henrik Skårstedt effd8205db Image fix 2017-01-28 17:05:35 -08:00
Carl-Henrik Skårstedt adcefe4bff Tuning the lanuage extension for Visual Studio Code a bit 2017-01-28 17:02:41 -08:00
Carl-Henrik Skårstedt e37bf5ae11 Visual Studio Code colorizing extension, Error includes line number of undefined label reference
* PrintError has an optional argument for enclosing file
* Visual Studio Code extension
2017-01-28 13:29:42 -08:00
Carl-Henrik Skårstedt 576ec5497d MERGE directive, indexed TEXT, Code Style fixes
* Added a directive to control merging of SECTIONs: MERGE
* Added an indexed TEXT format that uses a String Symbol for the
indexing order
* General coding style consitencies
2017-01-08 16:30:30 -08:00
Carl-Henrik Skårstedt baebdbe096 Label Pool changes
Pool are extended to:
* A pool label can be any size by using POOL <label>.<size> where <size>
is a decimal number
* A pool can define a pool within itself <pool> pool <name> <size> where
<pool> is the name of a pool that would fit another pool and <name> is
the name of the new pool and <size> is the size of the new pool
* pool labels are local if they are preceeded by . or ! or $ or @
* pool labels can be global
2016-12-24 13:23:01 -08:00
Carl-Henrik Skårstedt fe049342bd README.md edit 2016-12-23 14:04:59 -08:00
Carl-Henrik Skårstedt 8f4a00e3ce Fixing label pools
* label pools don't go out of scope so they can be declared in an
include file and used by the includer file
* label pool labels can be either global or local
* code fixes
* updated struse
* updated binaries
2016-12-23 13:56:57 -08:00
Carl-Henrik Skårstedt c226b00dad Added visual studio natvis for struse class 2016-05-26 22:28:32 -07:00
Carl-Henrik Skårstedt b4407f7cb5 struse.h fixes, warning fixes 2016-05-25 22:44:17 -07:00
Carl-Henrik Skårstedt a0b73db5c8 Struse was updated and fixing related issues 2016-05-20 22:48:13 -07:00
Carl-Henrik Skårstedt 03f5e5cbfe First column in Merlin mode recognizes scope braces ('{' and '}') 2016-03-17 21:33:39 -07:00
Carl-Henrik Skårstedt e452d3ab7e Fix 2016-03-17 00:07:15 -07:00
Carl-Henrik Skårstedt 9752c1d8a1 Merlin macro fix
- Does not require merlin macro parameters to be listed after the
keyword MAC
- Updated struse.h
2016-03-17 00:05:36 -07:00
Carl-Henrik Skårstedt 73d67d0657 Context scope cleanup and fix for sequential subtraction in expressions
- Should clean up Merlin mode macros a bit
- Fixes a numerical error
2016-03-13 18:16:43 -07:00
Carl-Henrik Skårstedt 0fcdc9ca47 Switching dump_x65 to inttypes.h and updating binaries
- dump_x65 now matches object code structures in x65
2016-03-12 11:57:39 -08:00
Carl-Henrik Skårstedt d1c9f3aab5 Fix for local labels accessed crossing over a REPT / LUP
- Added a scope increment when entering a block of repeated code so only
the local symbols within the block would be destroyed each iteration
- Switched over to inttypes.h to make code a smidgeon more readable
2016-03-12 11:39:53 -08:00
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
12 changed files with 497 additions and 101 deletions

2
.gitignore vendored
View File

@ -1,3 +1,4 @@
./x65.exe
*.suo
*.ipch
*.aps
@ -18,4 +19,5 @@
*.obj.enc
*.user
*.db*
*.recipe
test/results/*

View File

@ -62,8 +62,7 @@ x65.cpp requires struse.h which is a single file text parsing library that can b
### Download Binaries
* [Windows x64 binaries](../..//raw/master/bin/x65_x64.zip)
* [Windows x86 binaries](../..//raw/master/bin/x65_win32.zip)
Please note that releases have moved the Github [releases](https://github.com/Sakrac/x65/releases)
### x65
@ -102,6 +101,7 @@ Primarily tested with personal archive of sources written for Kick assmebler, DA
* irp (indefinite repeat)
**FIXED**
* Source Debug output file including linkable object files, C64Debugger format
* Adding MERGE directive, Label Pools rewrite, TEXT data can be indexed from a string symbol
* Label Pools were destroyed after each scope so they did not work in include files which defeated their purpose. Label pools are now persistent through scopes.
* Labels reserved from label pools now distinguish between global and local. Use [.!@$] as a prefix to reserve a local label from a label pool (previously always local)

Binary file not shown.

Binary file not shown.

1
build.sh Executable file
View File

@ -0,0 +1 @@
g++ x65.cpp -lm -o x65.exe

View File

@ -23,32 +23,32 @@
<ProjectGuid>{57EFF4A4-7BF2-43F0-AD62-A79092DA67D1}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>dump_x65</RootNamespace>
<WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>

View File

@ -23,32 +23,32 @@
<ProjectGuid>{2823019A-A423-4A40-BB9C-5CE242019BD0}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>x65</RootNamespace>
<WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>

View File

@ -590,6 +590,7 @@ public:
strref split_token_trim(char c);
strref split_token_any_trim(const strref chars);
strref split_token_track_parens(char c);
strref split_token_track_parens_quote(char c);
strref split_token_trim_track_parens(char c);
strref split_range(const strref range, strl_t pos=0);
strref split_range_trim(const strref range, strl_t pos=0);
@ -770,7 +771,7 @@ public:
int find_after_last(char a, char b) const { return get_strref().find_after_last(a, b); }
int find_after_last(char a1, char a2, char b) const { return get_strref().find_after_last(a1, a2, b); }
int find(const strref str) const { return get_strref().find(str); }
int find(const strref str, strl_t pos) const { get_strref().find(str, pos); }
int find(const strref str, strl_t pos) const { return get_strref().find(str, pos); }
int find(const char *str, strl_t pos = 0) const { return get_strref().find(str, pos); }
int find_case(const strref str) const { return get_strref().find_case(str); }
int find_case(const char *str) const { return get_strref().find_case(str); }
@ -4162,6 +4163,24 @@ strref strref::split_token_track_parens(char c)
return r;
}
strref strref::split_token_track_parens_quote(char c)
{
if (length>=2 && string[0] == '"') {
strl_t o = 1;
while (o < length && string[o] != '"') { ++o; }
if (o < length) {
strref r = strref(string, o + 1);
*this += o + 1;
return r;
}
}
int t = find_skip_parens(c);
if (t < 0) t = (int)length;
strref r = strref(string, strl_t(t));
*this += t + 1;
return r;
}
strref strref::split_token_any( const strref chars )
{
strref r; int t = find_any_char_of( chars );

8
test/merlin_data.s Normal file
View File

@ -0,0 +1,8 @@
; merlin_data.s
db $12,$34,$56,$78
ddb $1234,$5678 ; double byte - big endian format.
dw $1234
da $1234
adr $123456
adrl $12345678

542
x65.cpp

File diff suppressed because it is too large Load Diff