Mov A,#30h Mov r0,#40h Mov r1,#42 Loop: Mov @r0, A Inc r0 DJNZ r1, Loop .End
Mov A,#30h Mov r0,#40h Mov r1,#42 Loop: Mov @r0, A Inc r0 DJNZ r1, Loop .End
Mov A,#30h Mov r0,#40h Mov r1,#42 Loop: Mov @r0, A Inc r0 DJNZ r1, Loop .End
.org 0000h
mov a,#30h
mov r0,#40h
mov r1,#42
loop: mov @r0,a
inc r0
djnz r1,loop
.end
LST
.org 0000h
clr a
mov r0,#80h
mov r1,#20
loop: mov @r0,a
inc r0
djnz r1,loop
.end
LST
.org 0000h
mov r0,#35h
mov r1,#60h
mov r2,#10
loop:mov a,@r0
mov @r1,a
inc r1
inc r0
djnz r2,loop
.end
LST
.org 0000h
mov a,#29h
mov r2,a
anl a,#0fh
orl a,#30h
mov r6,a
mov a,r2
anl a,#0f0h
swap a
orl a,#30h
mov r2,a
.end
LST
.org 0000h
mov r1,#00h
mov r7,# 8
mov a,#96h
again: rlc a
jnc next
inc r1
next: djnz r7, again
.end
LST
.org 0000h
mov r0,#40h
mov r1,#5h
mov r4,#00
loop: mov a,@r0
cjne a,#96 ,ahead
mov r4,a
ahead: inc r0
djnz r1,loop
.end
LST
.org 0000h
mov r0,#15h
mov a,r0
mov b,#10
div ab
mov r3,b
mov b,#10
div ab
mov r4,b
mov r5,a
.end
LST
.org 0000h
mov a,#0c0h
add a,#0feh
mov r4,a
mov a,#3bh
addc a,#05h
mov r5,a
.end
LST
.org 0000h
mov a,#0c0h
add a,#0feh
mov r4,a
mov a,#3bh
addc a,#05h
mov r5,a
mov a,#45h
addc a,#0c7h
mov r6,a
mov a,#01h
addc a,#56h
mov r7,a
.end
LST
.org 0000h
mov b,#08h
mov 89h,b
mov tmod,b
.end
LST
.org 0000h
mov dptr, #0100h
mov r0,#20h
mov r1,#03h
movx a,@dptr
loop: mov a,@r0
inc r0
inc dptr
djnz r1,loop
.end
LST
.org 0000h
mov r1,8ah
mov r0,8ch
mov 8ah,@r0
mov 8c,@ r1
.end
LST
.org 0000h
mov dptr,#0200h
mov r0,#04h
mov r1,#12h
loop: mov a,@r1
movx @dptr,a
inc r1
inc dptr
djnz r0,loop
.end
LST
.org 0000h
mov r2,#80h
mov r1,#86h
mov r4,#00
mov a,r2
rlc a
jnc ahead
mov r4,#01h
ahead: mov r2,a
mov a,r1
rlc a
mov r1,a
mov a,r2
add a,r4
mov r2,a
.end .
LST
.org 0000h
mov r2,#81h
mov r1,#87h
mov r4,#00
mov a,r2
rrc a
jnc ahead
mov r4,#80h
ahead: mov r2,a
mov a,r1
rrc a
mov r1,a
mov a,r2
add a,r4
mov r2,a
.end .
LST
.org 0000h
mov a,#36h
mov r0,a
anl a,#0fh
mov r1,a
swap a
add a,r1
mov r1,a
.end
LST
.org 0000h
mov a,#36h
mov r0,a
anl a,#0f0h
mov r1,a
swap a
add a,r1
mov r1,a
.end
LST
.org 0000h
mov a,#06h
mov r0,a
cpl a
xrl a,r0
mov r2,a
.end
LST
.org 0000h
mov r0,#76h
mov r1,#45h
mov a,r0
anl a,#0fh
swap a
mov r2,a
mov a,r0
anl a, #0f0h
swap a
add a,r2
mov r2,a
mov a,r1
anl a,#0fh
swap a
mov r3,a
mov a,r1
anl a,#0f0h
swap a
add a,r3
mov r0,a
mov a,r2
mov r1,a
.end
LST
.org 0000h
mov a,#55h
anl a,#0fh
mov r0,a
.end
LST
Solution:
.org 0000h
mov r0, #2
mov r1, #50h
mov a, @r1
cjne a, 56h, loop
inc r1
mov a, @r1
cjne a, 55h, loop
inc r1
mov a, @r1
cjne a, 54h, loop
mov p1, #'y'
loop: .end
LST FILE
Solution:
.org 0000h
mov dptr, #0100h
mov r7, #100
mov r4, #00h
mov 20h, r2
mov 21h, r3
nxt: movx a, @dptr
cjne a, 21h, lower
sjmp out
lower: jnc out
cjne a, 20h, limit
sjmp out
limit: jc out
inc r4
out: inc dptr
djnz r7, nxt
.end
LST FILE
Solution:
.org 0000h
mov r7, #10
mov r0, #10h
mov r1, #20h
mov r6, #00h
nxt: mov a, @r0
mov b, a
mov a, @r1
cjne a, b, nomatch
inc r6
nomatch: inc r0
inc r1
djnz r7, nxt
.end
LST FILE
Solution:
.org 0000h
mov a, r3
rl a
anl a, #0aah
push acc
mov a, r3
rr a
anl a, #55h
mov r3, a
pop acc
orl a, r3
mov r3, a
.end
LST FILE
Solution:
.org 0000h
movc a, @a+pc
.db 00
.db 01
.db 04
.db 09
.db 16
.db 25
.end
LST FILE
Solution:
.org 0000h
setb p2.7
again: mov c, p1.0
mov p2.7, c
sjmp again
.end
LST FILE
Solution:
.org 0000h
setb p1.7
again: jb p1.7, over
mov p2, #'n'
sjmp again
over: mov p2, #'y'
sjmp again
.end
LST FILE
Solution:
.org 0000h
mov a, #55h
back: mov p1, a
cpl a
sjmp back
.end
LST FILE
Solution:
.org 0000h
clr c
mov a, #00
mov r1, r0
loop: addc a, r0
djnz r1, loop
.end
LST FILE
Solution:
.org 0000h
mov r2, #10
mov r0, #20h
mov r1, #50h
loop: mov a, @r0
mov @r1, a
inc r0
dec r1
djnz r2, loop
.end
LST FILE
Solution:
.org 0000h
mov a, r0
rr a
anl a, #01
xrl a, r0
mov r1, a
.end
LST FILE
Solution:
.org 0000h
mov r1, #8
mov r2, #08h
mov r0, #00h
back: rrc a
jnc next
inc ro
next: djnz r1, back
sub r2, r0
.end
LST FILE
Solution:
.org 0000h
mov r2, #10
mov r0, #50h
mov r1, #70h
mov a, @r0
again: inc r0
mov b, @r0
cjne a, b, loop
loop: jnc next
mov a, b
next: djnz r2, again
mov @r1, a
.end
LST FILE
Solution:
.org 0000h
mov r2, #10
mov r0, #50h
mov r1, #70h
mov a, @r0
again: inc r0
mov b, @r0
cjne a, b, loop
loop: jc next
mov a, b
next: djnz r2, again
mov @r1, a
.end
LST FILE
Solution:
.org 0000h
clr c
clr a
mov r2, #20h
mov b, r0
mov a, @r2
loop: inc r2
addc a, @r2
djnz r0, loop
div ab
.end
LST FILE
Solution:
.org 0000h
push 00h
push 01h
push 02h
push 03h
push 04h
push 05h
push 06h
push 07h
pop 00h
pop 07h
pop 06h
pop 05h
pop 04h
pop 03h
pop 02h
pop 01h
.end
LST FILE
Solution:
.org 0000h
mov a, r5
anl a, #03h
rl a
rl a
mov r0, a
mov a, r5
anl a, #0ch
rr a
rr a
mov r1, a
mov a, r5
anl a, #30h
rl a
rl a
mov r2, a
mov a, r5
anl a, #0c0h
rr a
rr a
add a, r2
add a, r1
add a, r0
.end
LST FILE
Solution:
.org 0000h
mov a, r5
cpl a
anl a, #0fh
mov r2, a
mov a, r5
anl a, #0f0h
add a, r2
mov r5, a
.end
LST FILE
Solution:
.org 0000h
mov r0, #40h
mov a, r1
mov b, #0ah
div ab
mov @r0, b
inc r0
mov b, #0ah
div ab
mov @r0, b
inc r0
mov @r0, a
.end
LST FILE
Solution:
.org 0000h
setb psw.3
clr psw.4
mov r7, #8
back: mov a, @r0
xchg a, @r3
mov @r0, a
inc r0
inc r3
djnz r7, back
.end
LST FILE