Add afterProgramPage() for filesystem support
This commit is contained in:
parent
cf982d7c52
commit
b4b789422e
@ -203,6 +203,19 @@ namespace pxt {
|
|||||||
void *ptrOfLiteral(int offset);
|
void *ptrOfLiteral(int offset);
|
||||||
//%
|
//%
|
||||||
int getNumGlobals();
|
int getNumGlobals();
|
||||||
|
|
||||||
|
//%
|
||||||
|
uint32_t programSize() {
|
||||||
|
return bytecode[17] * 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
//%
|
||||||
|
uint32_t afterProgramPage() {
|
||||||
|
uint32_t ptr = (uint32_t)&bytecode[0];
|
||||||
|
ptr += programSize();
|
||||||
|
ptr = (ptr + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
|
||||||
|
return ptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace pxtrt {
|
namespace pxtrt {
|
||||||
|
Loading…
Reference in New Issue
Block a user