Posts

Showing posts from December, 2014

Time-table for online examination

time-table for phase exams

Rules for writing an algorithm

Qualities of a good algorithm Inputs and outputs should be defined precisely. Each steps in algorithm should be clear and unambiguous. Algorithm should be most effective among many different ways to solve a problem. An algorithm shouldn't have computer code. Instead, the algorithm should be written in such a way that, it can be used in similar programming languages. Write an algorithm to add two numbers entered by user. Step 1 : Start Step 2 : Declare variables num1 , num2 and sum . Step 3 : Read values num1 and num2 . Step 4 : Add num1 and num2 and assign the result to sum . sum ← num1 + num2 Step 5 : Display sum Step 6 : Stop  

Rules for drawing a FLOWCHART

Image
Terminator All flowcharts start and end with the terminator or terminal shape. This is a rounded rectangle and is shown below. You use this same shape for both the start and the end. You will see some charts with slightly different terminal shapes. For example, sometimes an oval is used. This is because there is no golden standard for flowcharting. Different companies and different technical areas use different shapes. There are a few basic rules and, beyond that, you can create your own rules for your organization. If you add your own shapes, it is important that you explain what they are used for, so others can understand your chart. Just click on the terminator shape in the stencil and then type in the text.   To read a flowchart, you follow the arrows from shape to shape. To draw a line in RFFlow, click on the line in the stencil at the left and then drag the mouse to draw the line in your chart. It is faster to place all your shapes first and then

MA: (hello world alike) 64-bit

section .data:     input:db'Parashar',10     inputLen: equ $-input section .text     global _start     _start:         mov rax,1     mov rdi,1     mov rsi,input     mov rdx,inputLen     syscall     mov rax,60                ; The system call for exit (sys_exit)      mov rbx,0                ; Exit with return code of 0 (no error)      syscall   [apcoer@localhost ~]$ nasm -f elf64 parashar.asm [apcoer@localhost ~]$ ld -o parashar parashar.o [apcoer@localhost ~]$ ./parashar Parashar

MA: hello world(32 bit)

section .data     hello:db'Hello World',10     hellolen:equ $-hello section .text     global _start     _start:     mov eax,4;     mov ebx,1;     mov ecx,hello     mov edx,hellolen;     int 80h     mov     ebx,0               ;first syscall argument: exit code        mov     eax,1               ;system call number (sys_exit)         int     80h                ;call kernel [apcoer@localhost ~]$ nasm -f elf64 hellwrld.asm [apcoer@localhost ~]$ ld -o hellwrld hellwrld.o [apcoer@localhost ~]$ ./hellwrld Hello World

MA: addition of 2 numbers

section .data     input:db 'enter the number',10   ;        inputLen:  equ $-input           ;                                   ;     display:db 'entered number is:',10   ;        displayLen:  equ $-display       ;     addition:db 'addtion of number is',10;     additionLen: equ $-addition;                                   ; section .bss a resb 3   b resb 3 r resb 3 section .text     global _start _start:     mov rax,1         ;string:enter number     mov rdi,1            ;file discriptor     mov rsi,input        ;input     mov rdx,inputLen     ;lenght of input                          ;     syscall              ; Call the kernel        mov rax,0         ;input     mov rdi,0            ;standard input     mov rsi,a       ;     mov rdx,2          ;read only first two number                          ;     syscall              ;Call the kernel........               mov rax,1         ;string2     mov rdi,1            ;