Skip to content

Add new opcodes#112

Open
avosirenfal wants to merge 3 commits into
McJtyMods:1.11from
avosirenfal:1.11
Open

Add new opcodes#112
avosirenfal wants to merge 3 commits into
McJtyMods:1.11from
avosirenfal:1.11

Conversation

@avosirenfal

Copy link
Copy Markdown

This adds a new test opcode that attempts to acquire a named lock and branches depending on whether it could or could not instead of waiting to acquire it.

@avosirenfal avosirenfal changed the title * Add Test: acquire lock instruction Add two new opcodes Sep 20, 2017
@avosirenfal

Copy link
Copy Markdown
Author

I've also added a break opcode that brings you to the nearest loop exit just like it would in any other programming language.

@avosirenfal

Copy link
Copy Markdown
Author

Here's a simple test program with two loops I used to verify break works correctly. I'll be testing both instructions on a large playthrough of Age of Engineering over the next few days.

https://gist.github.com/avosirenfal/8c3c3e1decc4350e01068b5e0ec731b0

@avosirenfal

Copy link
Copy Markdown
Author

Highly parallel single card crafting using both of these instructions: https://i.imgur.com/Munz7ZL.png

Code: https://gist.github.com/avosirenfal/c1aa706fd5a4cd53fb6aac55a9609449

That was harder to make than the code in the pull request was ._.

@McJty

McJty commented Sep 20, 2017

Copy link
Copy Markdown
Collaborator

I will check all this out later. Very hard at work with the rftools builder right now. Thanks

@avosirenfal avosirenfal changed the title Add two new opcodes Add new opcodes Sep 21, 2017
@avosirenfal

Copy link
Copy Markdown
Author

Updated to add float versions of all the numeric opcodes (add, subtract, multiply, divide, modulus).

These are very useful for vector art screens. Here's an example program for a Mechanism tank display:

https://i.imgur.com/FBFuFNe.jpg

https://gist.github.com/avosirenfal/d8d80901c59b6fd48dafa99af4e8549b

@Ydrec

Ydrec commented Aug 9, 2019

Copy link
Copy Markdown

Add a redstone pulse opcode. Add a CPU limting opcode or a function so we can set it to a specific op/t. Add a splitter opcode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants