Questions tagged [pep8-assembly]

Questions regarding the PEP/8 CPU used for instructional purposes by the iTunes U course "Computer Systems". Not to be confused with the PEP8 Python coding standard.

Documentation on the PEP/8 architecture can be found at:

https://code.google.com/p/pep8-1/

There is an open-source (GPLv3) development environment which includes an assembler, simulator, and debugger. Binary builds for Mac, Windows, and Linux are available for download on the book's web site.

Use the debugger to single-step your code an examine registers / memory.

There's also a simpler stand-alone simulator, and a cache simulator that simulates cache hits/misses.

43 questions
0
votes
0 answers

CPA in assembly language. How CPA and Accumulator works?

According to the book , In the assembly language, opcode CPA compares the operand in the memory and the data in the accumulator. I want to know how the instruction CPA affects A register(accumulator) BR main NUM1: .block 2 NUM2: .block 2 MSG1:…
0
votes
0 answers

I am supposed to write an assembly level program that prints my name using the LDBA instruction with direct addressing in Pep 9

So in Pep 9 there is an example of a way to print out the .ascii "hi". ;File: fig0433.peph ;Computer Systems, Fifth edition ;Figure 4.33 LDBA 0x000D,d ;Load byte accumulator 'H' STBA 0xFC16,d ;Store byte…
IRedSonI
  • 1
  • 1
  • 2
0
votes
1 answer

Linked list containing char Pep/8

Good morning, I am trying to make a linked list which must contain a char for each node. So first the teacher provided us a code. This code creates a linked list where we can put numbers. Then we must change the code to output the numbers in order…
Rekch
  • 143
  • 1
  • 1
  • 9
0
votes
2 answers

How do you make a comment in Pep8

How do I add a comment to my Pep8 code?
0
votes
1 answer

PEP/8: Performing addition on 4 bytes hexadecimals

I'm really new to PEP/8 and am having a bit of a hard time for a practice lab for my course. The goal is to ask user to input 2 hexadecimals to add or substract under the form HHHH+FFFF or HHHH-FFFF (no other input is accepted) According to my…
0
votes
2 answers

Stack Relative Addressing - Explanation and issue

I'll try to keep the preamble short. Yes, this is essentially "help me with my college homework", but I am super stuck on this (we're on hour 10, here). Objective - write an assembly program that takes a character as input and outputs that character…
0
votes
1 answer

Pep8 - Base 2 to Base 10 converter

I am developing a so called simple pep8 program, that converts a base 2 number into base 10. Below are the requirements: Ask for user input in base 2 Convert the base 2 value into decimal and output that. Finally loop and ask user if they want to…
APPAPA
  • 25
  • 1
  • 6
0
votes
1 answer

Pep/8 Assembly Carriage Return clear?

I have a code that I've been testing in Pep/8 Assembly, that takes an input of a character ><= and does comparisons. Once the comparisons are complete and the appropriate mathematical operation is done, I want to have the program prompt the user for…
0
votes
1 answer

Finding if a number is divisible by another number in PEP8

I'm aware that division and multiplication themselves aren't doable in PEP8 so I would like to know how to find out if a number is perfectly divisible by another number. As an example I need to determine if a given year, any year, is a leap year. To…
0
votes
1 answer

Why is ASLX required when reading values from INT array

Trying to get some better understanding of working with integer arrays and came across this issue. Q: When simply printing elements of my array and I don't use ASLX I get unexpected results, but when I use ASLX I get expected results. How does ASLX…
J Man
  • 121
  • 1
  • 12
0
votes
2 answers

Assembly Language Program to Print First Name

I am trying to write an assembly language program that prints a first name--e.g., Thomas. It is supposed to use the .ASCII pseudo-operation to store the characters at the bottom of the program, and the CHARO instruction to output the characters.…
0
votes
1 answer

PEP-8 - Checking to See if Word is a Palindrome

I have the input sorted out for the palindrome program but I haven't got the slightest idea of how to check whether the inputted word is a palindrome or not. ; Program to read name and output greeting BR main name: .BLOCK 32…
0
votes
0 answers

Negative value is causing an oddity with the accumulator

This is a short "calculator" program I wrote while learning assembly. I am running into an issue when there is a negative value being stored in answer. For example, if I input A 10 S 1 Q into Pep/8, I get a 9 as the answer in the end, as expected.…
0
votes
1 answer

Assembly, comparing two chars

I'm stuck with this problem: I want to compare two char with their to know which one come first in alphabetic order (ascii position). So I do something like this: LOADBYTEA string,x; it loads in the accumulator A, a byte from the string at …
Gregory
  • 19
  • 1
  • 8
0
votes
1 answer

pep8 binary to decimal

I got stuck on this assignment: Write a program in object code that will convert a 3-bit binary number to a decimal number. For example, if input is 101, output should be 5; if input is 011, output should be 3. This is my code so far: 49 00 50 -…
Zile
  • 21
  • 1
  • 9