Stationeers

Stationeers

View Stats:
Logic Sorter Stack Instruction
Can we please have "AND", "OR" instructions besides existing? For my project I used to control sorter by logic before the addition of new stack instructions. Now I still cant switch to them because there is no way to say "You should filter 1 time if HashEquals to a and QuantityEquals n or if HashEquals to b and QuantityEquals to m".

It could be implemented by addition of 2 new instructions(OP_CODES): AND and OR which group next two instructions into single instruction (and Number of execution times applies to a group if comes before AND/OR)

(Writing a Concurrent printer ingots management script which requests ingots from single vending concurrently and awaits for delivery)
Last edited by AEliasThorn; May 1, 2024 @ 8:09am
< >
Showing 1-3 of 3 comments
Yoho May 11, 2024 @ 11:46am 
Bro
How to write the instructions into the logic sorter
Could you give me same demo or guidance

Here is my code

#####################
sd 95407 ClearMemory 1
#putd 95407 0 1
#putd 95407 1 1830218956
j main




writeStack:#(id, addr, data, size)
push r4
beq r3 1 byte
beq r3 2 word
and r4 r2 $FF000000
srl r4 r4 24
push r4
and r4 r2 $FF0000
srl r4 r4 16
push r4
word:
push r4
and r4 r2 $FF00
srl r4 r4 8
push r4
byte:
and r4 r2 $FF
push r4
loopwrite:
pop r4
putd r0 r1 r4
add r1 r1 1
sub r3 r3 1
bnez r3 loopwrite
pop r4
j ra

main:
move r0 95407
move r1 0
move r2 1
move r3 1
jal writeStack

move r0 95407
move r1 1
move r2 1830218956
move r3 4
jal writeStack

getd r0 95407 1
sb -815193061 Setting r0

##############
I had try BigEnd and LittleEnd, And Trace the device stack is correct
But none of them worked
AEliasThorn May 11, 2024 @ 1:19pm 
Originally posted by Yoho:
Bro
How to write the instructions into the logic sorter
Could you give me same demo or guidance

Here is my code

#####################
sd 95407 ClearMemory 1
#putd 95407 0 1
#putd 95407 1 1830218956
j main




writeStack:#(id, addr, data, size)
push r4
beq r3 1 byte
beq r3 2 word
and r4 r2 $FF000000
srl r4 r4 24
push r4
and r4 r2 $FF0000
srl r4 r4 16
push r4
word:
push r4
and r4 r2 $FF00
srl r4 r4 8
push r4
byte:
and r4 r2 $FF
push r4
loopwrite:
pop r4
putd r0 r1 r4
add r1 r1 1
sub r3 r3 1
bnez r3 loopwrite
pop r4
j ra

main:
move r0 95407
move r1 0
move r2 1
move r3 1
jal writeStack

move r0 95407
move r1 1
move r2 1830218956
move r3 4
jal writeStack

getd r0 95407 1
sb -815193061 Setting r0

##############
I had try BigEnd and LittleEnd, And Trace the device stack is correct
But none of them worked

Try your luck here:
https://www.reddit.com/r/Stationeers/comments/1cfka63/new_logic_sorter/

Didn`t test them myself yet. There was no usecase for it.
Yoho May 11, 2024 @ 6:33pm 
Thank you
< >
Showing 1-3 of 3 comments
Per page: 1530 50