Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Let's assign a value to a variable: "define Var 100"
Now the variable "Var" has a value of 100
Let's test to see if this value is less than 50, if it is we want a True condition, a value of "1"
"slt r0 Var 50" would be your command line. In this case, 100 is not less than 50 so the result would be 0. The advantage of true/false returns of 1 or 0 is that we can often turn around and directly use those results to turn on/off a device without additional processing by sending those values directly to a devices "ON" parameter, for example.
"sgt r0 Var 50" would return a true since 100 is greater than 50.
There are plenty of variations for the Set command, you can list these easily in the Functions tab of your IC editor.
Other ways to use these results is to guide a branch condition.
"beqz r0 Start" would return you to the program label "Start" if the return was false.
Hope this gets you moving in the direction you want.
ok fair enough, I was just briefly looking at a website that was explaining how to do an ELSE and I took it as meaning they actually had such operators.
is it fair enough to assume Stationeers MIPS is 100% real MIPS and if I see a tutorial of MIPS that I should be able to do it in Stationeers as well?I also do not know if MIPS gets continuous updates to the syntax, I would assume it does not.
I have seen a recent post where someone was using some command syntax I didn't recognize from that function library so perhaps there is indeed some capabilities beyond what they list, again a Dev would need to chime in here for a more accurate response.
Still, no harm in experimenting as the worst you'll get is an error. I've found the link below a useful tool in developing, though it's lacking the new named batch features that were just introduced.
https://stationeering.com/tools/ic
So I don't think it's fair, or useful, to say stationeers is "not the same as real-world MIPS". In fact, I would say such a statement is quite wrong. MIPS is not a specific set of instructions, for example if you look at a variety of MIPS implementations currently in use at major universities you will see some significant differences. It is a family of implementations based around a common approach of a very reduced instruction set to control a processor. Many of the core instructions used in MIPS in stationeers, are close to if not exactly the same in most MIPS family implementations.
While some good answers to the OPs questions, nobody has touched on an explanation of *why* there is no else. The simple answer is that there *is* else, but that there is no short hand for IF ... ELSE. This is because underneath any IF... ELSE in programming, there are a series of instructions. With MIPS, you are operating at a lower level from high level programming - so you will need to include the logic that, combined, will reach IF.. ELSE.
The following offers a good outline of how jumps (such as IF ... ELSE) can be decomplied and represented in MIPS instructions:
https://fog.ccsf.edu/~gboyd/cs270/online/mipsII/if.html
and even though my orginal post said 'IF ELSE' what I am really looking for is AND.
Last night while trying to go to sleep I got how I would do the AND statement in MIPS as my current MUPS understanding is but it sure would be a lot cleaner if AND operator exstised. Example:
bgt r0 ValueX AND r0 ValueY Go
Go:
Think about MIPS more as the processor is always going to execute the next line, so if you don't want that - you need to do something.
If you take AND in the traditional sense, it's a *boolean* or *binary* operation, in c notation | or || are actually slightly different, for example.
So if you want AND functionality, you need to prepare the binary yourself. Which is, actually, what the compiler will be doing in a higher level language when you use such syntax in programming. If you study the instructions involved in, say, a simulator when using c# or C++ you can see how programming *commands* turn into many *instructions* for the CPU.
yup that is what I figured but I was not sure.
I would like to know most of the operators before I start so that I do not get code overly messy.
Until I found it I was too intimidated to even try to use IC10 chips.
Hope this helps.
https://www.youtube.com/playlist?list=PLZFLVIAJ1exr5lI94EUwrqbN1ck1wVIa3
So if you're doing a command of "AND" between the values of 0 and 1, the question is are you doing this operation to a single bit (0 and 1), or are you getting a result between the ANSI code value of "0" and "1", which is 00110000 and 00110001 (and is it just the last 4 or all 8 bits)?
I haven't tested this part out yet and have limited my programming to using the "Set Register" option to avoid these headaches. I am eager for some proper documentation on what's happening under hood with these operations.
https://steamcommunity.com/games/544550/announcements/detail/3681176566145924827
at least for now I am good.
I created what I needed so until much later in the game it appears I know enough to do what I want.
So, the air blows into a radiator system connected to my greenhouse, then blows it back out once a temp threashold is set.
Why? because given the moon if you leave gas in the pipe system eventually you will have Phase and broken pipes.
I know i know, 'create a cooling system using Pol and Chambers'...no
Thanks for the reply, I still look forward to the StationPedia being updated vs having to remember which update announcement displayed these especially since that sub-forum doesn't appear to be searchable. And that bitwise is 8 bits, polarity + 7 bits, 4 bits? I'd like to assume 8 bits (1 byte) or do I get 64 bits on my x64 Windows system?