2 qq 23828045 qq_23828045 于 2015.06.27 21:29 提问

汇编大作业,难难难难难

求助!打开英文文档,对它进行asc码形式显示。(用汇编语言便希望代码)

1个回答

devmiao
devmiao   Ds   Rxr 2015.06.27 22:57
 DATA SEGMENT 
VALUE1 DB ‘HELLO WORLD’,13,10,'$'
COUNT EQU ($-VALUE1-3)
STR1 DB 'H $'
DATA ENDS

CODE SEGMENT USE16
ASSUME CS:CODE,DS:DATA
START:  
      MOV AX,DATA
      MOV DS,AX
      XOR EDX,EDX
      LEA DX,VALUE1
      MOV AH,09H
      INT 21H
   MOV CX,COUNT 
   LEA SI,VALUE1
LOOP2: MOV BL,[SI]
      CALL DISP
      LEA DX,STR1
      MOV AH,09H
      INT 21H
      INC SI
      LOOP LOOP2
      MOV AH,4CH
      INT 21H
DISP  PROC NEAR
  PUSH CX
  PUSH DS
  PUSH SI
  MOV CH,2
  MOV AL,BL
LOOP1: MOV CL,4
  ROR BL,CL
  MOV AL,BL  
  AND AL,0FH
  CMP AL,10
  JB NEXT
  ADD AL,07H
NEXT: 
  ADD AL,30H
  MOV DL,AL
  MOV AH,02H
  INT 21H
  DEC CH
  JNZ LOOP1
  POP SI
  POP DS
  POP CX
  RET
DISP    ENDP

CODE ENDS
END START
Csdn user default icon
上传中...
上传图片
插入图片