Skip to content

AlanBuric/assembly-x86-exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

assembly-x86-exercises

This is a collection of my solutions for the x86 assembly language exercises at my college for my Computer Architecture class. I wrote them in the EMU8086 microprocessor emulator, with comments and naming in the Croatian language.

Exercises

I don't have the exercises with me anymore, so here are the assumed descriptions of the exercises:

  1. ???

  2. ???

  3. ???

  4. Decide and print whether 8 is greater than 10

  5. Print '3' in a new line 10 times

  6. Enter 5 characters into a string variable, then print the string in the next line

  7. Enter a sequence of 10 numbers, print it back in a new line with numbers separated by spaces, then in the next line print the minimum and maximum number of the sequence, each in a new line.

  8. Enter a sequence of 10 numbers and print it back sorted using any algorithm. I used the Selection Sort O(n^2) algorithm.

  9. Same as 8., but Bubble Sort.

  10. Enter a sequence of numbers until zero is entered, then print the amount of even numbers entered.

  11. Enter a sequence of numbers until zero is entered, then print the amount of odd numbers entered.

  12. Convert any byte (ASCII character, in this example 231) and print its hexadecimal representation.

  13. Fill a buffer of at most 254 input characters and print them back in hexadecimal representation.

  14. Enter a sequence of up to 10 numbers or until '0' is entered, then print back the numbers that have set bits 2, 4 and 5 (bit mask 00110100).

  15. Enter a sequence of up to 16 numbers or until '0' is entered, push the odd numbers to the stack and print them in reverse order.

Homeworks

  1. DZ5 - Z1: Print 'Hello world!'

  2. DZ5 - Z2: Selection Sort algorithm

  3. DZ5 - Z3: Enter 5 characters and print them back each in a new line.

  4. DZ5 - Z4: Using a macro, input 5 characters.

  5. DZ6 - Z3: Enter any amount of characters until the Enter character is entered, then print whether any non-zero characters were entered.

  6. DZ6 - Z4: Store any number in BX and print its hexadecimal representation.

  7. Z10: Enter a single character and print it in a new line.

  8. Z11: Print the letters from 'A' to 'E', each in their own line.

  9. Z12: Enter three single-digit numbers and print out the largest among them.

External resources

About

My solutions for the x86 assembly language exercises at my college.

Topics

Resources

License

Stars

Watchers

Forks