一个基础问题
我写了一段输出字符串的代码,但是在要输出的字符串之前总是有很多乱码,请大家帮帮我代码如下:
;COUNT
;*********************************************
.MODEL small
.stack 100h
;*********************************************
DATA SEGMENT
student_number DB 0
below60 DB ?
to6070 DB ?
to7080 DB ?
to8090 DB ?
above90 DB ?
average Dw ?
account DW 60 dup(?)
;point DB '.'
message1 DB 'input the number of the students$'
anotherline DB 10
message2 DB 'number result'
DATA ends
;*********************************************
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
;---------------------------------------------
begin proc far
call read
begin endp
;---------------------------------------------
;accept name
read proc near
MOV AX,DATA
MOV DS,AX
lea dx,message1
mov ah,09
int 21h
mov dl,anotherline
mov ah,02
int 21h
;input the number of the student
mov ah,0ah
lea dx,student_number
int 21h
;give the format
lea dx,message2
mov ah,09
int 21h
mov dl,anotherline
mov ah,02
int 21h
;input number result
ret
read endp
;*********************************************
CODE ends
end begin