Showing posts with label exam. Show all posts
Showing posts with label exam. Show all posts

Wednesday, 28 May 2014

Microprocessor lab external-1

       I have already explained in my previous blog post about how my microprocessor lab external was but now I would like to just write the program I had got in the exam so that I can recall easily later whenever necessary.
     The question I had got was : Write an alp to perform block interchange of data.
The solution goes like this :
Data segment 
X db 01h,02h,03h,04h,05h
Y db 11h,12h,13h,14h,15h
Data ends
Code segment
Assume cs:code,ds:data
Start:mov ax,data
         Mov ds,ax
         Mov cx,05h
         Lea si,x
         Lea di,y
Up:mov bl,[si]
      Mov al,[di]
      Mov [si],al
      Mov [di],bl
      Inc cx
      Inc dx
      Dec cx
      Jnz up
      Mov ah,4ch
      Int 21h
Code ends
End start

Saturday, 26 October 2013

Prevention is always better than cure

                   Proverbs are always 100% true at any and every point of life.One such proverb which I have come across a lot from childhood is "Prevention is always better than cure."Isn't it very true???
Why let something happen and then make it alright.When you know that 'something'(negative incident) is going to happen,try to prevent it then and there rather than searching or preparing a solution after it has happened.
                  I have learnt a lot of times that it is always better to take precautions.Right from something small to something really BIG.The most common and basic is of studies.Studying during normal days is like taking precautions and it is always better than cure.By cure,I mean studying during the exam days.It is always better to study before the exams than during the exams.During the exams just do the revision.
                That was a simple example but there are lot more examples and many more in my life itself.But I really have learnt it perfectly today and will definitely implement the lesson of preventing before something might happen than curing it after it has happened.