英语翻译org 0000hLJMP MAINorg 0003hljmp int0org 000Bhljmp timer0
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/07/17 23:32:14
英语翻译
org 0000h
LJMP MAIN
org 0003h
ljmp int0
org 000Bh
ljmp timer0
MAIN:
MOV SP,#60h
mov TCON,#00000001b
mov IE,#10000011b
START:
mov A,#0fh
clr c
MOV R2,#08H
LOOP:RLC A ;左移一位
MOV P1,A ;输出至P0
LCALL DELAY ;延时0.2秒
DJNZ R2,LOOP ;左移7次?
MOV R2,#07H
LOOP1:RRC A ;右移一位
MOV P1,A ;输出至P0
LCALL DELAY
DJNZ R2,LOOP1 ;右移7次?
JMP START
int0:push psw
push a
mov TMOD,#00000001b
mov TL0,#0f0h
mov TH0,#0D8h
mov r2,#3
mov a,#00010000b
clr c
setb tr0
mov p1,a
HERE:cjne r2,#0,HERE
pop a
pop psw
RETI
timer0:
push psw
clr tr0
dec r2
RLC a
mov p1,a
mov TL0,#0f0h
mov TH0,#0D8h
setb tr0
pop psw
RETI
DELAY:MOV R3,#20 ;延时0.2秒
D1:MOV R4,#40
D2:MOV R5,#248
DJNZ R5,$
DJNZ R4,D2
DJNZ R3,D1
RET
END
org 0000h
LJMP MAIN
org 0003h
ljmp int0
org 000Bh
ljmp timer0
MAIN:
MOV SP,#60h
mov TCON,#00000001b
mov IE,#10000011b
START:
mov A,#0fh
clr c
MOV R2,#08H
LOOP:RLC A ;左移一位
MOV P1,A ;输出至P0
LCALL DELAY ;延时0.2秒
DJNZ R2,LOOP ;左移7次?
MOV R2,#07H
LOOP1:RRC A ;右移一位
MOV P1,A ;输出至P0
LCALL DELAY
DJNZ R2,LOOP1 ;右移7次?
JMP START
int0:push psw
push a
mov TMOD,#00000001b
mov TL0,#0f0h
mov TH0,#0D8h
mov r2,#3
mov a,#00010000b
clr c
setb tr0
mov p1,a
HERE:cjne r2,#0,HERE
pop a
pop psw
RETI
timer0:
push psw
clr tr0
dec r2
RLC a
mov p1,a
mov TL0,#0f0h
mov TH0,#0D8h
setb tr0
pop psw
RETI
DELAY:MOV R3,#20 ;延时0.2秒
D1:MOV R4,#40
D2:MOV R5,#248
DJNZ R5,$
DJNZ R4,D2
DJNZ R3,D1
RET
END
org 0000h ;指定程序存放的地址
LJMP MAIN ;转主程序MAIN
org 0003h ;指定程序存放的地址
ljmp int0 ;转中断入口INT0
org 000Bh ;指定程序存放的地址
ljmp timer0 ;转定时中断入口timer0
MAIN:;主程序
MOV SP,#60h ;设栈底60H
mov TCON,#00000001b ;
mov IE,#10000011b ;开中断
START:;开始
mov A,#0fh ;送0F到A
clr c ;清进位
MOV R2,#08H ;送08到R2
LOOP:RLC A ;A带进位左环移
MOV P1,A ;A输出至P0
LCALL DELAY ;延时0.2秒
DJNZ R2,LOOP ;环移R2次
MOV R2,#07H ;R2设为07
LOOP1:RRC A ;A带进位右环移
MOV P1,A ;A输出至P0
LCALL DELAY
DJNZ R2,LOOP1 ;右环移R2次
JMP START ;跳到开始重来
int0:push psw ;中断入口,PSW进栈,保护标志
push a ;A进栈,保护A
mov TMOD,#00000001b,设定时器0为方式1
mov TL0,#0f0h ;设定时器初值
mov TH0,#0D8h ;设定时器初值
mov r2,#3 ;设R2为3
mov a,#00010000b ;A=#00010000b
clr c ;清进位
setb tr0 ;开始定时
mov p1,a ;把A输出至P1
HERE:cjne r2,#0,HERE,;R2不等于0,继续自跳等待
pop a ;A出栈,恢复受保护的A
pop psw ;PSW出栈
RETI ;中断返回
timer0:;定时中断
push psw ;PSW进栈
clr tr0 ;停止定时器
dec r2 ;R2减1
RLC a ;A带进位左环移
mov p1,a ;从P1输出A
mov TL0,#0f0h ;重设定时器初值
mov TH0,#0D8h
setb tr0 ;开始计时
pop psw ;PSW出栈
RETI ;中断返回
DELAY:MOV R3,#20 ;延时0.2秒
D1:MOV R4,#40 ;送40到R4
D2:MOV R5,#248 送248到R5
DJNZ R5,$ ;R5减1,不为0再减,直至为0
DJNZ R4,D2 ;R4减1,不为0,转D2
DJNZ R3,D1 ;R3减1,不为0,转D1
RET ;返回
END
LJMP MAIN ;转主程序MAIN
org 0003h ;指定程序存放的地址
ljmp int0 ;转中断入口INT0
org 000Bh ;指定程序存放的地址
ljmp timer0 ;转定时中断入口timer0
MAIN:;主程序
MOV SP,#60h ;设栈底60H
mov TCON,#00000001b ;
mov IE,#10000011b ;开中断
START:;开始
mov A,#0fh ;送0F到A
clr c ;清进位
MOV R2,#08H ;送08到R2
LOOP:RLC A ;A带进位左环移
MOV P1,A ;A输出至P0
LCALL DELAY ;延时0.2秒
DJNZ R2,LOOP ;环移R2次
MOV R2,#07H ;R2设为07
LOOP1:RRC A ;A带进位右环移
MOV P1,A ;A输出至P0
LCALL DELAY
DJNZ R2,LOOP1 ;右环移R2次
JMP START ;跳到开始重来
int0:push psw ;中断入口,PSW进栈,保护标志
push a ;A进栈,保护A
mov TMOD,#00000001b,设定时器0为方式1
mov TL0,#0f0h ;设定时器初值
mov TH0,#0D8h ;设定时器初值
mov r2,#3 ;设R2为3
mov a,#00010000b ;A=#00010000b
clr c ;清进位
setb tr0 ;开始定时
mov p1,a ;把A输出至P1
HERE:cjne r2,#0,HERE,;R2不等于0,继续自跳等待
pop a ;A出栈,恢复受保护的A
pop psw ;PSW出栈
RETI ;中断返回
timer0:;定时中断
push psw ;PSW进栈
clr tr0 ;停止定时器
dec r2 ;R2减1
RLC a ;A带进位左环移
mov p1,a ;从P1输出A
mov TL0,#0f0h ;重设定时器初值
mov TH0,#0D8h
setb tr0 ;开始计时
pop psw ;PSW出栈
RETI ;中断返回
DELAY:MOV R3,#20 ;延时0.2秒
D1:MOV R4,#40 ;送40到R4
D2:MOV R5,#248 送248到R5
DJNZ R5,$ ;R5减1,不为0再减,直至为0
DJNZ R4,D2 ;R4减1,不为0,转D2
DJNZ R3,D1 ;R3减1,不为0,转D1
RET ;返回
END
ORG 0000HLJMP STARTORG 0040HSTRAT:MOV SP,#60HMOV A,#01HROTAT
英语翻译Tempatkanlah dirimu ditempat yg paling enak Dan jadi org
英语翻译According to an investigation by the National Health Org
英语翻译Policy issues include those attributes that a buying org
英语翻译Chris Argyis and Douglas McGregor point outthat most org
英语翻译‘Consensual’ refers to the domain of interactions of org
英语翻译The theory presented above argues that multinational org
timer0() interrupt 0为什么不行
英语翻译DETR:TN/999-9742976676 ISSUED BY:ORG/DST:TNA/TYO BSP-I E
英语翻译The absence of a strong difference between the axial org
英语翻译the sorrow which has no vent in tears may make other org
英语翻译no fixture org# actual spare total(hk) 序号 家具 总共家具名字如下:1