Line 109: |
Line 109: |
| | | |
| Bytecode: | | Bytecode: |
− | <pre>
| + | {| class="wikitable" style="margin: 1em auto 1em auto" |
− | 40 XX - (XX is index from table 4) Grab anything from table 4 (could be variables or methods, etc)
| + | ! style="vertical-align: top;" |Opcode |
− | 31 XX - follows after a 40 YY bytecode, defines amount of arguments to use off the stack, and invokes the method defined by 40 YY
| + | ! style="vertical-align: top;" |Format |
− | 01 - return last item
| + | ! style="vertical-align: top;" |Meaning |
− | 2C 00 XX - grab string literal from table 3
| + | ! style="vertical-align: top;" |Description |
− | 30 00 XX YY - invoke method off table 2, XX = index of table2, YY == argument count (this is basically a 40 XX 31 YY, all in one)
| + | |- |
− | </pre>
| + | | style="vertical-align: top;"|0x01 |
| + | | style="vertical-align: top;"|0x01 |
| + | | style="vertical-align: top;"|Return ACC |
| + | | style="vertical-align: top;"|Returns ACC. |
| + | |- |
| + | | style="vertical-align: top;"|0x2C |
| + | | style="vertical-align: top;"|0x2C XXXX |
| + | | style="vertical-align: top;"|ACC = table3[XXXX] |
| + | | style="vertical-align: top;"|Grab a string literal from Table 3, at index XXXX |
| + | |- |
| + | | style="vertical-align: top;"|0x30 |
| + | | style="vertical-align: top;"|0x30 XXXX YY |
| + | | style="vertical-align: top;"|Call table2[XXXX] with YY parameters from stack. |
| + | | style="vertical-align: top;"|Call the method at Table 2, offset by XXXX, with YY parameters from the stack. |
| + | |- |
| + | | style="vertical-align: top;"|0x31 |
| + | | style="vertical-align: top;"|0x31 XX |
| + | | style="vertical-align: top;"|Call ACC with XX parameters from stack. |
| + | | style="vertical-align: top;"|Calls the function in ACC, with parameters from the stack. XX is the number of parameters to use. |
| + | |- |
| + | | style="vertical-align: top;"|0x40 |
| + | | style="vertical-align: top;"|0x40 XX |
| + | | style="vertical-align: top;"|ACC = table4[XX] |
| + | | style="vertical-align: top;"|Grab a variable or method from Table 4, index XX |
| + | |} |
| | | |
| '''TODO: A lot! Keep adding data, people!''' | | '''TODO: A lot! Keep adding data, people!''' |