试题详情
简答题 阅读下面的程序,回答问题 DATA SEGMENT BUF DB '1234' N=$-BUF BCD DB N DUP(?) DATA ENDS CODE SEGMENT ASSUME CS:CODE,DS:DATA START:MOV AX,DATA MOV DS,AX LEA SI,BUF MOV CX,N LEA DI,BCD+N-1 LOOP1:MOV AL,[SI] SUB AL,30H MOV [DI],AL INC SI DEC DI DEC CX JNE LOOP1 MOV AH,4CH INT 21H CODE ENDS END START 取消数据段的BCD存储区,将处理后的数据放回原处,应如何修改程序?
  • 取消数据段的BCD存储区,将经处理后的数据放回原处,修改程序如下:
    DATA SEGMENT
    BUF DB '1234'
    N=$-BUF
    DATA ENDS
    CODE SEGMENT
    ASSUME CS:CODE,DS:DATA
    START:MOV AX,DATA
    MOV DS,AX
    LEA SI,BUF
    MOV CX,N
    LOOP1:MOV AL,[SI]
    SUB AL,30H
    MOV [SI],AL
    INC SI
    DEC CX
    JNE LOOP1
    MOV AH,4CH
    INT 21H
    CODE ENDS
    END START
  • 关注下方微信公众号,在线模考后查看

热门试题