发表于:2004/12/25 16:03:00
#0楼
各位:以下是我的红绿灯程序,由于没有仿真程序,所以不知道对不对,或者有什么地方不够好的,请大家帮忙看看。如果有空请给一下注释,让我看看我的和您的是不是一样
NETWORK 1
LD SM0.1
MOVD &VB20, VD4
MOVB 33, VB12
MOVB 0, VB11
MOVW +10, VW8
MOVB 19, VB10
MOVW 16#2121, VW20
MOVW 16#2121, VW22
MOVW 16#2101, VW24
MOVW 16#2101, VW26
MOVW 16#1111, VW28
MOVW 16#0C0C, VW30
MOVW 16#0C0C, VW32
MOVW 16#0C08, VW34
MOVW 16#0C08, VW36
MOVW 16#0A0A, VW38
NETWORK 2
LD SM0.0
TON T37, VW8
NETWORK 3
LD T37
INCD VD4
INCB VB11
R T37, 1
NETWORK 4
LD SM0.0
MOVB *VD4, VB12
NETWORK 5
LDB> VB11, VB10
MOVD &VB20, VD4
MOVB 33, VB12
MOVB 0, VB11
NETWORK 6
LD SM0.0
MOVB VB12, QB0
NETWORK 1
LD SM0.1
MOVD &VB20, VD4
MOVB 33, VB12
MOVB 0, VB11
MOVW +10, VW8
MOVB 19, VB10
MOVW 16#2121, VW20
MOVW 16#2121, VW22
MOVW 16#2101, VW24
MOVW 16#2101, VW26
MOVW 16#1111, VW28
MOVW 16#0C0C, VW30
MOVW 16#0C0C, VW32
MOVW 16#0C08, VW34
MOVW 16#0C08, VW36
MOVW 16#0A0A, VW38
NETWORK 2
LD SM0.0
TON T37, VW8
NETWORK 3
LD T37
INCD VD4
INCB VB11
R T37, 1
NETWORK 4
LD SM0.0
MOVB *VD4, VB12
NETWORK 5
LDB> VB11, VB10
MOVD &VB20, VD4
MOVB 33, VB12
MOVB 0, VB11
NETWORK 6
LD SM0.0
MOVB VB12, QB0