hello Danny Crane and welcome to my
beginner guide to ti100 uh this video is
going to be as spoiler-free as I can
make it it's aimed at the people who
just picked up the game and want to know
what's going on maybe you read the
manual but you're still unsure of what
to do or how to do it uh so let's get
started with basically what is ti100
well it's a fictional computer that you
found in a yard sale or something like
that and you go when you turn it on you
find all of these different segments
have been
uh damaged they lost their programs and
each one of these tests for a different
thing um and it's your job to repair the
computer by rewriting the programs for
each one of these so how do you go about
doing that well basically what you're
doing is you're moving around blocks of
numbers uh in most tests you're going to
have an input and an output and you have
to do stuff with the input numbers and
then output whatever number the test is
testing for so in this one all we're
doing is we're getting an input from
input X and we're writing that same
value to the
output uh and then we have also an a
input and an a output that we have to do
the same thing with um so like I said
you're moving around blocks of numbers
uh when you look at the screen here
you'll see all these different blocks uh
arranged out and these are called nodes
uh most of them are gray in this test
and these are the ones where you can
actually write different codes different
programs uh to be able to move those
blocks of numbers around you'll also see
these red blocks that say communication
failure these are ones you don't have
access to you can't move data through
them you can't get data from them uh
some of them have a debug button when we
click on those we get a little bit of
flavor text a little bit of story uh
each one of the levels I've encountered
has at least one of these communication
failures in them uh and you just have to
work around them to to make the program
work uh you'll also notice that there
are these arrows in between all the
blocks and those are the paths that you
can send those those data blocks those
numbers that you're working with between
the notes uh so you can see I can send
data back and forth between these two I
can try to send it into the com uh the
failed block here but it won't do
anything
um now in this particular test all we're
doing is we're moving numbers so you can
see up here it's using the move command
mov uh whenever you write that uh and
the cursor when the program gets to that
point it's going to look at whatever you
wrote first so if you wrote a direction
say like in this one it says move up
it's going to this block is going to
look at the up arrow for a number and
once it sees one it's going to move it
to the down arrow so it's going to move
it down here and the next one does the
same and the same until it goes to the
output so you can do the same thing over
here so if we do move up uh we can't
send it down because it'll hit the
failed block so instead what we want to
do is send it over to the left right
here so if we write left like that it'll
look up here for a number when the input
gives us a number it's going to send it
to this block over here um now on this
one we would write move right because we
wanted to look at the right arrow over
here and then it's just going to move it
down and then this one we can do match
what's on the other side so we'll do
move up to the
down arrow and then this one we're going
to look at the up arrow and move it to
the
right and then finally we've got move
left down
now when you use the move command it's
going to stop this block until the
receiving block takes it uh so that can
cause some issues further on down the
road for you and some of the more
complicated tests but you can see if I
step through it here we'll step we get a
68 and we get a 51 which are the two
values that it says it's going to give
us here uh this first block it's going
to look up here and send it down here
and then same thing over here it took
that value and moved it to the left
Arrow now this this one's looking over
here for a number uh and it waits until
there's a number there and then it moves
it down and then so on and so on and we
can just go ahead and finish that out by
hitting the run test now when you run it
it actually runs four tests four strings
of numbers uh the first three there we
go uh the first three are going to be
the same every time so test number one
will'll have the same string of numbers
test number two we'll have a new string
of numbers uh test three will again new
set of numbers but each time they'll be
the same the fourth test is a random
test where it gives you random numbers
uh the entire time now that's important
on certain codes that you might write
that won't always work when you get
numbers in a certain order um doesn't
affect too many tests usually you can
write your programs pretty easily um now
when you finish the test if you pass it
uh it will give you a diagnostic report
here um and it'll show you how many
cycles it took to complete the pr
program uh and that's basically each
tick of the clock um so it took 83 uh
ticks in the
slowest uh version of the test to be
able to pass it um I used eight nodes
eight of these blocks to complete the
test and I had eight lines of code each
one of those boxes only had one line of
code a piece so I have eight uh
instructions so now more on to the
different instructions you can use uh go
into the s box here because it doesn't
have any spoilers in it and I wrote on
the side all the different commands that
you will uh encounter in the game uh and
I wrote These in the same order that
they're in the manual so if you want to
read along with that you can uh to get
the manual you just hit the escape
button and there's the view the ti
manual it pulls up a little PDF for you
uh they encourage you to print it out
but I don't have a printer so I didn't
bother with that now the first thing
that comes up in the instructions is the
ACC that stands for the accumulator uh
that can be a target for your move
command uh or a target for your jump and
add commands when we start getting into
the logic and what that actually is is a
place where you can hold a block of data
basically it's right up here in each one
of the nodes uh shows you the current
accumulated value uh so you can do
things like move ACC down for example
and that'll look make the move command
take whatever numberers here and move it
to the down arrow uh you can also have
it be the target so you could say move
the up value to the accumulator instead
so it'll take whatever's coming from the
up arrow and move it into the
accumulator uh the backup Bak is kind of
the same thing uh it's another place
where you can store numbers but the
difference with this one is you can't
Target it directly what you have to do
is send it numbers from the accumulator
uh and when you want to get numbers back
from it you have to send that number
back to the accumulator and I'll talk
that about that later with the Swap and
save command uh nil is the next thing
nil basically mean zero uh whenever you
want to write a zero you can write nil
instead or if you want to clear
something out you can use the nil
command also uh so as an example if I
were to write move 10 to the
right right here and then uh say
move uh five to the right
also and let's say I only wanted the
first number of those sometimes you'll
do a test where you're going to have two
numbers come in and depending on where
the test is running you might only want
the first one or you only might only
want the second one so what you can do
let's say we moved the left value to the
accumulator so it'll save that first
number in the accumulator and we want to
get rid of the five but we want to free
this Noe up uh from delivering it so
what we can write instead is move left
to
nil and what that'll do it'll take the
10 put in the accumulator and now it's
getting a five and when it does the nil
command it makes it disappear it just
makes moves the the left value to
Nowhere uh so it clears up that arrow
and lets the node that was sending that
number move on um you could also do
something like uh
move
nil to the accumulator and when I do
that instead you'll see we get that 10
and that's going to move nil which is
zero in this example and clear out the
accumulator for us so that's how that
works uh now next up is the directions
command
uh you have left up right up and down we
already kind of discussed those that's
the directions that it would look for
send things to with those arrows uh but
there's also a couple other commands
there's the any command so let's say for
example we had this one here and we were
going to get numbers from both this node
and this node and we just wanted to take
whichever one came first so if we did
move any to the accumulator and then
let's say we did uh move 10 down
and then over here we could do something
like uh uh move five
down uh we'll do rather than that let's
do it up here instead we'll do move five
down and then we're going to move up to
the
right so what's going to happen here is
this block when it first hits that line
it's going to look at all of the arrows
going into it and it's going to take the
first number that comes into it so on
the second tick you see we get a 10 on
this Arrow uh nothing on the other so
it's going to move that 10 into the
accumulator uh now it's going to do it
again and it looks and we see a five so
it moves a five to the accumulator and
then we're going to get a 10 so that way
you don't have to write a specific
direction to get a number you can just
let this node that you write it in
except whatever comes into it
first last is kind of similar it only
works if you've already done an any
command uh when you do this I'll step
through it again here so you see the
first number we get is a 10 from the up
Direction and when we move that in the
last updates so you see most of these
say no answer on them but this one the
last time we used any we got a number
from the up and so if I were to say at
this point
move
last to the accumulator now
instead when it hits that it's going to
look only in the direction that we
looked at last for any uh so you see we
got a five and it ignored that now we
have a 10 in the up and it's going to
take it now it's going to do any again
it's going to see the five and now it's
updated again and we see last is now
left instead so it's going to ignore
this until there's another five and so
that's how that works uh next up is the
comments the comments are what you see
on the left side of the screen here um
anytime you have the hashtag Mark right
in front of any anything you write um
you're basically telling the computer to
ignore those those are places where you
can write reminders to yourself on what
different things mean or different
things are um just a handy little way to
kind of keep everything
organized labels labels are used with
the jump commands primarily um they are
basically bookmarks that you can use to
have your code reference when you wanted
to do something uh all labels are
followed by the colon sign like this and
labels can either be a letter like a for
example uh you got to have the colon
right up next to it you could change
that to uh a full word like if we did
start and then have the callon it will
consider that a label um and I'll get
more into how you use labels once we get
down to the jump commands because that's
really where they they come into
play the NOP command uh NOP basically
makes the computer add nothing to the
accumulator so it takes up a clock uh
tick it makes your cycle go a little bit
longer uh but you can use it for timing
different things so if I were to say
move uh 10 to the accumulator and then
write nope and then say move five to the
accumulator just like that I can step
through it you'll see the first tick
move 10 this tick it does nothing and
then it's going to move five into the
accumulator and then so
on and that's how that works I haven't
found a use for that yet in any of the
codes that I've written but I'm sure
there's a reason uh to a good reason to
use it uh the move command we pretty
much already covered completely you've
got the the move and then you have set a
Target be it one of the directions you
could set it to last or any you can also
set it to be the accumulator or a number
that you write yourself and then you set
a direction that you want to send it to
whether you want to send it to any one
of these or the accumulator uh you can
send it there the swap command is a
little a little bit different that's
where we start getting into the backup
values so let's say in this one I have
move 10 to the accumulator and then I
were to write swap uh when it hits that
line what it's going to do is it's going
to swap the values that are in the ACC
and the backup uh so in this example
we'll step through it we get 10 in the
accumulator we do Swap and then we get
10 down in the backup uh so that's one
way to put numbers into the backup and
that's the only way to get numbers out
of the backup too uh so if I were to say
do swap
again just as an example it'll swap it
down and then swaps it back um so that's
useful in certain ones where you don't
want to send the number to a different
block you want to keep it in here uh but
you don't want to change the number if
you start doing any math to it um now
the other way you can get numbers into
the backup is with the save
command so if I wrote save instead what
it's going to do is it's going to get
that accumulated value up to 10 uh cuz
the first line and then it's going to
save that so it's not going to flip-flop
these it's just going to send 10 into
the backup as well or whatever you
happen to have in the
accumulator um that's basically it for
that uh next up is the math commands so
we have ADD uh add basically when you
write add it's going to add whatever
follows into the accumulator so if I
were to say write add 10 right here when
it hits that line of code it's going to
add 10 to the accumulator and then when
it hits it again and again it just keeps
adding to it uh now it doesn't have to
be a number it could also be a Direction
so if I were to say add
left right here and let's say we'll move
two to the right right here and we step
through it this will send two to this
Arrow this one is looking that direction
and whatever comes from the left it's
going to add to the accumulator and so
on uh so you can set it up that way you
can also set it up to be the accumulator
itself so now I can't add the
accumulator to zero because that won't
work but let's say we'll just do uh move
the left to the
accumulator and we can step through it
here so we'll get a two into the
accumulator then it's going to add
whatever that is to itself and we get a
four um that's pretty much it for the
add command uh fairly simple and
straightforward the sub is basically the
same thing so if I were to sub the
accumul ated value we get our two and
then it's going to subtract it from
itself I could also do a number instead
so I could subtract
one so you see we get our two turns it
into a one uh or well basically that's
it for that one
there uh the last one is the uh negate
command NE uh so if we were to move the
left to the
accumulator and then we make it uh a
negative number by doing neeg what'll
happen is we get that value in and then
whatever's in the accumulator it's going
to make it if it's a positive it's going
to turn into a negative just like that
uh if it was a negative number it'll
make it a positive so if I were to say
write another one of these right here we
get our two makes it a negative and then
it can make it back into a positive uh
so that has its uses in certain tests
where you always want to have a positive
or A negative number coming out of a
node you can use the negate
command last up are the jumps uh the
jumps are where you start doing your
actual kind of logic tests basically
these are tests that let you skip steps
in your code normally when you write a
code it's going to step through each one
of the lines one in one at a time until
it hits the end and then it'll jump back
up to the start um well with the jump
command you can skip things so and
that's where labels come in so let's say
I wrote a code here that said started
with start and we'll just say move 10 to
the
accumulator and then we're going to do
uh jump to the start just like that uh
when it hits the jump command it's going
to jump to whatever label you write
afterwards uh and you can see that if I
do say move one to the accumulator down
here and actually run through it we'll
get our 10 into the accumulator and when
it hits the jump it's going to jump
right to the start one uh now it can
jump either backwards or forwards
wherever you want it just jumps to the
label so if I did another label here
called test and let's say move two to
the accumulator just like that and let's
change the location of this jump to the
test instead you'll see when I step
through it it sees the jump to the test
and jumps right down to it that's pretty
much all there is to know about the
regular jump command uh the next one
start getting Into Your Logic so the
first one is this one here JZ uh JZ
stands for jump if it equals
zero so in this test it looks at the
accumulated value and if that number is
equal to zero it will jump to the Target
location if it doesn't equal Zer it'll
just continue on to the next line so you
see in this test here we start off with
10 it checks it and because it didn't
equal zero it moved on to the next one
where it moved one to the accumulator
and moved two to the accumulator and so
on uh now if the test is positive so for
example let's just get rid of this
completely and we can step through it
now our accumulated value is zero this
is true so it's going to jump down to
test uh the next one is Jump if it's not
zero so same idea the difference is it
will only jump if the number is not a
zero so if it's a negative number or a
positive number it will jump so in this
example you'll see it doesn't jump jump
uh but if we were to put back our move
10 to the accumulator up here and then
press start it sees the 10 and jumps
down uh the next one is Jump if it's
greater than zero and along the same
lines it just looks at this number again
and if this the accumulated value is a
one or higher it's going to jump to the
Target location if it does not equal one
or greater if it's a zero or a negative
number it's just going to ignore that
and move to the next
line uh J LZ uh stands for jump if it's
less than zero uh and that's the same
thing but now it's looking for a
negative number so if it sees negative
one or less it will jump if it does not
see that if it sees a zero or a positive
number it'll just ignore it uh the last
one is jro now this one is quite a bit
different uh this one doesn't use labels
uh instead what you do is you write
either a number after it so I could
write say
two like this on there um I could do a
negative number like minus one as
another example um or I could do one of
the directions that you would normally
get a number from so I could do left
right up down any or last if you had a
any command in your code before uh or I
can Target the accumulated value uh and
what it does I'll show you right here
I'll just make it do two uh it looks at
that number and it jumps forward or
backwards in your code that many lines
so if I step through this here when it
hits J2 it's going to go down two lines
to this one uh if I did a negative
number such as negative 1 and then step
through it when it hits that it jumps up
one or however many you write in the
code um if you write a number that is
higher than the number of lines that you
have in that node it will jump to the
very last code so if I were to say jump
to 20 for example well this code doesn't
really show it off too well but you'll
see it jumps to the very last command if
I were to do a negative number that was
higher than the number of lines above it
it would jump to the very top it doesn't
loop back around uh so you don't have to
worry about that now one neat thing
about this is you can do a direction
instead so if I were to do jro up and
let's say we'll move two down right here
when I step through it it looks up sees
a two and will jump two lines of cod
uh so you can have this node do
different things based on what is sent
to it from other blocks other nodes um
that pretty much covers the basics there
um I hope this helps uh didn't cover
everything uh one thing I didn't cover
is the image console uh it's kind of
like a basic paint program in the game
and I also didn't cover any of the stack
memory nodes you don't encounter these
till much later in the game uh they
basically you can send blocks of data to
it and you can get blocks of data out of
it and it'll save uh quite a few in the
order that you send to them so but like
I said you don't encounter those till
actually basically right here the signal
sequence reverser uh so by that time
you'll have a pretty good grasp of
what's going on uh they do talk about
those in the manual so you can take a
look at those and I might do a video on
those later on uh but until next time
Danny Crane