//Assign3_2.s
.global _start
_start:
//M 0x4D
//D 0x44
//C 0x43
//L 0x4C
//X 0x58
//V 0x56
//I 0x49
	MOV r5, #0 //for numerical sum
	LDR r0, =string
again:
	LDRB r1, [r0], #1
	CMP r1, #0  //The end null 0 -- terminate
	BEQ stop
	CMP r1, #0x4D
	BEQ M
	CMP r1, #0x44
	BEQ D	
	CMP r1, #0x43
	BEQ C	
	CMP r1, #0x4C
	BEQ L		
	CMP r1, #0x58
	BEQ X	
	CMP r1, #0x56
	BEQ V		
	CMP r1, #0x49
	BEQ I	
//	ADD r0,r0,#1
	B again
	
M:	ADD r5, r5, #1000
//	ADD r0,r0,#1
	B again
D:	ADD r5, r5, #500
//	ADD r0,r0,#1
	B again
C:	ADD r5, r5, #100
//	ADD r0,r0,#1
	B again
L:	ADD r5, r5, #50
//	ADD r0,r0,#1
	B again
X:	ADD r5, r5, #10
//	ADD r0,r0,#1
	B again		
V:	ADD r5, r5, #5
//	ADD r0,r0,#1
	B again	
I:	ADD r5, r5, #1
//	ADD r0,r0,#1
	B again	

stop:
	B stop

	
.data
string:
	.asciz "KIMMEL IS A DOCTOR"  //null 0 padded ASCII
Roman2:
	.asciz "MDCCLXXVI"

.end