0% found this document useful (0 votes)
9 views3 pages

Topics - LC 3 - 102022

Uploaded by

vuhuybao07102002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

Topics - LC 3 - 102022

Uploaded by

vuhuybao07102002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

TOPICS

PROJECT: LC-3 programming


This takes you 10% of overall score on my side
------------------------------------------------------

The requirement for the project:


1. Use subroutines as much as possible
2. Create user interface as clear and beautiful as possible
3. Check range for every value input and output appropriately
4. The program should be organized so well for structure programming
5. The program needs to comment as many as possible
6. Each student must choose only one topic
7. The file .asm of traditional name (StuID_name…) must be submitted to BKel
right before final exam including all supplementing files if you want to make clear
more about the project, such as results output, …
------------------------------------------------------

1. Write a program to input n (input from keyboard) strings of characters with


the length unlimited (it is defined by the program, not by the compiler). Sort
them in descending or ascending order depending on the request input.
Attention:
These strings are sorted in ascending/descending by the order of dictionary
with deleting redundant characters in each string: blank ‘ ‘, comma ‘,’ if they
exist in string.

2. Write a program to manage stack of integers with all operations needed such
as push, pop, check top of stack, …, then do the application of Polish
notation calculator with at least 6 operations such as addition, ….
Attention:
- integers are arbitrary, positive and negative
- You need to look for all operations on stack to solve the application:
push, pop, check full/empty, check to see value on the top, …
- The Polish notation calculator operations: add, substract, multiply,
integer divide, square root, and power.
- Program must display the result to screen.

3. Write a program to manage queue (like stack, but First-In First-Out


structure) of integers with all operations needed such as add node, delete
node, check node, search node, …, then do the application using queue like
normal calculator with at least 6 operations such as addition, ….
Attention:
- integers are arbitrary, positive and negative
- You need to look for all operations for queue.
- the calculator operations include four main operations: add, substract,
multiply, integer divide, and two optional operations: square root, and
power.
- Program must display the result to screen.
Please use Polish notation on the web below and queue to store and
compute:
https://www.techopedia.com/definition/8906/polish-notation-pn

4. Write the program to input a string of characters (subroutine 1), check if this
string has any redundant blank among words, remove them (subroutine 2),
then print it out on the screen of the computer (subroutine 3).
Attention:
- Subroutine 1 is designed without using any TRAP inside, you must use
KBSR, KBDR with the pooling process to input.
- Subroutine 3 is designed without using any TRAP inside, you must use
DSR, DDR with the pooling process to input.
For example:
Input: “ I go to school ”
Output: “I go to school”

5. Write a program to compute value of the following polynomial:


y = a. x^2 + b.x + c + sin(x),
with the numbers input: a, b, c, x, and n (for computing sin(x) = sin(x, n))
Attention:
The subroutines below must be used:
- MULT to multiply numbers
- SUM to sum numbers
- SIN to get the sine of x and n
6. Write the program to input a string of characters including digits, compress
or decompress this string in the following way:
- In compressed result string: each character in each word of the original
string will have the number before expressing the number of occurrences of
that character in the word:
Example: string: AAAAAAaa abc TTTTT => Result: 6A2a 1a1b1c 5T
- In string decompressed: do the process of decompression. For example, the
decompression result of the string "6A2a 1a1b1c 5T" is "AAAAAAaa abc
TTTTT".
Note:
- The input string A accepts only alphabetic characters, numbers and blank.
Compression does not apply to blanks between words of the string.
- The program needs to allow the user to choose the compression or
decompression operation. Output the results to the screen.

7. Write a program to input two sequences of 32 binary digits (‘0’ and ‘1’).
Convert this sequences to IEEE 754 of floating point number of 2 locations
(32 bits) in memory. Write 4 subroutines to compute the sum, difference,
product and quotient of these numbers.
Output the result of each operation above to the screen.

You might also like