Compare commits
No commits in common. "d802ca3e077cacd617503949bc6a307a97373254" and "3e75753b1b749bd578da463f546cfa99287d5862" have entirely different histories.
d802ca3e07
...
3e75753b1b
|
|
@ -550,7 +550,8 @@ generated machine code which can directly be executed by the emulator.
|
|||
|
||||
### Emulator
|
||||
|
||||
The third part of the tool kit is the emulator.
|
||||
The second part of the tool kit is the assembler. Included with the assembler is
|
||||
a simple linker.
|
||||
|
||||
Running the following command we can get the arguments for the
|
||||
compiler `python -m pytd12dk em -h`:
|
||||
|
|
|
|||
|
|
@ -192,8 +192,6 @@ fn test_func2() -> Point {
|
|||
test += 15;
|
||||
}
|
||||
|
||||
let length: int = 10;
|
||||
|
||||
for (i: int = 0; i < length; i++)
|
||||
$(inData + i) ^= $(pass + ((i + offset) % pLength));
|
||||
|
||||
|
|
@ -206,8 +204,6 @@ fn test_func2() -> Point {
|
|||
$(inData + i) ^= $(pass + ((i + offset) % pLength));
|
||||
}
|
||||
|
||||
let i: int;
|
||||
|
||||
for (i = 0; i < length; i++) {
|
||||
$(inData + i) ^= $(pass + ((i + offset) % pLength));
|
||||
} else {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -572,9 +572,6 @@ class FunctionArgument:
|
|||
@property
|
||||
def identifier(self) -> Identifier | None: return self._identifier
|
||||
|
||||
@property
|
||||
def value(self) -> Expression: return self._value
|
||||
|
||||
def tree_str(self, pre: str = "", pre_cont: str = "") -> str:
|
||||
s: str = f"{pre} Function Argument\n"
|
||||
if self._identifier: s += f"{pre_cont}├─ Name: {self._identifier}\n"
|
||||
|
|
@ -604,9 +601,6 @@ class FunctionCall:
|
|||
@property
|
||||
def identifier(self) -> Identifier: return self._identifier
|
||||
|
||||
@property
|
||||
def args(self) -> list[FunctionArgument]: return self._args[:]
|
||||
|
||||
def tree_str(self, pre: str = "", pre_cont: str = "") -> str:
|
||||
s: str = f"{pre} Function Call: {self._identifier}\n"
|
||||
if self._args:
|
||||
|
|
@ -829,9 +823,6 @@ class ElseBlock:
|
|||
@property
|
||||
def file_info(self) -> FileInfo: return self._file_info
|
||||
|
||||
@property
|
||||
def code(self) -> list[Statement]: return self._code[:]
|
||||
|
||||
def tree_str(self, pre: str = "", pre_cont: str = "") -> str:
|
||||
s: str = f"{pre} Else Block\n"
|
||||
if self._code:
|
||||
|
|
@ -885,12 +876,6 @@ class ForPreDef:
|
|||
@property
|
||||
def identifier(self) -> Identifier: return self._identifier
|
||||
|
||||
@property
|
||||
def data_type(self) -> DataType: return self._type
|
||||
|
||||
@property
|
||||
def pointer(self) -> bool: return self._pointer
|
||||
|
||||
def tree_str(self, pre: str = "", pre_cont: str = "") -> str:
|
||||
s: str = f"{pre} For Loop Pre-Definition: {self._identifier}\n"
|
||||
if self._assignment: s += f"{pre_cont}├─ Type: "
|
||||
|
|
@ -929,22 +914,6 @@ class ForBlock:
|
|||
@property
|
||||
def file_info(self) -> FileInfo: return self._file_info
|
||||
|
||||
@property
|
||||
def pre_statement(self) -> Expression | ForPreDef:
|
||||
return self._pre_statement
|
||||
|
||||
@property
|
||||
def condition(self) -> Expression: return self._condition
|
||||
|
||||
@property
|
||||
def code(self) -> list[Statement]: return self._code[:]
|
||||
|
||||
@property
|
||||
def post_statement(self) -> Expression: return self._post_statement
|
||||
|
||||
@property
|
||||
def else_block(self) -> ElseBlock | None: return self._else
|
||||
|
||||
def tree_str(self, pre: str = "", pre_cont: str = "") -> str:
|
||||
s: str = f"{pre} For Loop\n"
|
||||
if self._code or self._else is not None:
|
||||
|
|
@ -1057,15 +1026,6 @@ class WhileBlock:
|
|||
@property
|
||||
def file_info(self) -> FileInfo: return self._file_info
|
||||
|
||||
@property
|
||||
def condition(self) -> Expression: return self._condition
|
||||
|
||||
@property
|
||||
def code(self) -> list[Statement]: return self._code[:]
|
||||
|
||||
@property
|
||||
def else_block(self) -> ElseBlock | None: return self._else
|
||||
|
||||
def tree_str(self, pre: str = "", pre_cont: str = "") -> str:
|
||||
s: str = f"{pre} While Loop\n"
|
||||
if self._code or self._else is not None:
|
||||
|
|
@ -1137,20 +1097,6 @@ class DoBlock:
|
|||
@property
|
||||
def file_info(self) -> FileInfo: return self._file_info
|
||||
|
||||
@property
|
||||
def condition(self) -> Expression: return self._condition
|
||||
|
||||
@property
|
||||
def first_code(self) -> list[Statement]: return self._first_code[:]
|
||||
|
||||
@property
|
||||
def second_code(self) -> list[Statement] | None:
|
||||
if self._second_code is None: return None
|
||||
else: return self._second_code[:]
|
||||
|
||||
@property
|
||||
def else_block(self) -> ElseBlock | None: return self._else
|
||||
|
||||
def tree_str(self, pre: str = "", pre_cont: str = "") -> str:
|
||||
s: str = f"{pre} Do Loop\n"
|
||||
if self._first_code:
|
||||
|
|
@ -1238,15 +1184,6 @@ class IfBlock:
|
|||
@property
|
||||
def file_info(self) -> FileInfo: return self._file_info
|
||||
|
||||
@property
|
||||
def condition(self) -> Expression: return self._condition
|
||||
|
||||
@property
|
||||
def code(self) -> list[Statement]: return self._code[:]
|
||||
|
||||
@property
|
||||
def else_block(self) -> ElseBlock | None: return self._else
|
||||
|
||||
def tree_str(self, pre: str = "", pre_cont: str = "") -> str:
|
||||
s: str = f"{pre} If Statement\n"
|
||||
if self._code or self._else is not None:
|
||||
|
|
|
|||
Loading…
Reference in New Issue