view samples/sort.tp @ 362:7101ad443081

Add null terminator to string literals in x86 module and fix a bug that interfered with use of function name labels in call instructions
author Michael Pavone <pavone@retrodev.com>
date Sat, 25 Apr 2015 13:05:38 -0700
parents fb54a3af9c86
children
line wrap: on
line source

#{
	main <- {
		a <- #[1 2 3 4 5 6 7 8 9]
		b <- #[9 8 7 6 5 4 3 2 1]
		c <- #[1 3 5 7 9 2 4 6 8 10]
		d <- #[10 8 6 4 2 9 7 5 3 1]
		a sort
		print: (a join: " ") . "\n"
		b sort
		print: (b join: " ") . "\n"
		c sort
		print: (c join: " ") . "\n"
		d sort
		print: (d join: " ") . "\n"
	}
}