File: cpl.s

package info (click to toggle)
tkisem 4.5.12-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 964 kB
  • ctags: 1,372
  • sloc: cpp: 4,844; tcl: 3,047; asm: 1,991; makefile: 335; ansic: 269; sh: 155
file content (25 lines) | stat: -rw-r--r-- 233 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

	!
	! cpl -- character per line
	!

start:
	! read a number from the console
	ta	5

	ba	test
	mov	%r8, %r9
	
top:	
	srl	%r9, 4, %r9
	add	%r8, '0', %r8
	ta	1

	set	'\n', %r8
	ta	1

test:	cmp	%r9, 0
	bne	top
	and	%r9, 0xf, %r8

	ta	0