hi all i have some homework that i cant finish cuz i dont know how to print it the way my teacher wants it.. here's the thing

*Print this in debugger

hello
                                                                                                           .
                                                                                                           .
                                                                                                           .
                                                                                                  25 times

in the right of the screen.... this is what i have so far

Microsoft Windows [VersiĆ³n 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  Reservados todos los derechos.

C:\Users\MAURO>cd workspace

C:\Users\MAURO\workspace>debug prue.com
-u100
1841:0100 BA2006        MOV     DX,0620
1841:0103 B402          MOV     AH,02
1841:0105 CD10          INT     10
1841:0107 B80002        MOV     AX,0200
1841:010A 48            DEC     AX
1841:010B 4F            DEC     DI
1841:010C 4C            DEC     SP
1841:010D 41            INC     CX
1841:010E 0D0A24        OR      AX,240A
1841:0111 B409          MOV     AH,09
1841:0113 BA0A01        MOV     DX,010A
1841:0116 B91900        MOV     CX,0019
1841:0119 CD21          INT     21
1841:011B E2FC          LOOP    0119
1841:011D CD20          INT     20
1841:011F 0000

at 010a (12 row) its my chain HOLA
e10a 'hola',0d,oa,'$'

i'm using Windows vista HP and a intel core2 procesor


i dunno how to put the rest of the chains in the same position as the first one... i thought about an increment or printing the interruption with the chain.. plz help i dunno what to do.
and excuse my english i'm not a native english speaker i'm mexican

You need to keep the ASCII text ouside the code flow or it will be treated like code, which it isn't!

You need to modify your code as to something as follows!

MOV	AH,9		; Write String to STDOUT
	mov	DX,Hola
	mov	CX,25

prt:	int	21h		; DOS -Interrupt
	loop prt
	
	int	20h

Hola:	db	'hola',0dh,0ah,'$'

well thnx for the answer but i can't put the string in the dx i tried ur code and pops and error at

mov dx,hola

the error is in the string..

then try offset Hola

or use LEA or something similar!

The idea is the data has to not be in the code flow, and you need to load its address into ds:dx.

Watch the spelling!
Are you doing this in the debugger or an assembler?

If the debugger then you need to mov dx, ####
where #### is the hard coded address of the string!

in ms-dos debugger .. and i think i get it.. save the string and cal its addres in dx right?..

I'm not sure why you aren't using one of the many free assemblers available instead of the ancient 1980 DOS debugger but yes. You'll have to enter your code instructions, then in adjacent memory (or following the code) store the data and set the DX register to point at that string data in memory!

lol ty man u helped me a lot.. and i'm using the old debugger cuz the teacher said we'll be using that until we move to *nix based systems

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.