-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All assembler directives now respecting if/else/endif, part of fix fo…
…r issue #88
- Loading branch information
1 parent
3042c18
commit 25b3f89
Showing
12 changed files
with
88 additions
and
1 deletion.
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
Binary file not shown.
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,12 @@ | ||
; Test conditional ADL | ||
; | ||
|
||
assume ADL=1; disable startup assumptions and set up for failure if not implemented | ||
|
||
.if 1 | ||
assume ADL=0 | ||
.else ; will run if not implemented, resulting in ADL mode 1, resulting in an error later on | ||
assume ADL=1 | ||
.endif | ||
|
||
ld hl, 0 ; this should produce 0x21 0x00 0x00, if properly implemented |
Binary file not shown.
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,10 @@ | ||
; Test alignment | ||
; Don't specifically test else statement; if alignment doesn't respect if/else, then the output will be different | ||
.db 0 | ||
.if 1 | ||
.align 16 | ||
.else | ||
.align 32 | ||
.endif | ||
|
||
.db 0 |
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,9 @@ | ||
; Test conditional EQU | ||
|
||
.if 1 | ||
test: EQU 1 | ||
.else | ||
test: EQU 2 ; will produce an error when not implemented | ||
.endif | ||
|
||
.db test |
Binary file not shown.
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,11 @@ | ||
; Test conditional fillbyte | ||
|
||
.if 1 | ||
fillbyte 0x00 | ||
.else | ||
fillbyte 0x01 | ||
.endif | ||
|
||
.db 0xff | ||
.blkb 16; use fillbyte, should be 16x 0x00 if properly implemented | ||
.db 0xff |
Binary file not shown.
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,18 @@ | ||
; Test conditional macros | ||
; | ||
|
||
.if 1 | ||
|
||
macro test | ||
.db 0 | ||
endmacro | ||
|
||
.else | ||
|
||
macro test | ||
.db 1 | ||
endmacro | ||
|
||
.endif | ||
|
||
test |
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 @@ | ||
����������������� |
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,12 @@ | ||
; Test conditional org | ||
|
||
.org 0x40000 | ||
.db 0xff | ||
|
||
.if 1 | ||
.org 0x40010 | ||
.else | ||
.org 0x40020 | ||
.endif | ||
|
||
.db 0xff |