Author Topic: data transfer help  (Read 394 times)

devsmith

  • Regular Member
  • *
  • Posts: 2
data transfer help
« 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 ?   

Code: [Select]
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

  • Member
  • *****
  • Posts: 11551
  • Assembler is fun ;-)
    • MasmBasic
Re: data transfer help
« Reply #1 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?

devsmith

  • Regular Member
  • *
  • Posts: 2
Re: data transfer help
« Reply #2 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 !

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 8493
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: data transfer help
« Reply #3 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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy: