| | |
Stuck on a program I am working on, converting a ASCII charchter to 7 Bit
![]() |
•
•
Join Date: Mar 2005
Posts: 1
Reputation:
Solved Threads: 0
Stuck on a program I am working on, converting a ASCII charchter to 7 Bit (MIPS)
0
#1 Mar 24th, 2005
I am working on a program where I need to convert a ASCII charchter to a 7-bit code, eg. 'A' is 65 (decimal) and it would be 1000001
I am not sure how to attack this...
Below is the code I have started with so far, I guess my main question is how do I get the ASCII code entered to a decimal number?
thanks for any help, if there are more details I need to provide just let me know!
I am not sure how to attack this...
Below is the code I have started with so far, I guess my main question is how do I get the ASCII code entered to a decimal number?
Assembly Syntax (Toggle Plain Text)
.text .globl __start __start: # code asking for the input li $v0, 4 la $a0, ch syscall # read string syscall to read in a single charchter and newline charchter la $a0, L li $a1, 3 li $v0, 8 syscall # store the charchter into a register, t1 li $t0, 0 lw $t1, L($t0) sw $tl, L # at this point I am stuck, how do I convert the ASCII charchter to a decimal number? I have no idea where to even start, the book I have has no examples of this... ...program continues The next step I need to do is to take the decimal number and use shifting and msaking to get the value of each bit to convert it to a 7 bit binary code. .text ch: .asciiz "ch? " L: .space 12
thanks for any help, if there are more details I need to provide just let me know!
![]() |
Similar Threads
- multidigit binary to ascii (Assembly)
- My program is skipping some statements. (C)
- C Program help - Conway's Life - Stumped by some errors. (C)
- Permuttations (C++)
- Image Load: MIA (Python)
- First year assigment on reading file, sorting and outputting invoice (C++)
- This program just isn't working for me... (C++)
- Array troubles? (C++)
- Im lost in my program, plesae please help (C)
Other Threads in the Assembly Forum
- Previous Thread: Line Feed issue in assembler using Win XP
- Next Thread: HELP!!how to use MASM 611 compiler?
| Thread Tools | Search this Thread |





