v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing User:Larix/Programming the Maple 6-6

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.


The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 23: Line 23:
 
The % command is "encoded" by the ''absence'' of a minecart in the code loop. There's a mandatory wait period of about 110 steps between commands (otherwise, signals would overlap and produce garbage) and this period is enforced by the code cart's passage over a plate, which disables the next roller on the counting track for the needed time. If there's no cart in the code loop, the signal is not sent and the roller is not switched off. Since in a NOP, no code is executed, this poses no problem and means that a NOP is pure space padding and doesn't consume a significant amount of time.  
 
The % command is "encoded" by the ''absence'' of a minecart in the code loop. There's a mandatory wait period of about 110 steps between commands (otherwise, signals would overlap and produce garbage) and this period is enforced by the code cart's passage over a plate, which disables the next roller on the counting track for the needed time. If there's no cart in the code loop, the signal is not sent and the roller is not switched off. Since in a NOP, no code is executed, this poses no problem and means that a NOP is pure space padding and doesn't consume a significant amount of time.  
  
In each sixth position, the code cart's passage connects an additional roller actually keeping the counter cart on its course. If the roller is off, the cart is directed six steps back. Alternatively, the roller is powered when the "B" register's contents are equal to zero. The "B" register's contents are checked by a four-step "NOR" gate (four gear assemblies in line connected to the plates in the B register's cells - disconnected when the plate is on), and if this gate returns true, a signal is sent that connects the jump roller.  
+
In each sixth position, the code cart's passage connects an additional roller actually keeping the counter cart on its course. If the roller is off, the cart is directed six steps back. Alternatively, the roller is powered when the "B" register's contents are not equal to zero. The "B" register's contents are checked by a four-step "NOR" gate (four gear assemblies in line connected to the plates in the B register's cells - disconnected when the plate is on), and if this gate returns true, a signal is sent that connects the jump roller.  
 
The jump takes place when the roller is off, and the roller is only off if there's no cart in the last program location ''and'' if the "is Register B zero" check returns false.
 
The jump takes place when the roller is off, and the roller is only off if there's no cart in the last program location ''and'' if the "is Register B zero" check returns false.
  
Line 39: Line 39:
  
 
"u" (UND) is the first bank of binary logic operations. The two possible functions AND and NAND require two separate logic arrays, although both take the same inputs and send output to the same adress - AND toggles to NOR and NAND to OR in mechanical logic.
 
"u" (UND) is the first bank of binary logic operations. The two possible functions AND and NAND require two separate logic arrays, although both take the same inputs and send output to the same adress - AND toggles to NOR and NAND to OR in mechanical logic.
 
Both commands write to the same register, and use the same "write to" trigger as the bit-shift and "transfer C->B" and "transfer A->B" commands.
 
  
 
===p===
 
===p===

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

Templates used on this page: