Я новичок в языке
пытается реализовать STRCPY
My Assembler «TASM» Ассамблеи возвращает «Illegal Reference Memory» Error .. и попытался прочитать об ошибке, но не смог найти что-нибудь.Illegal Memory Reference
Вот код 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
и вот что говорит Assembler ..
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]
но не работает
Ouch .. Забыл, что [Si] и [Di] являются ячейками памяти ..: s Спасибо :) – geekybedouin