
; SASM program to print out n X's, where n is given its value in the
; declarations section.

.486
.model flat, stdcall
.stack 1000h
include sasmacros.inc

 title nXs program

.data

n			dd	10
ch_X		db	'X'
newline		db	0ah


.code
main:
	compare	n, 0
	bez		stop_printing	; when n hits 0, all done printing X's
	put_ch	ch_X			; print 1 X
	isub	n, 1
	br		main			; label main is the top of the loop
stop_printing:
	put_ch	newline

	done

end
