Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi. I'm kinda new in assembler so h

Status
Not open for further replies.

Nightsoft

Programmer
Aug 23, 2001
50
0
0
DK
Hi. I'm kinda new in assembler so here's my quetion:

I want to write some text to the screen and I think I'm doing it in a stupid way.
What I want to write is Nightsoft. starting at row c column 24-2C
this is how my code starts:


MOV AX,0200
MOV BX,0000 /* goto XY(0C,24)
MOV DX,0C24
INT 10

MOV AX,094E
MOV BX,0017 /* Write 'N'
MOV CX.0001
INT 10

MOV AX,0200
MOV BX,0000 /* goto XY(0C,25)
MOV DX,0C25
INT 10

MOV AX,0949
MOV BX,0017 /* Write 'I'
MOV CX.0001
INT 10

This code get's pretty long and I wonder if there is some easier way to do it. Some Loop or something. But I really don't know how to put it together.

I'm using Debug. and my code is NOT being executed under DOS
So no DOS Interrupts.

Hope some one can help me. :)
Thnx.

Real programmers use machine code :)
 
Using Debug: at a place the IP never reaches (usually behind the last instruction) you can define data:

db 'Nightsoft$'

db : "define byte"
'$' : end-of-string sign (for use with DOS)

This can be used with DOS interrupts but if you have the string somewhere in memory, you can easily create a loop and use INT 10h.
Regards,
Bert Vingerhoets
vingerhoetsbert@hotmail.com
Don't worry what people think about you. They're too busy wondering what you think about them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top