Skip to content

All my exercises for the chapter 13 in the subject CEA201 in university

License

Notifications You must be signed in to change notification settings

dttad/beta-assembly-labworks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

β-Assembly practicing

HitCount contributions welcome

All my exercises for the chapter 13 - Instruction Sets: Addressing Modes and Formats in the subject CEA201 (Computer Organization and Architecture) in university

Usage

Go to BSim Sanbox then click "Open BSIM in a new window".

Threads

1. Interchange two parts from a[1] and a[3].

2. Write a program to do the calculation: a[0]=a[1]+a[2]

3. Divide a[0] by a[1], the integer part stored in a[2], the remaining part stored in a[3].

4. a[0] store the value of minutes. Convert the number of minutes to hour and store in a[1] and store the remaining one in a[2]. (For example: a[0] = 125, then a[1] = 2 and a[2] = 5).

5. a [0] store the value of seconds. Convert the number of minutes to hour and store in a[1] and store the remaining minutes in a[2] and the remaining seconds in a[3]. (For example: a[0] = 3745 then a[1] = 1 and a[2] = 2.

6. If a[1] > a[3], then interchange.

7. Find the minimum value of a[0], a[1] and a[2], the result is stored in a[3].

8. Find the maximum value of a[0], a[1] and a[2], the result is stored in a[3].

9. Check if a[0], a[1] and a[2] are the lengths of the triangle. If it is true, store 1 to a[3], otherwise store 0.

10. Sort a[0], a[1] and a[2] in ascending order.

11. Sort a[0], a[1] and a[2] in descending order.

13. Calculate the sum s = 1 + 2 + ... + a[0] and store it to register r0.

14. Calculate the total number of array elements from a[0] to a[9] and store it to a[10].

15. Find the largest number of array elements from a[0] to a[9] and store it to a[10].

16. Find the largest common divisor of a[0] and a[1] and store it to a[2].

17. Find the smallest common multiple of a[0] and a[1] and store it to a[2].

18. Determine if a[0] is prime number or not. If yes, write 1 to a[1], otherwise write 0.

19. Find the smallest prime number that is greater than a[0], the result is stored in a[1]. (For example, a[0]=8 then a[1]=11).

20. Determine if a[0] is a square number or not. If yes, write 1 to a[1], otherwise write 0.

License

GPL-3.0 © Dat Tran.

About

All my exercises for the chapter 13 in the subject CEA201 in university

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published