SASM program examples



; SASM program to print out the alphabet

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

 title pralphabet program

.data

end_letter	db	'z'
one_ch		db	'a'
newline		db	0ah


.code
main:
	put_ch		one_ch
	compareb	end_letter, one_ch
	bez		stop_printing	; when one_ch becomes 'z', done printing
	iadd		one_ch, 1
	br		main			; label main is the top of the loop
stop_printing:
	put_ch		newline

	done

end