-
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement
EXPORT DEF
to define and export symbols (#1422)
- Loading branch information
Showing
5 changed files
with
103 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
EXPORT undefined | ||
|
||
DEF equ_sym EQU 1 | ||
DEF var_sym = 2 | ||
EXPORT equ_sym, var_sym | ||
|
||
EXPORT DEF constant EQU 42 | ||
EXPORT DEF variable = 1337 | ||
EXPORT DEF byte RB | ||
EXPORT DEF word RW | ||
EXPORT DEF long RL | ||
EXPORT REDEF constant EQU 69 | ||
EXPORT REDEF variable = 1234 | ||
|
||
; String constants can't be exported or imported. | ||
DEF equs_sym EQUS "hello" | ||
EXPORT equs_sym ; exports undefined symbol `hello` due to EQUS expansion | ||
EXPORT DEF string EQUS "goodbye" ; invalid syntax |
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,3 @@ | ||
error: export.asm(18): | ||
syntax error, unexpected EQUS | ||
error: Assembly aborted (1 error)! |