# Thread: Develop subroutines that will convert keyboard input into a real numeric value.

1. ## Develop subroutines that will convert keyboard input into a real numeric value.

Develop subroutines that will convert keyboard input into a real numeric value. Additionally develop a subroutine that will take a numeric value and display it to the terminal window. Test your subroutines by incrementing the inputted value by 1. Your numbers must be able to go up 9999. For example on your monitor window you should see 1567 + 1 = 1568
Note make use of the SDRAM.

-- this is my homework and have no idea how to start it if someone could help.

2. So what type of hardware and operating system (if any) are you using?

Jim

3. We are using the software Quartus and using a DE0-nano board.

4. You're going to need to provide much more information than that. I for one have never heard of Quartus and am unfamiliar with your DEO-nano board along with whatever other hardware may be attached to this board. This is an embedded product that few, other than your classmates, will have access to so you'll need to provide links to the hardware and software you happen to be using.

Jim

5. -- this is what the teacher has given us

test value
store value
count # digits
convert to decimal
#2 digit

test jtag
test value
if 't' entry done
inc counter
store value

************************************************** ********************
movia, r2, JTAG
movi r5, '+'

loopHere:ldwio, r3, 0x(r2)
and r4, 43, 0x8000
beq r4, r0, loopHere

andi r3, r3, 0x0FF

beq r3, r5. entryDone
stw r3. 0x(r7)
br loopHere

entryDone:
movi r8, r4
beq r6, r8, thousand
subi r8, r8, 1
beq r6, r8, hundred
ubi r8, r8, 1
beq r6, r8, tens
ubi r8, r8, 1
beq r6, r8, ones

thousand: ldw r10. 0x(r7)
ldw r10, 0x(r7)
subi r10, r10, 0x30
muli r10, r10, 1000

ldw r11, 0x(r7)
subi r10, r10, 0x30
muli r10, r10, 100