Report 5
Report 5
I. INTRODUCTION:
Assembly language is a low-level programming language for a computer or other
programmable device specific to a particular computer architecture in contrast to most high-
level programming languages, which are generally portable across multiple systems. Assembly
language is converted into executable machine code by a utility program referred to as an
assembler like NASM, MASM, etc.
The main objective of the experiment is-
1. To get familiarize with assembly language.
2. To implement a blink using assembly language programs.
1|Page
Experiment 5
GPRs: ARVs have 32 general purpose registers. They are R0 to R31. And located in the
lower’s location of memory address ($0000 to $001F). They can be used by all arithmetic and
logical instructions.
I/O Registers: I/O registers are dedicated to special functions such as status register, timers,
serial communications, I/O port, ADC etc. For this reason, they are called special functions
registers (SFRs). The function of each I/O register is fixed by the CPU designer as they are
used to control the microcontroller or peripheral functions supported by the microcontroller.
Internal SRAM: Internal SRAM is used for storing data. Each location of the SRAM can be
accessed directly by its address. Each location is 8 bits wide.
Assembly language equivalents for typical traditional microprocessor instructions, along with
a detailed description of the operation called for by the instruction. When writing a
microcomputer program, it is easier and faster to use the abbreviated name rather than the
complete function name.
2|Page
Experiment 5
In order to learn the assembler programming language Microchip Studio AVR was using in
this experiment.
3|Page
Experiment 5
4|Page
Experiment 5
5|Page
Experiment 5
Code for Toggle all 8 bits of Port B forever with some delay between on & off state:
6|Page
Experiment 5
After specified the tools to upload the code, we have started the debugging process. For the
unavoidable reasons we were unable to implement the code on Arduino. But we have used the
simulator tools o simulate it and it was running successfully.
IV. RESULTS
Practical Results:
7|Page
Experiment 5
VI. Conclusion
The learning of assembly language is still important for programmers. It helps in taking
complete control over the system and its resources. By learning assembly language, the
programmer can write the code to access registers and retrieve the memory address of pointers
and values. It mainly helps in speed optimization that increases efficiency and performance.
Assembly language learning helps in understanding the processor and memory functions. If
the programmer is writing any program that needs to be a compiler, that means the programmer
should have a complete understanding of the processor. Assembly language helps in
understanding the work of processors and memory. It is cryptic and symbolic language. The
goals of the experiment were achieved. The knowledge from the experiment will be very useful
resource for further study.
VII. References
[1] cheatsheets/AVR_assembly_programming.md at master · aagontuk/cheatsheets. (n.d.).
GitHub. Retrieved October 27, 2022, from
https://github.com/aagontuk/cheatsheets/blob/master/AVR_assembly_programming.
md
[2] Upload AVR program to Arduino with MicroChip Studio. (n.d.). Arduino Project Hub.
Retrieved October 27, 2022, from https://create.arduino.cc/projecthub/patrick-
fitzgerald2/upload-avr-program-to-arduino-with-microchip-studio-fc1a6e
[3] American International University-Bangladesh. (Fall 22-23.). Familiarization of assembly
language program in a microcontroller: MES Student lab manual 05.
8|Page