News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

data transfer help

Started by devsmith, May 31, 2021, 07:44:07 PM

Previous topic - Next topic

devsmith

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

jj2007

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?

devsmith

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 !

hutch--

I moved this so you had a better chance of getting an answer but its ancient code and few would remember stuff this old.