view samples/hash.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 2a0463c46913
children
line wrap: on
line source

#{
	main <- {
		print: "hash of 'foo' is " . ("foo" hash) . "\n"
		print: "hash of 'bar' is " . ("bar" hash) . "\n"
		print: "hash of 'foobar' is " . ("foobar" hash) . "\n"
		print: "hash of 1 is " . (1 hash) . "\n"
		print: "hash of 2 is " . (2 hash) . "\n"
		print: "hash of 3 is " . (3 hash) . "\n"
		print: "hash of 1u32 is " . (1u32 hash) . "\n"
		print: "hash of 2.0 is " . (2.0 hash) . "\n"
		print: "hash of 3f32 is " . (3.0f32 hash) . "\n"
	}
}