Intranet Catprocess
  1. news...
  2. about Blackvoxel
  3. download
  4. manual
  5. videos
  6. about us
  1. Nop/Brk/Sleep - Processor and execution control

    Affected Flags
    C V N Z
     
       

    nop : does nothing
    brk : does nothing, stop execution and swith to step mode
    sleep : does nothing, end actual robot time quantum.

    These instructions are various functions about processor execution. These instructions does nothing.
    The nop instruction does nothing. It takes 1 byte and consume 2 execution cycles. It can be used for padding in some situations between two pieces of code. It can be used also for synchronisation for waiting some precise amount of time.
    The brk instruction does nothing then stop execution juste after the brk. If the processor is in continuous running mode, it is switched into step mode.
    The sleep instruction does nothing and terminate the actual time quantum of the virtual machine. The execution will be resumed in the next time quantum. One time quantum is allowed for each robot in each cycle of the MVI engine.

    Forms and variants

    rx = working register

    Form Effect
    not
    does nothing
    brk
    does nothing and goes to step mode
    sleep does nothing and terminate VM time quantum

    Instruction encoding

    D = Working Register
    
    Instruction Op
    Code
    Cycles Encoding
    nop  01 2 00000001
    brk  41 2 01000001
    sleep  81 2 10000001

    Code Examples

    // Example : Todo
    
    
              
     
     
  2. Google+