帮我写一份汇编代码,文件后缀为.ASM,基于8086架构,题目要求是“利用74LS23驱动发光二极管实现发光二极管L1到L4.L8到L5循环点亮”;”,第一句代码应该为DATAS SEGMENT
时间: 2024-06-02 17:08:07 浏览: 185
DATAS SEGMENT
LED DB 0F0H
DATAS ENDS
CODES SEGMENT
ASSUME CS:CODES, DS:DATAS
START:
MOV AX, DATAS
MOV DS, AX
LOOP:
MOV AL, LED
OUT 01H, AL
MOV BL, LED
SHR BL, 4
OUT 03H, BL
ROL LED, 1
JNC SKIP
MOV LED, 0F0H
SKIP:
MOV CX, 0FFFFH
LOOP $-1
JMP LOOP
CODES ENDS
END START
阅读全文