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
Thank you very much, thats exactly what I want to show. Programming IC can look difficult, but it is very easy when players can see "what is happening inside of IC on old logic chips".
0
1 alias Switch d0
2 alias LightBW d1
3
4 alias SwitchValue r0
5
6 start:
7
8 l SwitchValue d0 Setting
9
10 s db Setting SwitchValue
11
12 yield
13
14 j start
My very first code that works yay.
Anyone feel free to use it or give tips :)
Perfect, I am glad the tutorial helped, more tutorials soon.
Ps: I dont see yield command :P
Anyway as always you have delivered to the community a very good tutorial, keep up making them.
As a much more advanced topic about IC coding, you can make procedures and functions structuring the program, and above all making it much more readable at least using jump and branch instructions that save the next line of code in the ra register and as last instruction of your function/procedure you jump back to ra value.
To pass parameters to your functions/procedures IC language should offer also a stack to push and pop parameters and eventually ra values if you want deeper function calls, but due to the fact that using the stack in such a way you are inflating the number of loc, you can hit very easy the 128 loc limit.
Just as an example about using functions/procedures I quote one of my scripts that I have coded to input fuel to the furnace. I have used r1 to pass the one needed parameter because I don't wanted to inflate the numbers of loc, and the use of functions procedures are just a way to see if they really works.
This IC program looks really advanced, I will jump into "branches" and other things hopefully in next few weeks. It depends how much time I will have for Stationeers. I dont want to scare new IC programmers yet.
No worries, we will get there one day.
Don't look at my code, as I have written is much more advanced, not suitable to someone who is at his first steps in coding in general, that was just a suggestion to Saddamo for another much more advanced topic eventually in his future tutorials...
What I feel to add to Saddamo current tutorial, is just that IC coding could be much more easy if you put down, and cable it, a logic reader close to the computer, to have a quick check of device variables, maybe also a logic writer could be useful. Just that.
Follow Saddamo he is one of the best tutoring in this game.
You are right, I am always using logic readers or writers to get variables to use in IC code, even there is another way how to get it. Reader or slot reader is the best way how to get what you need, I will include it in the beginning of next tutorial, I think I did mention this way many times when I was streaming Stationeers and doing IC Classes on Twitch.
I promise next tutorial will start little bit different, I will mention this way at the beginning.
Thank you very much one more time.
Totally agree and I do appreciate the advice.