The MASM Forum

Miscellaneous => 16 bit DOS Programming => Topic started by: devsmith on May 31, 2021, 07:44:07 PM

Title: data transfer help
Post by: devsmith on May 31, 2021, 07:44:07 PM
Hi everyone, what I want to write in assembly language is that I indicate the presence of the character string "DEVS2070" in an array of N = 96 element which begins at address 0600h and put it in another array which begins at address at 0900h

here is my full program is it correct. otherwise someone can tell me where I was wrong ?   

EXTRA SEGMENT
ARRAY1 DW "DEVS2070"
VAR DB 0H
EXTRA ENDS
CODE SEGMENT
ASSUME CS:CODE,ES:EXTRA
START:
MOV AX,0600H
MOV DS,AX
MOV AX,EXTRA
MOV ES,AX
MOV SI,0000H
LEA DI,ARRAY1
MOV CX,08H
CLD
REPE CMPSB 
JNZ SKIP
MOV AX,0200H
MOV DS,AX
MOV AX,0900H
MOV ES,AX
MOV SI,0000H
MOV DI,0000H
MOV CX,08H
CLD
REP MOVSB
INC VAR
SKIP:
INT 03H
CODE ENDS
END START


Thanks for any help
Title: Re: data transfer help
Post by: jj2007 on May 31, 2021, 09:30:41 PM
Hi devsmith,

Welcome to the forum :thup:

This is ancient stuff, where does it come from? Which assembler do you use, and which error messages does it throw?
Title: Re: data transfer help
Post by: devsmith on May 31, 2021, 11:14:46 PM
yes it is old and it is an 8086 assembler, I find that my program will have a different opinion of the location of the addresses ? i tried it in an emulator i got that it is wrong !
Title: Re: data transfer help
Post by: hutch-- on June 01, 2021, 05:53:53 PM
I moved this so you had a better chance of getting an answer but its ancient code and few would remember stuff this old.