Mobile payment system project has lots of advanced accessibility features to facilitates users with a user-friendly as well as flexible interface. When ever user chooses to launch Mobile payment system project, he will be asked for credentials and after that he is logged on to a window.
Where he is asked to select which option or service he would like to access. Upon choosing we will be presented with a list of the particular service bill details. If the user selects the options provided on the screen given he is instantly provide with the information pertaining to that particular service. Some of the most unique features of Mobile payment system are accessing the data at the server and retrieving the data from the database. You can easily post your questions here.
Facebook Like. Twitter Tweet. Be a part of the DaniWeb community. Sign Up — It's Free! Reply to this Topic. This topic is old! No one has contributed to this discussion in over 11 years. Are you sure you have something valuable to add to revive the existing conversation? Consider starting a new topic instead. Otherwise, please be thoughtful, detailed and courteous, and adhere to our posting rules.
Edit Preview. I tried speaking with my teacher, and after waiting 30 minutes for him to finish speaking to another gaggle of students in my class about something from another one of his classes, and not this one I finally got it! I was able to get the program to return the hex value of the ascii char that was pushed on the keyboard, but it only worked if each remainder was 0 through 9.
It wouldn't display the A through F, and instead used colons, semicolons, etc But character A for hex 10 doesn't start until 40h.
Your logic for base 10 conversion looks good: each remainder from dividing by 10 will give you a digit, and they will be ordered from the least significant digit to the most significant one, so you need to reverse the obtained digits before printing them.
Pushing them to a stack and popping them when done will do the reversing in a nice and compact way. For converting to hex, the operation is the same: divide by 16, get the remainder, reverse, and print. However, there are a few things to note: dividing by 16 is shifting right 4 bits.
Remainder is value AND 0fH , so you don't actually need any arithmetic operations. Bit shifts and AND operation is sufficient. Moreover, you don't even need to involve the stack. You can do this from most significant nibble four bits to the least significant one, and print as you calculate them. The second thing that you seem to be struggling with is converting a nibble to a hex digit. Simply adding 30h is not enough. It is good enough for decimals, but for hex values, you've got the numbers 10 to 15 as well.
Alternatively, you can put the digits '0' to '9' and 'A' to 'F' in a table, and index them by the value of the nibble you want to print. You may also want to write a routine that will read a number from input. Read each digit until you read a newline, convert character to decimal value, and update an accumulator that will keep the number you've read. You will need to use this for both hex and decimal output functions. Write your program in C or some other language first.
Now remember the remainders modulo from dividing by ten is something between to display this somewhere in ascii you need to add 0x30 as you mentioned. As vhallac mentions though you can mask and shift instead of using the divide operator. Once you have the "program" working in C or some other language, at a low level using basic operations add, sub, divide, shift, and, or, etc then re-write that code in assembly language.
Eventually you may get to the point where you dont need to prove out your program in some other language and start with asm. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?
Collectives on Stack Overflow. Learn more. Asked 9 years, 8 months ago. Active 8 years, 5 months ago.
0コメント