



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Information for microprocessor
Typology: Assignments
1 / 7
This page cannot be seen from the preview
Don't miss anything!
Time ( min) Content Learning Aid / Methodology Faculty Approach Typical Student Activity Skill / Competency Developed. 10 Relevance and significance of Problem statement Chalk & Talk , Presentation Introduces, Explains Listens, Participates, Discusses Knowledge, intrapersonal 10 Explanation of Problem statement Chalk & Talk , Presentation Introduces, Facilitates, Explains Listens, Participates, Knowledge, intrapersonal, Application 20 Concept of Negative and Positive numbers Demonstration, Presentation Explains, Facilitates, Monitors Listens, Participates, Discusses Knowledge, intrapersonal, interpersonal Application 60 Implementation of problem statement N/A Guides, Facilitates Monitors Participates, Discusses Comprehension, Hands on experiment 10 Assessment N/A Monitors Participates, Discusses Knowledge, Application 10 Conclusions Keywords Lists, Facilitates Listens, Participates, Discusses Knowledge, intrapersonal, Comprehension
Installing NASM: If you select "Development Tools" while installed Linux, you may NASM installed along with the Linux operating system and you do not need to download and install it separately. For checking whether you already have NASM installed, take the following steps: Open a Linux terminal. Type whereis nasm and press ENTER. If it is already installed then a line like, nasm: /usr/bin/nasm appears. Otherwise, you will see just nasm: , then you need to install NASM. To install NASM take the following steps: Open Terminal and run below commands: sudo apt-get update sudo apt-get install nasm Assembly Basic Syntax: An assembly program can be divided into three sections: The data section The bss section The text section The order in which these sections fall in your program really isn’t important, but by convention the .data section comes first, followed by the .bss section, and then the .text section. The .data Section The .data section contains data definitions of initialized data items. Initialized data is data that has a value before the program begins running. These values are part of the executable file. They are loaded into memory when the executable file is loaded into memory for execution. You don’t have to load them with their values, and no machine cycles are used in their creation beyond what it takes to load the program as a whole into memory. The important thing to remember about the .data section is that the more initialized data items you define, the larger the executable file will be, and the longer it will take to load it from disk into memory when you run it. The .bss Section Not all data items need to have values before the program begins running. When you’re reading data from a disk file, for example, you need to have a place for the data to go after it comes in from disk. Data buffers like that are defined in the .bss section of your program. You set aside some number of
bytes for a buffer and give the buffer a name, but you don’t say what values are to be present in the buffer. There’s a crucial difference between data items defined in the .data section and data items defined in the .bss section: data items in the .data section add to the size of your executable file. Data items in the .bss section do not. The .text Section The actual machine instructions that make up your program go into the .text section. Ordinarily, no data items are defined in .text. The .text section contains symbols called labels that identify locations in the program code for jumps and calls, but beyond your instruction mnemonics, that’s about it. All global labels must be declared in the .text section, or the labels cannot be ‘‘seen’’ outside your program by the Linux linker or the Linux loader. Let’s look at the labels issue a little more closely. Labels A label is a sort of bookmark, describing a place in the program code and giving it a name that’s easier to remember than a naked memory address. Labels are used to indicate the places where jump instructions should jump to, and they give names to callable assembly language procedures. Here are the most important things to know about labels: Labels must begin with a letter, or else with an underscore, period, or question mark. These last three have special meanings to the assembler, so don’t use them until you know how NASM interprets them. Labels must be followed by a colon when they are defined. This is basically what tells NASM that the identifier being defined is a label. NASM will punt if no colon is there and will not flag an error, but the colon nails it, and prevents a mistyped instruction mnemonic from being mistaken for a label. Use the colon! Labels are case sensitive. So yikes:, Yikes:, and YIKES: are three completely different labels. Assembly Language Statements Assembly language programs consist of three types of statements: Executable instructions or instructions Assembler directives or pseudo-ops Macros Syntax of Assembly Language Statements [label] mnemonic [operands] [;comment]
In this practical session we learnt how to write assembly language program and Accept and display array in assembly language.
Upon completion Students will be able to: ELO1: Accept the string from the user and display the same string.