jnb p1.0,and_test jnb p1.1,nand_test jnb p1.2,or_test jnb p1.3,nor_test jnb p1.4,xor_test jnb p1.

5,not_test and_test: ljmp and_test1 hr: stop: sjmp stop nand_test: ljmp nand_test1 sjmp hr or_test: ljmp or_test1 sjmp hr nor_test: ljmp nor_test1 sjmp hr xor_test: ljmp xor_test1 sjmp hr not_test: ljmp not_test1 sjmp hr and_test1:

setb p1.2.0 setb p2.7 clr p2.3 setb p1.3 lcall dly1 jb p1.3 clr p1.nxt4 ljmp fail nxt4: clr p1.6.nxt3 ljmp fail nxt3: jb p2.0 setb p1.0 .nxt1 ljmp fail nxt1: jb p1.5.0 clr p1.2 setb p2.1 setb p1.4 setb p1.7 setb p2.1.4 clr p1.1 clr p1.nxt2 ljmp fail nxt2: jb p1.

nxt5 ljmp fail nxt5: jnb p1.7 setb p2.1 setb p1.6.nxt6 ljmp fail nxt6: jnb p1.2.3 call dly1 jnb p1.4 setb p1.nxt7 ljmp fail nxt7: jnb p2.3 lcall dly1 jnb p1.5.3 setb p1.nxt8 ljmp fail nxt8: ljmp success nand_test1: setb p1.0 setb p1.nxt9 .0 setb p2.clr p2.2 clr p2.1.2.2 setb p2.

2 clr p2.5.0 clr p2.0 clr p1.6.nxt13 ljmp fail nxt13: jb p1.3 clr p1.ljmp fail nxt9: jnb p1.6.7 clr p2.nxt10 ljmp fail nxt10: jnb p1.1.nxt11 ljmp fail nxt11: jnb p2.2.4 clr p1.nxt15 .5.1 clr p1.nxt14 ljmp fail nxt14: jb p1.nxt12 ljmp fail nxt12: clr p1.3 call dly1 jb p1.

nxt18 ljmp fail nxt18: jb p1.3 setb p1.0 setb p1.ljmp fail nxt15: jb p2.7 setb p2.nxt20 ljmp fail .0 setb p2.2.4 setb p1.2 setb p2.nxt16 ljmp fail nxt16: ljmp success or_test1: setb p1.3 lcall dly1 jb p1.nxt19 ljmp fail nxt19: jb p2.1 setb p1.6.5.1.nxt17 ljmp fail nxt17: jb p1.1.

nxt23 ljmp fail nxt23: jnb p2.1.nxt21 ljmp fail nxt21: jnb p1.0 clr p2.nxt22 ljmp fail nxt22: jnb p1.0 setb p1.7 clr p2.3 clr p1.5.4 clr p1.2 clr p2.3 lcall dly1 jnb p1.6.nxt24 ljmp fail nxt24: ljmp success xor_test1: setb p1.nxt20: clr p1.1 setb p1.3 .1 clr p1.2.0 clr p1.

4 setb p1.3 lcall dly1 .7 setb p2.2 clr p2.1.2 setb p2.nxt27 ljmp fail nxt27: jnb p2.3 clr p1.1 clr p1.4 clr p1.0 clr p2.7 clr p2.0 setb p2.6.nxt28 ljmp fail nxt28: clr p1.5.nxt25 ljmp fail nxt25: jnb p1.3 lcall dly1 jnb p1.nxt26 ljmp fail nxt26: jnb p1.setb p1.0 clr p1.2.

1 setb p2.7 setb p2.0.5 setb p1.2.1.nxt30 ljmp fail nxt30: jnb p1.5.2 lcall dly1 jnb p1.2 setb p1.nxt32 ljmp fail nxt32: ljmp success nor_test1: setb p1.jnb p1.3.nxt33 ljmp fail nxt33: jnb p1.6 setb p2.6.nxt34 .nxt31 ljmp fail nxt31: jb p2.nxt29 ljmp fail nxt29: jnb p1.1 setb p1.4 setb p1.

6.0.nxt37 ljmp fail nxt37: jb p1.nxt39 ljmp fail nxt39: jb p2.3.nxt35 ljmp fail nxt35: jnb p2.5.nxt40 .1.5 clr p1.4 clr p1.1 clr p2.2 clr p1.2 lcall dly1 jb p1.nxt36 ljmp fail nxt36: clr p1.nxt38 ljmp fail nxt38: jb p1.2.7 clr p2.6 clr p1.ljmp fail nxt34: jnb p2.1 clr p1.

2 setb p1.5.1.nxt43 ljmp fail nxt43: jnb p1.0 setb p1.3 lcall dly1 jnb p1.nxt44 ljmp fail nxt44: jnb p2.nxt46 .4 setb p1.6.nxt42 ljmp fail nxt42: jnb p1.3.1 setb p2.nxt41 ljmp fail nxt41: jnb p1.7 setb p2.0.2.nxt45 ljmp fail nxt45: jnb p2.ljmp fail nxt40: ljmp success not_test1: setb p1.

nxt49 ljmp fail nxt49: jb p1.nxt47 ljmp fail nxt47: jb p1.4 clr p1.nxt52 ljmp fail nxt52: .3 lcall dly1 jb p1.6.nxt50 ljmp fail nxt50: jb p2.1.nxt48 ljmp fail nxt48: jb p1.2.7 clr p2.1 setb p2.nxt51 ljmp fail nxt51: jb p2.ljmp fail nxt46: clr p1.5.3.2 clr p1.0.0 clr p1.

#4fh loop2: mov r3.loop2 ret success: mov a.#00h loop1: djnz r3.#0eh acall cmdwrt acall delay mov a.#38h acall cmdwrt acall delay mov a.#01h acall cmdwrt acall delay mov a.#'W' acall dwrt acall delay .loop1 djnz r2.ljmp success dly1: mov r2.#06h acall cmdwrt acall delay mov a.#80h acall cmdwrt mov a.

7 acall delay clr p2.7 ret .#'R' acall dwrt acall delay mov a.5 clr p2.#'O' acall dwrt acall delay mov a.6 setb p2.mov a.#'G' acall dwrt here: sjmp here cmdwrt: mov p0.a clr p2.#'I' acall dwrt acall delay mov a.#'N' acall dwrt acall delay mov a.#'K' acall dwrt acall delay mov a.

#0eh lcall cmdwrt lcall delay mov a.#0ffh l1: djnz r6.l2 ret fail: mov a.#38h lcall cmdwrt lcall delay mov a.#06h .dwrt: mov p0.5 clr p2.l1 djnz r7.7 ret delay: mov r7.7 acall delay clr p2.6 setb p2.#50 l2: mov r6.a setb p2.#01h lcall cmdwrt lcall delay mov a.

#'R' lcall dwrt lcall delay mov a.#'N' lcall dwrt lcall delay mov a.#'O' lcall dwrt lcall delay mov a.#'O' lcall dwrt lcall delay mov a.#'W' lcall dwrt lcall delay mov a.lcall cmdwrt lcall delay mov a.#'T' lcall dwrt lcall delay mov a.#'I' lcall dwrt .#80h lcall cmdwrt mov a.#'K' lcall dwrt lcall delay mov a.

lcall delay mov a.#'G' lcall dwrt here1: sjmp here1 end .#'N' lcall dwrt lcall delay mov a.

Sign up to vote on this title
UsefulNot useful