invalid use of register?
TITLE
;store A*B random char(41h-5ah) in ArrayAB
;then display them
INCLUDE c:\irvine\irvine32.inc
.data
A=20
B=11
ArrayAB byte A dup(B dup(0))
;iterate A times,in every A iterate that iterate B times
;to create a array,first B-1 generate random char then leave
;the orignal 0 to make a array
.code
main proc
call randomize
;record B iterate
mov edx,B
mov ecx,A*B
mov esi,0
L:
;when edx=0 a B array is filled with random char
;then jump to the 0
dec edx
cmp edx,0
jz Next
mov eax,1aH
call randomrange
add eax,41H
mov al,byte ptr eax
mov ArrayAB[esi],al
jmp Outentrance
Next:
mov edx,11
Outentrance:
inc esi
Loop L
mov edx,offset ArrayAB
call writestring
exit
main endp
end main
1>------ 已启动生成: 项目: masmtest, 配置: Debug Win32 ------
1>Assembling...
1> Assembling: f:\MyDocument\Document2.asm
1>f:\MyDocument\Document2.asm(30) : error A2032: invalid use of register
1>Project : error PRJ0019: 工具从"Assembling..."
1>生成日志保存在“file://e:\正在学习\VisualStudio2005\masmtest\Debug\BuildLog.htm”
1>masmtest - 2 个错误,0 个警告
========== 生成: 0 已成功, 1 已失败, 0 最新, 0 已跳过 ==========