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!

Noob q. How to output a variable?

Status
Not open for further replies.

xenofoob

Programmer
Oct 4, 2004
28
0
0
NL
Hi everybody,

Me and my mate are busy for school and have to create a simple assembly program.

How do we output a value to the screen. Our value is set in BL and contains 55.

We already print sims text onscreen by using msg.

This is our simple source code:
#make_com#
ORG 100H

MOV BL,0
add BL,1
add BL,2
add BL,3
add BL,4
add BL,5
add BL,6
add BL,7
add BL,8
add BL,9
add BL,10

JMP START

msg DB 'Output: ','$'

START: LEA DX, msg

MOV AH, 9
INT 21h


HLT

Thanks in advance,
Erik.
 
Hi Erik,


move the value to a position in memory

mov bx,[0102h]
mov dx,102
mov ah,9
int 21

c.u. space cowboy

spike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top