mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
The bank of a section can be requested with `BANK("Section Name")`, and
the bank of the current section with `BANK(@)`. In both cases, the bank
number is resolved by the linker.
New commands have been added to the list of RPN commands of object
files, and the rest has been moved so that new additions don't force a
new change in the number of the enumerations.
Increase object file version, as it is now incompatible with the old
format.
Update manpages to reflect the new ways of using `BANK()` and the new
format of the object files.
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
68 lines
3.0 KiB
C
68 lines
3.0 KiB
C
#ifndef RGBDS_ASM_RPN_H
|
|
#define RGBDS_ASM_RPN_H
|
|
|
|
#include <stdint.h>
|
|
|
|
struct Expression {
|
|
int32_t nVal;
|
|
uint8_t tRPN[256];
|
|
uint32_t nRPNLength;
|
|
uint32_t nRPNOut;
|
|
uint32_t isReloc;
|
|
uint32_t isPCRel;
|
|
};
|
|
|
|
uint32_t rpn_isReloc(const struct Expression *expr);
|
|
uint32_t rpn_isPCRelative(const struct Expression *expr);
|
|
void rpn_Symbol(struct Expression *expr, char *tzSym);
|
|
void rpn_Number(struct Expression *expr, uint32_t i);
|
|
void rpn_LOGNOT(struct Expression *expr, const struct Expression *src);
|
|
void rpn_LOGOR(struct Expression *expr, const struct Expression *src1,
|
|
const struct Expression *src2);
|
|
void rpn_LOGAND(struct Expression *expr, const struct Expression *src1,
|
|
const struct Expression *src2);
|
|
void rpn_LOGEQU(struct Expression *expr, const struct Expression *src1,
|
|
const struct Expression *src2);
|
|
void rpn_LOGGT(struct Expression *expr, const struct Expression *src1,
|
|
const struct Expression *src2);
|
|
void rpn_LOGLT(struct Expression *expr, const struct Expression *src1,
|
|
const struct Expression *src2);
|
|
void rpn_LOGGE(struct Expression *expr, const struct Expression *src1,
|
|
const struct Expression *src2);
|
|
void rpn_LOGLE(struct Expression *expr, const struct Expression *src1,
|
|
const struct Expression *src2);
|
|
void rpn_LOGNE(struct Expression *expr, const struct Expression *src1,
|
|
const struct Expression *src2);
|
|
void rpn_ADD(struct Expression *expr, const struct Expression *src1,
|
|
const struct Expression *src2);
|
|
void rpn_SUB(struct Expression *expr, const struct Expression *src1,
|
|
const struct Expression *src2);
|
|
void rpn_XOR(struct Expression *expr, const struct Expression *src1,
|
|
const struct Expression *src2);
|
|
void rpn_OR(struct Expression *expr, const struct Expression *src1,
|
|
const struct Expression *src2);
|
|
void rpn_AND(struct Expression *expr, const struct Expression *src1,
|
|
const struct Expression *src2);
|
|
void rpn_SHL(struct Expression *expr, const struct Expression *src1,
|
|
const struct Expression *src2);
|
|
void rpn_SHR(struct Expression *expr, const struct Expression *src1,
|
|
const struct Expression *src2);
|
|
void rpn_MUL(struct Expression *expr, const struct Expression *src1,
|
|
const struct Expression *src2);
|
|
void rpn_DIV(struct Expression *expr, const struct Expression *src1,
|
|
const struct Expression *src2);
|
|
void rpn_MOD(struct Expression *expr, const struct Expression *src1,
|
|
const struct Expression *src2);
|
|
void rpn_HIGH(struct Expression *expr, const struct Expression *src);
|
|
void rpn_LOW(struct Expression *expr, const struct Expression *src);
|
|
void rpn_UNNEG(struct Expression *expr, const struct Expression *src);
|
|
void rpn_UNNOT(struct Expression *expr, const struct Expression *src);
|
|
uint16_t rpn_PopByte(struct Expression *expr);
|
|
void rpn_BankSymbol(struct Expression *expr, char *tzSym);
|
|
void rpn_BankSection(struct Expression *expr, char *tzSectionName);
|
|
void rpn_BankSelf(struct Expression *expr);
|
|
void rpn_Reset(struct Expression *expr);
|
|
void rpn_CheckHRAM(struct Expression *expr, const struct Expression *src);
|
|
|
|
#endif /* RGBDS_ASM_RPN_H */
|