Beispiel #1
0
def prog():
    from bit1.isa import set, clr
    from bit1.isa import mov, not_, and_, or_, xor
    from bit1.isa import nop, delay
    from bit1.isa import jump
    from bit1.isa import if0, if1, ifelse
    from bit1.isa import skip, skipif0, skipif1
    from bit1.isa import halt

    set( O0 )
    clr( O0 )
    mov(  I0, O0 )
    not_( I0, O0 )
    and_( I0, I1, O0 )
    or_( I0, I1, O0 )
    xor( I0, I1, O0 )
    delay(1)
    jump( 0 )
    if0( I0, 0 )
    if1( I0, 0 )
    ifelse( I0, 0, 0 )
    skipif0( I0 )
    #skipif1( I0 )
    skip_( )
    pause( I0 )
    nop()
    halt( )
Beispiel #2
0
def prog():
    from bit1.isa import clr, set, pause, jump
    clr(0)
    pause(0)
    set(0)
    pause(0)
    jump(0)
Beispiel #3
0
def prog():
    from bit1.isa import set, clr, halt
    for i in range(NO):
        j = (i - 1 + NO) % NO
        set(i)
        clr(j)
    clr(NO - 1)
    halt()
Beispiel #4
0
def prog():
    from bit1.isa import nop, delay
    from bit1.isa import mov, not_, and_, or_, xor
    from bit1.isa import jump, if0, if1, ifelse, skipif0, skipif1, skip
    from bit1.isa import pause, halt
    from bit1.isa import out, set, clr
    from bit1.isa import I0, I1, O0, I2
    nop()
    delay(1)
    mov(I0, O0)
    not_(I0, O0)
    and_(I0, I1, O0)
    or_(I0, I1, O0)
    xor(I0, I1, O0)
    jump(0)
    if0(I0, 0)
    if1(I0, 0)
    ifelse(I0, 0, 0)
    skipif0(I0)
    skipif1(I0)
    skip()
    pause(I0)
    set(O0)
    clr(O0)
Beispiel #5
0
def prog():
    from bit1.isa import clr, set, O0
    clr(O0)
    set(O0, jump=0)