FIRST SEMESTER ASSEMLY STUDENT
This should be a very simply exercise but can't get the desired result.
I define a string, then I want to grab that string, move it to a different location then display the string.
I create the program in edit and save as an XXX.asm
Next use MASM to create an LST and OBJ file.
Run the program under debug and single step the instructions using the T, trace command.
ALL THE INSTRUCTIONS EXECUTE, BUT THERE IS SOME ADDRESS OFFSET PROBLEM (I THINK). When I hit 'P' after getting to the first INT 21 I get a bunch of characters I don't want before and after I see the data I want displayed.
I am willing to call anywhere in the US to talk to somebody live if needed to figure this one out.
; ET 488 - March 05, 2002

page 60,132
TITLE A06MOVE Segments for an .EXE Program
;-----------------------------------------------------------
STACK Segment PARA STACK 'STACK'

DW 32(0)

STACK ENDS
;-----------------------------------------------------------
DATASG SEGMENT PARA 'DATA'
DTA DB 'KEN'
DTB DB 3 DUP(0),'$'

DATASG ENDS
;-----------------------------------------------------------
CODESEG SEGMENT PARA 'CODE'
MAIN PROC FAR
ASSUME SS:STACK,DSATASG,CS:CODESEG
MOV CX,03
LEA SI,DTA
LEA DI,DTB
BACK: MOV AL,[SI]
MOV [DI],AL
INC SI
INC DI
LOOP BACK
MOV AH,09
LEA DX,DTB
INT 21H

MOV AX,4C00H
INT 21H

MAIN ENDP
;End of procedure
CODESEG ENDS ;End of segment
END MAIN ;End of program