我在汇编语言
试图实现STRCPY
我汇编“TASM”初学者返回一个“非法内存引用”错误..并试图读取有关错误,但无法找到任何东西。非法内存参考
这里是ma代码。
include inout.asm
.Model Small,c
.486
.STACK 200h
.DATA
Arr1 DB "ABCD$"
Arr2 DB "EFGHIJ$"
.CODE
StART: MOV AX, @DATA
MOV DS, AX
LEA Si,Arr1
LEA Di,Arr2
again: cmp Byte PTR [Si], "$"
JNE Ite ; Iterate
JMP Done
Ite: MOV Byte PTR[ Di ],[Si] ; Error Here
Inc Si ; One Byte though
Inc Di ; One Byte though
JMP again
Done: MOV Byte PTR [Di], "$"
call puts, offset Arr2
Call puts, offset Arr1
MOV AH,04CH
MOV AL,0
INT 21h
END START
和这里的汇编说什么..
C:\TASM\BIN>tasm /zi /z third
Turbo Assembler Version 3.1 Copyright (c) 1988, 1992 Borland International
Assembling file: third.ASM
Ite: MOV Byte PTR[ Di ],[Si] ; Error Here
**Error** third.ASM(18) Illegal memory reference
Error messages: 1
Warning messages: None
Passes: 1
Remaining memory: 415k
顺便说一句我试过
MOV Byte PTR[DI],BYTE PT[SI]
但没有奏效
哎哟..忘了[硅]和[二]是存储位置..:■谢谢:) – geekybedouin 2013-03-12 18:03:36