Questions tagged [pep9-assembly]

This tag is for the latest version of the Pep/9 simulator and assembler. It is used by the textbook "Computer Systems, 5th edition".

Here you can find the Pep/9 Instruction set and Instruction Mnemonics as a PDF.
And there are some Pep/9 video tutorials.

8 questions
1
vote
1 answer

How do I figure out what memory address to store data in Pep/9 when using assembly language compared to machine language?

For the past few months in my class we've been writing programs in Pep/9 in machine language, which made it easy to figure out which memory addresses need to be loaded and used to store data. I'd just write it on paper and count down the addresses…
1
vote
0 answers

Printing string in PEP9 assembly

How do I print a longer string? For example "Hello World". I tried everything but I keep getting some weird characters. I think my main problem is LDBA instructions. LDBA 0x000D,d ;Load byte accumulator 'H' STBA 0xFC16,d ;Store byte…
CBRrider
  • 11
  • 2
0
votes
0 answers

How to make decimal converter in pep\9

I don't know how to make decimal converter in pep/9 The rule is Enter a decimal number to be converted 166 Enter a new base 16 The answer is A6 using this form I can make decimal computer in c But i have no idea what to do in pep\9 anyone please…
18 36
  • 1
0
votes
0 answers

C++ to Pep9 Assembly

I am taking a class that has us using pep9 for assembly. Here is my code: BR main number: .EQUATE 0 ;local variable limit: .EQUATE 10 ;Constant ; main: SUBSP 2,i ;push number STRO …
0
votes
0 answers

Seemingly random "1" showing up when calling STRO in Pep/9 Assembly code

I have written this code in Pep/9 Assembly language: BR main num1: .BLOCK 2 num2: .BLOCK 2 adder: .EQUATE 25 stopper: .EQUATE 0 tester: .EQUATE 75 message: .ASCII "higher\n" ; main: DECI num1,d LDWA …
0
votes
1 answer

How can you square a number in pep9?

I am trying to multiply a number by itself in pep9 to get the square of that number. However, I am not sure how to do it as, if I try adding the number by itself at the end, it will give me a random value. Please help. Code: main1: STRO msg4,d …
0
votes
1 answer

Pep9 Assembly Code - Not getting the right output

I'm writing a program (in PEP9 assembly) which is supposed to output -1 at the beginning, then take a lowercase ASCII character as input, convert it to uppercase, and output it. So far, I have: LDWA 0xFFFF, i DECO 0xFFFF, i LDBA 0xFC15, d STWA…
asavyy
  • 31
  • 1
  • 9
-1
votes
1 answer

Assuming three-bit exponent field and four-bit significand, what is the bit pattern for -8.75 (Based on pep/9 assembly language)

This question is based on computer system pep/9 and I need someone to explain how can I convert this -8.75 number to binary.
K.Tumba
  • 31
  • 2