| | |
need help on pep/8 machine language program
![]() |
•
•
Join Date: Nov 2005
Posts: 27
Reputation:
Solved Threads: 0
sorry, i don't know which forum i should post this question.
Q) a machine language program to input 2 numbers then adds 2 numbers then output the single-character result.
this is what i got so far but it doesn't work..any help plz~~
Q) a machine language program to input 2 numbers then adds 2 numbers then output the single-character result.
this is what i got so far but it doesn't work..any help plz~~
Assembly Syntax (Toggle Plain Text)
0000 4900FE ;Get input from the user and store it @ 00FE 0003 4900FF ;Get input from the user and store it @ 00FF 0006 910022 ;Convert second input to decimal 0009 F100FA ;Store second decimal 000C D100FE ;Load first input into memory 000F 910022 ;Convert first input to decimal 0012 7100FA ;Add two numbers 0015 A10020 ;convert sum to character 0018 F1001F ;store the character 001B 51001F ;output the character 001E 00 ; stop 001F 00 ; character to output 0020 0030 ; convert mask to ASCII from decimal 0022 000F ; convert mask to decimal from ASCII Hex Version for the Loader in Pep/8 simulator 49 00 FE 49 00 FF 91 00 22 F1 00 FA D1 00 FE 91 00 22 71 00 FA A1 00 20 F1 00 1F 51 00 1F 00 00 00 30 00 0F zz
•
•
Join Date: Nov 2004
Posts: 20
Reputation:
Solved Threads: 0
I am trying to get this problem worked out but still not able get it right.
0000 4900FE ;Get input from the user and store it @ 00FE
0003 4900FF ;Get input from the user and store it @ 00FF
0006 D100FE ;load first input to memory
0009 910025 ;Convert first input to decimal
000C F100FE ;Store first decimal
000F D100FF ;Load second input into memory
0012 910025 ;Convert second input to decimal
0015 7100FE ;Add two numbers
0018 A10023 ;convert sum to character
001B F100FF ;store the character
001E 5100FF ;output the character
0021 00 ; stop
0022 00 ; character to output
0023 0030 ; convert mask to ASCII from decimal
0025 000F ; convert mask to decimal from ASCII
49 00 FE 49 00 FF D1 00 FE 91 00 25 F1 00 FE D1
00 FF 91 00 25 71 00 FE A1 00 23 F1 00 FF 51 00
FF 00 00 00 30 00 0F zz
My input is:
5
2
Output:
4
Any help would be appreciated.
0000 4900FE ;Get input from the user and store it @ 00FE
0003 4900FF ;Get input from the user and store it @ 00FF
0006 D100FE ;load first input to memory
0009 910025 ;Convert first input to decimal
000C F100FE ;Store first decimal
000F D100FF ;Load second input into memory
0012 910025 ;Convert second input to decimal
0015 7100FE ;Add two numbers
0018 A10023 ;convert sum to character
001B F100FF ;store the character
001E 5100FF ;output the character
0021 00 ; stop
0022 00 ; character to output
0023 0030 ; convert mask to ASCII from decimal
0025 000F ; convert mask to decimal from ASCII
49 00 FE 49 00 FF D1 00 FE 91 00 25 F1 00 FE D1
00 FF 91 00 25 71 00 FE A1 00 23 F1 00 FF 51 00
FF 00 00 00 30 00 0F zz
My input is:
5
2
Output:
4
Any help would be appreciated.
•
•
Join Date: Nov 2006
Posts: 23
Reputation:
Solved Threads: 0
•
•
•
•
I am trying to get this problem worked out but still not able get it right.
0000 4900FE ;Get input from the user and store it @ 00FE
0003 4900FF ;Get input from the user and store it @ 00FF
0006 D100FE ;load first input to memory
0009 910025 ;Convert first input to decimal
000C F100FE ;Store first decimal
000F D100FF ;Load second input into memory
0012 910025 ;Convert second input to decimal
0015 7100FE ;Add two numbers
0018 A10023 ;convert sum to character
001B F100FF ;store the character
001E 5100FF ;output the character
0021 00 ; stop
0022 00 ; character to output
0023 0030 ; convert mask to ASCII from decimal
0025 000F ; convert mask to decimal from ASCII
49 00 FE 49 00 FF D1 00 FE 91 00 25 F1 00 FE D1
00 FF 91 00 25 71 00 FE A1 00 23 F1 00 FF 51 00
FF 00 00 00 30 00 0F zz
My input is:
5
2
Output:
4
Any help would be appreciated.
![]() |
Similar Threads
- Best open free PHP editor (PHP)
- who will convert in to machine language (C++)
- Help with machine language (Assembly)
- machine/assembly language, syntax error (C++)
Other Threads in the Assembly Forum
- Previous Thread: better way or technique to write this
- Next Thread: Help with program to convert hex to dec
| Thread Tools | Search this Thread |





