-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cpclib-asm] Fix a crash when handling BANK directive
- Loading branch information
Showing
6 changed files
with
91 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
; Set up a unique value in various banks | ||
BANK 0xc0 | ||
org 0x4000 + 0 | ||
db 0xc0 | ||
|
||
BANK 0xc4 | ||
org 0x4000 + 1 | ||
db 0xc4 | ||
|
||
|
||
BANK 0xc5 | ||
org 0x4000 + 2 | ||
db 0xc5 | ||
|
||
BANK 0xc6 | ||
org 0x4000 + 3 | ||
db 0xc6 | ||
|
||
|
||
BANK 0xc7 | ||
org 0x4000 + 4 | ||
db 0xc7 | ||
|
||
|
||
BANKSET 0 | ||
assert memory(0x4000 + 0) == 0xC0 | ||
|
||
BANKSET 1 | ||
assert memory(0x4000 + 2) == 0xC5 | ||
assert memory(0x8000 + 3) == 0xC6 | ||
assert memory(0xC000 + 4) == 0xC7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
WRITE DIRECT -1, -1, 0xc0 | ||
org 0x4000+0 | ||
db 0xc0 | ||
|
||
WRITE DIRECT -1, -1, 0xc4 | ||
org 0x4000+1 | ||
db 0xc4 | ||
|
||
|
||
WRITE DIRECT -1, -1, 0xc5 | ||
org 0x4000+2 | ||
db 0xc5 | ||
|
||
WRITE DIRECT -1, -1, 0xc6 | ||
org 0x4000+3 | ||
db 0xc6 | ||
|
||
|
||
WRITE DIRECT -1, -1, 0xc7 | ||
org 0x4000+4 | ||
db 0xc7 | ||
|
||
|
||
BANKSET 0 | ||
assert memory(0x4000 + 0) == 0xC0 | ||
|
||
BANKSET 1 | ||
assert memory(0x4000 + 2) == 0xC5 | ||
assert memory(0x8000 + 3) == 0xC6 | ||
assert memory(0xC000 + 4) == 0xC7 |