汇编顺序程序设计

DATA SEGMENT

X1 DB ?

X2 DB ?

Y DW ?

DATA ENDS

CODE SEGMENT

  ASSUME CS:CODE,DS:DATA

MAIN PROC FAR

START:PUSH DS

  MOV AX,0

  PUSH AX

  MOV BX,DATA

  MOV DS,BX

  MOV AL,X1

  MOV BX.X2

  ADD AL,BL

  ADC AH,0

  SAR AX,1

  MOV Y,AX

RET

MAIN ENDP

CODE ENDS

  END START

posted on 2017-11-29 21:10  暗影蔽日  阅读(136)  评论(0编辑  收藏  举报

导航