📄 ledcycle.a51
字号:
;--------------------------------------------------------------
; LEDCycle.A51 6-7-00 LTH
;
; Check for signs of life on FX2 IO ports
;--------------------------------------------------------------
$NOMOD51 ; disable predefined 8051 registers
$nolist
$INCLUDE (fx2regs.inc) ; *** for the Dallas (Synopsys) part
$list
;
NAME portio
;
ISEG AT 60H ; stack
stack: ds 20
;
DSEG at 20H ; bit-addressable
litebits: ds 1
;
CSEG AT 0 ; absolute Segment at Address 0
LJMP start ; Jump over the interrupt vectors
; -------------------------------------------------
org 1400h
; -------------------------------------------------
start: mov SP,#STACK-1 ; set stack
;
lth: call cycle_lites
sjmp lth
;
cycle_lites: mov dptr,#8000h
movx a,@dptr
call delay
mov dptr,#9000h
movx a,@dptr
call delay
mov dptr,#0A000h
movx a,@dptr
call delay
mov dptr,#0B000h
movx a,@dptr
call delay
mov dptr,#8100h
movx a,@dptr
call delay
mov dptr,#9100h
movx a,@dptr
call delay
mov dptr,#0A100h
movx a,@dptr
call delay
mov dptr,#0B100h
movx a,@dptr
call delay
ret
;
delay: mov r2,#4
dl1: djnz r0,dl1
djnz r1,dl1
djnz r2,dl1
ret
;
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -