File: abs.apoo

package info (click to toggle)
apoo 2.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 444 kB
  • ctags: 264
  • sloc: python: 1,954; perl: 67; makefile: 56; sh: 4
file content (15 lines) | stat: -rw-r--r-- 151 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#
#	Implements f(x)=|x|
#	
x:	const 	-11
fx:	mem  	1
	load 	x	r1
	jpos	r1 	fim
	jzero	r1 	fim
	loadn 	-1 	r2
	mul 	r2	r1
fim:	store	r1	fx
	halt