课本第三章例题
例3-1
;p31,例3.1
DATA SEGMENT
;
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE
START:
MOV AX,DATA
MOV DS,AX
MOV AH,1
INT 21H
MOV DL,AL
ADD DL,1
MOV AH,2
INT 21H
MOV AH,4CH
INT 21H
CODE ENDS
END START
例3.2
;p32,例3.2
DATA SEGMENT
STRING DB 'HELLO,WORLD!$'
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
MOV DX,OFFSET STRING ;= lea dx,string
MOV AH,9
INT 21H
MOV AH,4CH
INT 21H
CODE ENDS
END START
例3.3
;p43,例3.3
DATA SEGMENT
BUF DB 9
REAL DB ?
STR DB 9 DUP(?)
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
; LEA DX,BUF
MOV DX,OFFSET BUF
MOV AH,0AH
INT 21H
MOV AH,4CH
INT 21H
CODE ENDS
END START