Closed
Description
This issue collects conflicts of the current code base and AssemblyScript. See #35 and the research project.
Found problems:
- Data types must be specified explicitly
- AssemblyScript has a restricted data type set
- The current
types
file can be adapted to keep JS compatibility
- The current
- Interfaces are currently not supported. Breaks e.g.
ICPU
andCPU
. (further research required) - Declaring variables as constructor parameters brings up memory access errors because the instantiation works differently. E.g.
CPU
withprogMem
, which has to be declared outside the constructor and the following instantiations have to be done in the constructor body:
constructor(progMem: Uint16Array, private sramBytes: u64 = 8192) {
this.progMem = progMem;
this.progBytes = Uint8Array.wrap(this.progMem.buffer);
this.pc22Bits = this.progBytes.length > 0x20000;
this.reset();
}
(The research is still ongoing.)
Metadata
Metadata
Assignees
Labels
No labels