fCPU Tutorial 4 - Conditionals / Control Flow
Channel: BLU12 Gaming
Date: 2022-01-17

In this tutorial I go over all of the conditional & control flow statements in fCPU; such as Jumping, Testing, Branching, and Blocking.


You can find the blueprint for this tutorial here:
https://factorioprints.com/view/-MtcY4Ta7JAZrat-jwnz

fCPU Tutorial Playlist:
https://www.youtube.com/watch?v=wPzs028MRkE&list=PLUS7abK0FzfUuL9Aurv9HbTBQqIfAzQfw


Sections:

Flow Control 

0:29 Labels

1:19 jmp (Jump)

2:48 lea (Load Effective Address)


7:34 Testing Functions

8:45 Test by Value

10:17 Test by Type


12:08 Branching Functions


15:06 Using jmp to skip over blocks of code

16:34 Using offsets with jmp

18:40 Blocking Functions

19:13 bkg/bkr (Block until at least # of signals on green/red wire)

20:34 A command right after a blocking statement will execute in the same game tick

23:14 btg/btr/bti (Block until a Type of signal appears on green/red/both wire)

25:42 btgc/btrc/btic (Block until a signal shared in both a register and green/red/both wire changes its value)


28:09 What will be covered in the next few videos