Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

COLLEGE OF ARTS AND SCIENCES

SCHOOL OF COMPUTING
UNIVERSITI UTARA MALAYSIA

SESSION 2 2022/2023 (A222)

STIK2024 COMPUTER SYSTEM ARCHITECTURE

ASSIGNMENT 3 (GROUP)

PREPARED FOR
DR FAZLI BIN AZZALI

PREPARED BY
NO NAME MATRIC NO
1. NUR AIN SYAFIQAH BINTI ABD RAZAK 280437
2. NUR NAJIBAH ATIQAH BINTI ABDUL AZIZ 281986
3. REANDRA AMANARGYA ARISTISABHA TRIWIBOWO 283673
4. KIREINQ SHAFIRA HIDAYAT 276436

SUBMISSION DATE
8th JULY 2023
INTRODUCTION
The goal of Assignment 3 is to develop a deeper understanding of CPU operations, with an
emphasis on two components in particular: the CPU's instruction set in assembly language and
how instructions are executed in machine cycles. We used the EMU8086 chipset simulator, a
piece of software that enables a computer to simulate the behaviour of another device, to aid in
this learning process.
We choose to use the Hello, world assembly code example for our assignment because
it provides a clear illustration of how to print "Hello World!" by writing directly to video
memory. We used this code as a starting point to explore and test various changes, which helped
us understand concepts about CPU operations and instruction sets.
To begin, we made several notable changes to the original code. Firstly, we renamed
the file as "assignment-3-group-b" to provide a more descriptive and relevant name for our
modified code. Next, we modified the message displayed by the code. Instead of the generic
"hi-world" greeting, we change it for a more personalized approach. Our new message, " Hello!
We are Group B from STIK2024 class :) ", showcases our group's identity and affiliation,
making the code more relevant to our assignment. Furthermore, we decided to enhance the
visual appeal of the output by adjusting the colour scheme of the characters and their
background. By altering the colour codes in the code, we transformed the original light red
(1100) on yellow (1110) scheme to light blue (1001) on light green (1010). This change
allowed us to create a visually pleasing appearance for the printed message. Finally, we added
a beep sound after each character was printed. By adding specific instructions, we triggered a
beep sound to play alongside the visual output. This beep sound modification involved utilizing
the BIOS interrupt function and assigning the appropriate ASCII value for the beep sound
character.
In summary, Assignment 3 presented us with the opportunity to deep more into CPU
operations and instruction sets using the EMU8086 simulator. We selected the Hello, world
assembly code and made four key modifications, including renaming the file, changing the
displayed characters, adjusting the colour scheme, and incorporating a beep sound. These
modifications allowed us to gain practical knowledge and insight into the intricacies of CPU
operations, furthering our understanding of the subject matter.
1. EMU8086 AS SIMULATOR

Figure 1: Interface of EMU8086 simulator

EMU8086 is a software-based emulator that enables users to simulate the actions of an Intel
8086 CPU. It offers a virtual environment where students and programmers may study and
practise assembly language programming that is especially made for the 8086 architectures.
The emulator simulates the operation of the 8086 CPU, including its registers, flags,
memory regions, and execution of instructions. EMU8086 enables hands-on learning and
comprehension of low-level programming ideas with capabilities including code editing,
assembly, debugging, and step-by-step execution.

EMU8086 is a user-friendly and valuable emulator that permits the simulation of the
8086 microprocessors. It is a useful tool for learning assembly language programming and
getting hands-on experience with the 8086 architectures.
2. ACTUAL “HELLO, WORLD” ASSEMBLY CODE

Figure 3. Output of unmodified Hello, world


assembly code

Figure 2. Unmodified Hello, world assembly code on EMU8086


3. MODIFIED HELLO, WORLD CODE

Figure 4. Rename file.

Figure 6. Change characters colour and it’s


background.

Figure 7. Add beep sound for each


character using loop.

Figure 5. Change characters.


Figure 8. Full modified code
continue code…
Result of Assembly Code Modification

Figure 9. Screenshot Process of Printing Changes Message Characters.

Figure 10. Screenshot Process of Printing Characters with Customize Colour Scheme.

Figure 11. Result of Code Modification.


CONCLUSION
In conclusion, the assignment allowed us to delve into CPU operations and instruction sets
using the EMU8086 simulator. Starting with the "Hello, world" assembly code, we made
important changes like renaming the file, customising the message, changing the colour
scheme, and including a beep sound. These modifications improved our comprehension of
CPU operations and instruction sets while enabling a more interesting and attractive output.
The EMU8086 simulator proved to be a very useful tool because it offered a user-friendly
interface and a virtual setting for experiential learning and gaining useful knowledge. Overall,
the assignment's goals and the EMU8086 simulator's features enabled us to learn more about
CPU operations and instruction sets.

Modified Code File: assignment-3-group-b.asm


Presentation Link:

You might also like