Posts

Register and Variable declaration in Assembly Language EMU8086

Image
Here we will know about the Registers we use in Assembly Language and will also know how to declare variable in Assembly Language emu8086 Basically the machine works with the registers. The register stores data or value we want. When we declare variable and store data in it, the machine can not work with the data directly. Behind the scene it actually takes the data in it's internal memory which means it stores data in it's register and then works with this. So, it is better to store data in register when we write program in assembly language. But there is a limitation that the register can not store large amount of data and registers are limited. In assembly language , there are maximum size of 32 bit register. So, when we need to work with large amount of data we have to declare variables and use them. But when we need to run operations with these data we should took them in register one by one. I think you just got a basic idea about registers in assembly lang

How to sort element in assembly language emu8086

Here I will show you how to take user input in an array and sort them in assembly language emu8086 There are many sorting algorithms like insertion sort,selection sort,bubble sort,quick sort,merge sort.In high level language it is easy to use any of these language.But in machine language like assembly it is little bit tough.So here I use a simple and easy sorting algorithm bubble sort.Let's see the code how it works. I can do your all programming assignments. INCLUDE 'EMU8086.INC' .MODEL SMALL .STACK 100h .DATA ARR DB 50 DUP(?) ;declare array .CODE MAIN PROC MOV AX,@DATA MOV DS,AX PRINT "Number of data(1-9): " MOV AH,1 INT 21h AND AL,0FH ; convert ascii value XOR CX,CX ;to set zero MOV CL,AL PUSH CX PUSH CX LEA SI,ARR PRINTN ;print new line PRINTN PRINT "Enter Data: &