hexadecimal to decimal ->beginner needs help

wampsi's Avatar
Newbie Member
Hello, i'm new to this forum. I have an assignment to do:
to convert an hexadecimal numbers to decimal numbers. I have the program, but i'm trying to understand it.
There's some parts of code i don;t understand and i can't find in the net what does it mean.

.data 			;data segment

    row1 db 'Insert hexademical number: $'
    row2 db 13,10,'demical number: $'
    number db 5, 0, 5 dup (0) ; 4 numbers (like FFFF) + ENTER symbol 13


Could you tell me how to understand
db 5, 0, 5 dup (0) and
db 13,10

I'm totally new in ALP, so i would be very grateful if anyone could help me
DaWei's Avatar, Join Date: Dec 2006
Team Leader
db means 'define bytes'. It's a method of labeling a memory area and ititializing its contents. dup means to repeat the following definition the indicated number of times. db 13, 10 defines the ASCII values for a carriage return (CR) and a line feed (LF). This is a common line ending from the days of teletype machines. Some modern systems use line feed only (called a newline), some use a carriage return only, and some still use both. You can't possibly hope to mess around with assembly language without some documentation. Invest some time reading it.
wampsi's Avatar
Newbie Member
Thank you
capot's Avatar, Join Date: Apr 2010
Newbie Member
hi, i just joined this forum. i have an assignment to convert hex to dec in mips. i have to take a programming class before i graduate. could i have a copy of your program. you'll be doing me a huge favor.
capot's Avatar, Join Date: Apr 2010
Newbie Member
pls help with the code to convert hex to dec in MIPS. my email address is bolods@gmail.com