Please support our Assembly advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Oct 2009
Posts: 2
Reputation: G_buchCSC is an unknown quantity at this point 
Solved Threads: 0
G_buchCSC G_buchCSC is offline Offline
Newbie Poster

Pep

 
0
  #1
Oct 25th, 2009
This is my first time looking at anything in Pep 8 machine language and i was wondering if someone could help me understand how to do these problems . I am supposed to find the output for each program. I know the answer for the first one but I don't know how to get that answer and on the second one i am completely lost.
I've seen 91 is Bitwise AND instruction and as a convert decimal instruction

first problem
  1. 0000 C1000E; A: = first number
  2. 0003 910010; ?
  3. 0006 F1000D; Store the character
  4. 0009 51000D; Char output
  5. 000C 00; Stop
  6. 000D 00; Character to output
  7. 000E A94F; ?
  8. 0010 FFFD; ?
  9.  
  10. Output:
  11. M


Second problem
  1. 0000 C1000C; A: = first number
  2. 0003 18; ?
  3. 0004 F1000B; store the character
  4. 0007 51000B; chararacter output
  5. 000A 00; Stop
  6. 000B 00; Character to outpute
  7. 0010 F0D4; ?
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 830
Reputation: wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all 
Solved Threads: 94
wildgoose's Avatar
wildgoose wildgoose is offline Offline
Practically a Posting Shark
 
0
  #2
Oct 25th, 2009
Why are you showing us the binary output.
Please show the source code used to generate that binary output or atleast the list file that contains both binary and the source assembly!
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 2
Reputation: G_buchCSC is an unknown quantity at this point 
Solved Threads: 0
G_buchCSC G_buchCSC is offline Offline
Newbie Poster
 
0
  #3
Oct 25th, 2009
this is the format in which they gave me the question:

The question goes like this:
Determine the output of the following Pep/8 machine language program and says that the left column is the memory address of the first byte on the line
Last edited by G_buchCSC; Oct 25th, 2009 at 6:25 pm.
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 830
Reputation: wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all 
Solved Threads: 94
wildgoose's Avatar
wildgoose wildgoose is offline Offline
Practically a Posting Shark
 
0
  #4
Oct 25th, 2009
That part was obvious.
I'm not familiar with PEP8 but am with many other processors.

Use your table lookup and convert the binary back into pseudo source code to make it readable!
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 830
Reputation: wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all 
Solved Threads: 94
wildgoose's Avatar
wildgoose wildgoose is offline Offline
Practically a Posting Shark
 
0
  #5
Oct 25th, 2009
PEP8 doccumentation is NIL!!!

[code]
; 1100 raaa Load register r from memory
0000 C1000C 1100 0011 - 000C LDA FirstNum,d ; A: = first number

; 0001 100r NOT of Register R
0003 18 0001 1000 A = ~A

; 1111 raaa Store byte register r to memory
0004 F1000B 1111 0001 - 000B STA SecondNum ; store the character

; 0101 0aaa Character Output from Operand
0007 51000B 0101 0001 - ; chararacter output
0000
;000A 00 0000 0000 ; Stop

; Stop execution
000B 00 0000 0000 ; Character to outpute

; 1111 raaa Store byte register r to memory
0010 F0D4 1111 0000 - D4 ; ?


SecondNum 000B
FirstNum 000C
;
; aaa
; 000 Immediate
; 001 Direct
; 011 Stack-relative

; r
; 0 Accumulator,A
; 1 Index register,X

[/'code]
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC