View Single Post
Old May 17th, 2006, 7:26 PM   #8
Narue
Professional Programmer
 
Narue's Avatar
 
Join Date: Sep 2005
Posts: 419
Rep Power: 4 Narue is on a distinguished road
>what do i just choose a random memory location
Something like that. You declare enough space.

>Can you demonstate this Narue please.
Oh, very well. This is FASM though, I don't have A86:
format MZ

org	100h
jmp	start

save db 4 dup '$'

start:
	mov	ax,123
	mov	bx,10
	mov	di,2

    convert:
	mov	dx,0
	div	bx
	add	dx,'0'
	mov	[save+di],dl
	dec	di
	test	ax,ax
	jnz	convert

	; Display the result
	mov	ah,09h
	mov	dx,save
	int	21h

	; Finish up
	mov	ah,4Ch
	mov	al,0
	int	21h
__________________
Even if the voices aren't real, they have some pretty good ideas.
Narue is offline   Reply With Quote