For a little JAVA tutorial, I made this site for you…
http://www.geocities.com/phengpheng15/index.html
MSG DB ‘Yap$’
MSG2 DB ‘Grainne$’
MOV CX, 3
LEA si, MSG
LEA di, MSG2
recur:
MOV AL, [si]
MOV [di], AL
INC si
INC di
DEC CX
JNZ recur
mov al, ‘$’
MOV AH, 09
LEA DX, MSG2
INT 21H
INT 20H
Another way of doing this code at the same time conscious about memory usage daw[coded by Niel]
MSG DB ‘Yap$’
MSG2 DB ‘Grainne$’
mov cx, 3 ; counter for REP instruction
lea si, MSG ; string to be copied
lea di, MSG2 ; where to copy
cld ; clear directrion flag
rep movsb ; store byte from si to di
mov al, ‘$’ ; the NULL terminator. remember?
mov [di], al ; terminate the new string
mov ah, 09 ; print function
lea dx, MSG2 ; string to be printed
int 21h ; call DOS
int 20h ; exit to DOS I tried opening command rather than cmd for my assembly code, but still I’ve waited for a long time and failed to assemble my code. I was told by Niel that it might be because of other issues, for the code assembled properly in his machine. What other issues it might be, I’ll still know about them. As for now, I was told that the output of my assembly code is ‘Yapinne’. I still need to modify this code, because I intend to display ‘Grainne Yap’. I’ll just keep you posted soon!