Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ void RomWrite::Do(SymbolTable* scope, EvalContext& original_context)
// Create a new context for the subexpressions
EvalContext context;
context.module = original_context.module;
context.file = original_context.file;

RomAccess* access = new RomAccess();

Expand Down
9 changes: 8 additions & 1 deletion src/tests/insertbinexpr.ccs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
/// "[fc fd fe ff]"
/// "[fc fd fe ff]"
/// "[00 01 02 03]"
/// "[31 41 59]"
/// "[31 41 59 00]"
/// "[00 00 26 FC FD FE FF 00]"
/// "[01 02 03 31 41 59 00 00]"

// The hex file should have the following data:
// "[00 01 02 03 31 41 59 26 FC FD FE FF]"
Expand All @@ -15,3 +17,8 @@ insertbin "insertbinexpr_data.bin"
insertbin [0x8] "insertbinexpr_data.bin"
insertbin [0,4] "insertbinexpr_data.bin"
insertbin [4,3] "insertbinexpr_data.bin"

// Unaligned insertbins, inside of unaligned and overlong ROM[] statements
ROM[0xC00020] = insertbin [1, 6] "insertbinexpr_data.bin"
ROMTBL[0xC00018,1,2] = insertbin [7] "insertbinexpr_data.bin"