8086吧 关注:106贴子:356
  • 1回复贴,共1

[求助] [汇编]【交通灯】求大神帮我注释一下程序

只看楼主收藏回复

;====================================================================
; Main.asm file generated by New Project wizard
;
; Created: 周五 十一月 30 2018
; Processor: 8086
; Compiler: MASM32
;
; Before starting simulation set Internal Memory Size
; in the 8086 model properties to 0x10000
;====================================================================
;SAMPLE.ASM
.MODEL SMALL
.8086
.stack
.code
.startup
mov dx,0206h
mov ax,80h
out dx,ax
mov dx,0200h
mov ax,0ffh
out dx,ax
s1: mov ax,0beh
out dx,ax
call delay5
mov cx,6
lp: mov ax,0bfh
out dx,ax
call delay05
mov ax,0beh
out dx,ax
call delay05
loop lp
mov ax,0bdh
out dx,ax
call delay3
mov ax,0ebh
out dx,ax
call delay5
mov cx,6
lp1:mov ax,0fbh
out dx,ax
call delay05
mov ax,0ebh
out dx,ax
call delay05
loop lp1
mov ax,0dbh
out dx,ax
call delay3
jmp s1
delay5 proc near
push cx
mov bx,250
dy1:mov cx,5882
dy2:loop dy2
dec bx
jnz dy1
pop cx
ret
delay5 endp
delay05 proc near
push cx
mov bx,25
dy3:mov cx,5882
dy4:loop dy4
dec bx
jnz dy3
pop cx
ret
delay05 endp
delay3 proc near
push cx
mov bx,150
dy5:mov cx,5882
dy6:loop dy6
dec bx
jnz dy5
pop cx
ret
delay3 endp
.data
END


1楼2018-11-30 12:42回复
    精通8086,找我就对了


    IP属地:安徽来自iPhone客户端2楼2018-12-04 11:10
    回复