; ARM code for sasm.c V1.00 3/2/07
; Copyright 2008 Jeffrey Lee
; This file is part of WOUM.
; WOUM is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
; WOUM is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.
; You should have received a copy of the GNU General Public License
; along with WOUM.  If not, see <http://www.gnu.org/licenses/>.

	GET	bindings.s

OS_EnterOS	EQU	&16

	AREA	sasm_s, CODE, READONLY

	EXPORT	sasm_getcpuid

	FBEGIN sasm_getcpuid,1
	SWI OS_EnterOS
	MRC P15,0,R0,C0,C0,0
	MSR CPSR_c,#0
	MOV R0,R0
	MOV PC,R14

	END
