求助--------为什么会这样?
我编的一个分类统计字符个数的汇编程序,代码如下:; Assembly language program-
; Author:
; Data:
.386
.MODEL FLAT
ExitProcess PROTO NEAR32 stdcall, dwExitCode:DWORD
INCLUDE io.h ;header file for input/out
cr EQU 0dh ;carriage return character
LF EQU 0Ah ;line feed
.STACK 4096 ;reserve 4096-byte stack
.DATA ;reserve storage for data
;**************************************************
prompt1 byte cr,Lf,"Please input the string(less than eighty) :"
string byte 80 dup(?)
prompt2 byte cr,Lf,"The sum of the letter is :"
letterof byte ?
byte cr,Lf,0
prompt3 byte cr,Lf,"The sum of the number is :"
numof byte ?
byte cr,Lf,0
prompt4 byte cr,Lf,"The sum of the other is :"
otherof byte ?
byte cr,Lf,0
;**************************************************
.CODE
_start: ;start of main program code
;**************************************************
startofall:
output prompt1 ;输出提示语句
mov letterof,0
mov numof,0
mov otherof,0
input string,78
mov esi,0
numberif:
mov eax,string[esi]
cmp esi,78
je endfile
cmp eax,00h
je endfile
cmp eax,30h
jl otherof
cmp eax,39h
jg letterif1
inc numof
jmp numberif
letterif1:
cmp eax,41h
jl otherif
cmp eax,5Ah
jg letterif2
inc letterof
jmp numberif
letterif2:
cmp eax,61h
jl otherif
cmp eax,7Ah
jg otherif
inc letterif
jmp numberif
otherif:
inc otherof
jmp numberif
endfile:
output prompt2
output prompt3
output ptompt4
endof: invoke exitprocess,0 ;come out
;**************************************************
PUBLIC _start ;make entry point public
END ;end of source code
但是当我运行的时候怎么老是弹出一个对话框说:
0x00401083指令饮用的0x0080805a内存。该内存不能为read。
不调试请按确定,调试请按取消
到底是哪里的问题呀?
希望大家多多指点。
谢谢了。