예제 #1
0
파일: pause.py 프로젝트: phanrahan/bit1
def prog():
    from bit1.isa import clr, set, pause, jump
    clr(0)
    pause(0)
    set(0)
    pause(0)
    jump(0)
예제 #2
0
파일: prog.py 프로젝트: phanrahan/bit1
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( )
예제 #3
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)
예제 #4
0
파일: test_bit1.py 프로젝트: phanrahan/bit1
def main():
    from bit1.isa import mov, jump, I0, O0
    mov(I0, O0)
    jump(0)
예제 #5
0
파일: and.py 프로젝트: phanrahan/bit1
def prog():
    from bit1.isa import and_, jump, I0, I1, O0
    and_( I0, I1, O0 )
    jump( 0 )
예제 #6
0
파일: not.py 프로젝트: phanrahan/bit1
def prog():
    from bit1.isa import not_, jump
    for i in range(NI):
        not_(i, i)
    jump(0)
예제 #7
0
파일: ripple.py 프로젝트: phanrahan/bit1
def prog():
    from bit1.isa import not_, if1, jump
    for i in range(NR):
        not_(i, i)
        if1(i, 0)
    jump( 0 )
예제 #8
0
def prog():
    from bit1.isa import mov, jump
    for i in range(NI):
        mov(i, i)
    jump(0)
예제 #9
0
def prog():
    from bit1.isa import or_, jump, I0, I1, O0
    or_(I0, I1, O0)
    jump(0)