-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ef20f7
commit 5e89180
Showing
2 changed files
with
52 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#include "null.h" | ||
#include <stdint.h> | ||
|
||
/** | ||
* @author cheng-alvin | ||
* @since v0.0.1 | ||
* | ||
* Code-generation mode for the assembler module code, can | ||
* be used as a indicator for the assembler code generator | ||
* to generate code. | ||
*/ | ||
|
||
typedef enum { | ||
REAL, | ||
PROTECTED, | ||
LONG, | ||
} mode_t; | ||
|
||
/** | ||
* @author cheng-alvin | ||
* @since v0.0.1 | ||
* | ||
* The info_t struct is used to store the information of the | ||
* assembler module, including the program mode and the buffer | ||
* that stores the generated assembler code. | ||
* | ||
* @see `mode_t` for more information about the program mode | ||
* enum. | ||
* | ||
* TODO Revise docs for struct? | ||
*/ | ||
|
||
typedef struct { | ||
mode_t program_mode; | ||
uint8_t *buffer; | ||
} info_t; | ||
|
||
/** | ||
* @author cheng-alvin | ||
* @since v0.0.1 | ||
* | ||
* The variable declaration used to store the information of | ||
* the assembler module. | ||
*/ | ||
|
||
extern info_t __jas_info__; |
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,6 @@ | ||
#include "info.h" | ||
|
||
info_t __jas_info__ = { | ||
.program_mode = REAL, | ||
.buffer = NULL, | ||
}; |