IGNO PRACTICAL PROGRAMES Simple Assembly language programs

:
1. Write a program to add two numbers present in two consecutive memory location and store the result in next memory location. Prg(add2num.asm) Title add two numbers in consecutive memory location dosseg .model small .stack .data msg1 db 13,10,"Sum of two numbers stored in memory:$" num1 db 20h num2 db 15h sum db ? res db 20 DUP('$') .code main proc mov ax,@data mov ds,ax mov al,num1 add al,num2 mov sum,al lea dx,msg1 mov ah,09h int 21h mov dl,sum mov ah,02h int 21h mov ax,4c00h int 21h main endp end Output: Sum of two numbers stored in memory:5

2. Develop program to read a character from console and echo it. Prg(rdecho.asm) Title read a character from console and echo it. dosseg .model small .stack .data msg1 db 13,10,"Enter a character:$" msg2 db 13,10,"Read a character from console and echo:$" .code main proc mov ax,@data mov ds,ax lea dx,msg1 mov ah,09h int 21h mov ah,01h int 21h mov bl,al lea dx,msg2 mov ah,09h int 21h mov dl,bl mov ah,02h int 21h mov ax,4c00h int 21h main endp end Output: Enter a character:w Read a character from console and echo:w

3. Develop and execute a program to read 10 chars from console. Prg(rd10chr.asm) Title read a 10 character from console. dosseg .model small .stack .data msg1 db 13,10,"Enter a 10 character:$" .code main proc mov ax,@data mov ds,ax lea dx,msg1 mov ah,09h int 21h mov cx,00 mov cl,10 rpt: mov ah,01h int 21h mov bl,al loop rpt mov ax,4c00h int 21h main endp end Output: Enter a 10 character:1234567890

stack .09h int 21h .msg2 mov ah.09h int 21h mov dl.10.data msg1 db 13."First value in memory:$" msg5 db 13.10."After using XCHG instruction:$" msg4 db 13."First value in memory:$" msg2 db 13."Second value in memory:$" value1 db 35h value2 db 32h . Write a program to exchange two memory variables using MOV and XCHG instruction.10.al . Can you do it with just XCHG? Prg(XCHGin.value1 mov ah.4.msg1 mov ah.exchanging the value mov al.value1 XCHG value2.02h int 21h lea dx.@data mov ds."Second value in memory:$" msg3 db 13.msg3 mov ah.09h int 21h mov dl.ax lea dx.10.model small .value2 mov ah.al mov value1.02h int 21h lea dx.10.asm) Title to exchange two memory variables using MOV and XCHG instruction dosseg .code main proc mov ax.

value2 mov ah.09h int 21h mov dl.lea dx.msg4 mov ah.value1 mov ah.09h int 21h mov dl.02h int 21h lea dx.msg5 mov ah.02h int 21h main endp end Output: First value in memory:5 Second value in memory:2 After using XCHG instruction: First value in memory:2 Second value in memory:5 .

msg1 mov ah.09h int 21h mov ah.ax lea dx.10."Enter first number:$" msg2 db 13.10.'0' mov num1."Result:$" num1 db ? num2 db ? sum db ? res db 20 DUP('$') .'0' mov bl. Write a program which will read two decimal numbers.@data mov ds.09h int 21h . Prg(mul2dec. and finally print out the result (in decimal).al lea dx.code main proc mov ax.5.data msg1 db 13.10.09h int 21h mov ah.al mov ax."Enter second number:$" msg3 db 13.asm) Title read two decimal number and multiply them and store it in result dosseg .stack .model small .msg2 mov ah.01h int 21h sub al.msg3 mov ah.num1 mul bl mov sum.al lea dx.00 mov al.01h int 21h sub al. then multiply them together .

mov dl.sum mov ah.4c00h int 21h main endp end Output: Enter first number:2 Enter second number:2 Result:♦ Enter first number:7 Enter second number:5 Result:# .02h int 21h mov ax.

msg1 mov ah.0Fh mov cl. Prg(pkdbcd.10.data msg1 db 13.al mov ax."Enter the first number:$" msg3 db 13.00 mov ah.'0' mov bl.00 mov ah.6.01h int 21h sub al.bl mov bcd.cl or al.asm) Title convert the ASCII code to bcd equivalent dosseg .0Fh and al.'0' and bl."Result of packed bcd:$" bcd db ? first db ? sec db ? res db 20 DUP('$') .10. Write a program to convert the ASCII code to its BCD equivalent.01h int 21h sub al.stack .code main proc mov ax.09h int 21h .04h rol bl.msg3 mov ah.model small .09h int 21h mov ax.ax lea dx.@data mov ds.al lea dx.

02h int 21h mov ax.00 mov dl.bcd mov ah.4c00h int 21h main endp end OUTPUT: Enter first number:35 Result of packed bcd:05 .mov dx.

"Sum in decimal number:$" num1 db ? sum db ? res db 20 DUP('$') .@data mov ds. which will read in two decimal inputs and print out the sum.01h int 21h sub al.7.10.msg2 mov ah.sum call hex2asc .al lea dx. Prg(desum.asm) Title read 2 decimal number and print there sum dosseg .num1 mov sum. Write a program.'0' mov num1. in decimal.msg3 mov ah.09h int 21h mov ah.data msg1 db 13.offset res mov ax.01h int 21h sub al.00 mov al.code main proc mov ax.stack .09h int 21h mov ah.10.'0' add al.al lea dx."Enter second number:$" msg3 db 13.ax lea dx.10."Enter first number:$" msg2 db 13.09h int 21h mov si.model small .msg1 mov ah.

al loop rpt2 inc si mov al.00h mov bx.00 div bx add dl.4c00h int 21h main endp hex2asc proc near push ax push bx push cx push dx push si mov cx.res mov ah.'0' mov [si].09h int 21h mov ax.'$' mov [si].al rpt2: pop ax inc si mov [si].lea dx.0Ah jge rpt1 add al.'0' push dx inc cx cmp ax.0Ah rpt1: mov dx.al pop si pop dx pop cx pop bx .

pop ax ret hex2asc endp end OUTPUT: Enter first number:2 Enter second number:3 Sum in decimal number:05 Enter first number:5 Enter second number:6 Sum in decimal number:11 .

"Enter the second number:$" msg3 db 13. Prg(desmall.'0' cmp al.code main proc mov ax. in decimal.msg1 mov ah.stack .al lea dx."Enter the first number:$" msg2 db 13.data msg1 db 13.09h int 21h mov ah.msg2 mov ah. which will read in two decimal inputs and print out the smaller of the two.09h .bl jmp prin sma :mov small.10.num1 jb sma mov bl.8.@data mov ds. in decimal dosseg .10.01h int 21h sub al.msg3 mov ah.ax lea dx.10.model small .al prin:lea dx."Smaller of two in decimal:$" num1 db ? small db ? res db 20 DUP('$') .asm) Title read in two decimal inputs and print out the smaller of the two.01h int 21h sub al. Write a program.09h int 21h mov ah.num1 mov small.'0' mov num1.

offset res mov ax.al loop rpt2 inc si mov al.09h int 21h mov ax.int 21h mov si.00 div bx add dl.0Ah jge rpt1 add al.al rpt2: pop ax inc si mov [si].'0' push dx inc cx cmp ax.0Ah rpt1: mov dx.00 mov al.00h mov bx.'$' mov [si].'0' mov [si].res mov ah.small call hex2asc lea dx.al .4c00h int 21h main endp hex2asc proc near push ax push bx push cx push dx push si mov cx.

pop si pop dx pop cx pop bx pop ax ret hex2asc endp end OUTPUT: Enter the first number:5 Enter the second number:2 Smaller of two in decimal:02 Enter the first number:8 Enter the second number:9 Smaller of two in decimal:08 .

msg1 mov ah.sum mov ah.02h int 21h mov al.@data mov ds.09h int 21h mov dl.stack .al lea dx.ax mov al.num2 add al.avg mov ah.num3 mov sum.al lea dx.data msg1 db 13."Average of three numbers stored in memory:$" num1 db 10h num2 db 10h num3 db 10h sum db ? avg db ? res db 20 DUP('$') .code main proc mov ax.msg2 mov ah.09h int 21h mov dl.sum mov ah.10.02h .10. Prg(avgthree.00h mov bl.model small .9.asm) Title calculate average of three given numbers stored in memory dosseg ."Sum of three numbers stored in memory:$" msg2 db 13. Write a program to calculate the average of three given numbers stored in memory.03 div bl mov avg.num1 add al.

4c00h int 21h main endp end OUTPUT: Sum of three numbers stored in memory:0 Average of three numbers stored in memory:► .int 21h mov ax.

"Enter the radius:$" msg2 db 13.10.00 mov al.num mov bx.asm) Title volume of sphere: dosseg .stack .00 mov ax.7 cwd .msg1 mov ah.00 mov bl.22 mov bx.09h int 21h call readnum mov cx.00 mov bx. Write a program in 8086 assembly language to find the volume of sphere using following formula: V = 4/3∏ r^3.ax lea dx. Prg(volsph.code main proc mov ax.00 mul bl loop rpt mov rad.data msg1 db 13.10.@data mov ds.ax mov ax.model small .2 mov ax."Volume of sphere is:$" num db ? rad dw ? pi dw ? result dw ? res db 10 DUP('$') .10.num rpt: mov dx.

00 div bx mov result.00 mov ax.result mov dx.res .pi mov dx.00 mov bx.00 mul bx mov result.3 cwd mov ax.mov dx.result mov bx.00 mov ax.4 mov dx.09h int 21h lea dx.ax mov ax.ax mov ax.00 mov ax.ax mov si.ax mov bx.offset res call hex2asc lea dx.rad mov bx.msg2 mov ah.00 mul bx mov result.00 div bx mov pi.00 mov bx.

09h int 21h mov ax.00h mov bx.'0' push dx inc cx cmp ax.al mov ah.mov ah.'0' add num.'0' mov [si].0Ah jge rpt1 add al.0Ah rpt1: mov dx.'0' mov bh.01h int 21h sub al.0Ah mul bh mov num.01h int 21h sub al.00 div bx add dl.4c00h int 21h main endp readnum proc near mov ah.al ret readnum endp hex2asc proc near push ax push bx push cx push dx push si mov cx.al rpt2: pop ax .

'$' mov [si].al pop si pop dx pop cx pop bx pop ax ret hex2asc endp end Output: Enter the radius:02 Volume of sphere is:32 Enter the radius:04 Volume of sphere is:256 .inc si mov [si].al loop rpt2 inc si mov al.

...:$" msg3 db cr...."Enter any number to exit..."Program to evaluate 2 functions.:$" msg4 db cr.."Enter which function of perform ...:$" msg1 db cr.. 3 * ( x ^ 3 ) + 4x +5...lf...or evaluate 7x +8 if flag == 0.09h mov dx.....@data mov ds. dosseg ...model small ..lf. Assume x is a 16 bit unsigned integer."1..:$" msg7 db cr.code main proc mov ax..lf.lf...."Enter number for selecting function:$" msg8 db cr."Enter number <01> for second function.asm) Title program to evaluates 3*(x ^ 3) +4x +5 if flag = 1 . 7x +8.. Assume x is a 16 bit unsigned integer."Result for 3 * (x ^ 3 ) + 4x +5=$" fflag dw ? xnum dw ? xpwr dw ? xnump dw ? result db 10 DUP(0) buff db 80 db 0 db 80 DUP(?) .lf."Enter value for x:$" msg9 db cr.lf..:$" msg5 db cr.lf..11..lf..stack .....ax mov ah......offset msg int 21h mov ah."Enter number <00> for first function.:$" msg6 db cr."2....data cr equ 0dh lf equ 0ah msg db cr.."Result for 7x + 8 =$" msg10 db cr. Prg(flope16. Write a program to evaluates 3 * (x ^ 3) + 4x + 5 if flag = = 1 or evaluates 7x + 8 if flag = = 0 ..lf.09h mov dx.lf.lf...:$" msg2 db cr.offset msg1 int 21h .

09h mov dx.offset msg2 int 21h mov ah.offset result call hex2asc mov ah.offset msg5 int 21h mov ah.offset msg3 int 21h mov ah.print result pnxt: mov ax.09h mov dx.09h mov dx.xnump mov si.09h mov dx.offset msg7 int 21h call readinteger mov ax.fflag cmp ax.09h .00 je frt cmp ax.mov ah.01 je sec jne skip frt: call first jmp pnxt sec: call second jmp pnxt .09h mov dx.09h mov dx.offset msg6 int 21h .offset msg4 int 21h mov ah.Read for choise strt: mov ah.

offset buff int 21h mov bx.offset buff int 21h mov bx.2 push bx call atoi pop bx mov fflag.ax pop ax pop bx .2 push bx call atoi pop bx mov xnum.0ah mov dx.offset buff add bx.offset buff add bx.ax pop ax pop bx pop dx ret readinteger endp readinteger1 proc near push dx push bx push ax mov ah.offset result int 21h jmp strt skip: mov ax.mov dx.4c00h int 21h main endp readinteger proc near push dx push bx push ax mov ah.0ah mov dx.

09h mov dx.09h int 21h ret first endp second proc near mov ax.xnum pwr: mov dx.offset msg8 int 21h call readinteger1 mov bx.09h mov dx.07 mov ax.xnum mov ax.00 mov ah.02 mov bx.00 mov cx.00 mov bx.ax mov dx.00 mul bx add ax.00 mov ah.08 mov xnump.pop dx ret readinteger1 endp first proc near mov ax.offset msg8 int 21h call readinteger1 mov cx.xnum mov dx.00 mov bx.offset msg9 mov ah.00 mul bx .

xpwr mov dx.[si] inc bx inc si cmp al.00 mov bx.xnum mov dx.sp push si push dx push cx push bx mov si.finding the length of the string mov bx.09h int 21h ret second endp atoi proc near push bp mov bp.03 mov ax.00 nxtch: mov al.00 mov bx.ax mov ax.[bp+4] .00 mul bx add ax.04 mov ax.xnump mov xnump.00 mul bx mov xnump.ax mov dx.00 mov bx.ax mov ax.05 add ax.loop pwr mov xpwr.00 mov bx.offset msg10 mov ah.cr .

dx mov ah..ax pop cx pop dx loop nxt mov ax.dx:ax=digit xor dx. push dx push cx xor dx.01 nxt: dec si push dx .'0' mul bx pop dx add dx.1000.bx dec cx .dx pop bx pop cx pop dx pop si pop bp ret atoi endp hex2asc proc near push ax .jne nxtch .cx=length of the string mov cx.dx mov cx..00 mov bx.bx mul cx mov bx.10 mov ax.00 mov al.[si] sub al..ax .generate multiples bx=10.100.si is pointing outside the string so adjust dec si mov dx.

0Ah rpt1: mov dx.'0' push dx inc cx cmp ax.push bx push cx push dx push si mov cx.al loop rpt2 inc si mov al.al rpt2: pop ax inc si mov [si].al pop si pop dx pop cx pop bx pop ax ret hex2asc endp end .'$' mov [si].00 div bx add dl.'0' mov [si].0Ah jge rpt1 add al.00h mov bx.

.......: Enter number <01> for second function...: Enter any number to exit.: 1.: Enter which function of perform .. 7x +8..: Enter number <00> for first function......: 2.........Output: Program to evaluate 2 functions..... 3 * ( x ^ 3 ) + 4x +5..: Enter number for selecting function:00 Enter value for x:10 Result for 7x + 8 =78 Enter number for selecting function:01 Enter value for x:3 Result for 3 * (x ^ 3 ) + 4x +5=98 Enter number for selecting function:22 .....................

Using formula : Celsius = (Fahrenheit – 32 ) * 5 / 9. Write a program to convert Centigrade (Celsius ) to Fahrenheit temperature measuring scales.offset res call hex2asc lea dx.09h int 21h call readnum mov bx.00 mov bx.model small .10.msg2 mov ah.00 mul bx mov bx.10. Prg(farcel."Enter a number to find fahrenheit temperature:$" msg2 db 13.asm) Title convert temperature celsius to Farenheit: dosseg .@data mov ds.data msg1 db 13.ax lea dx.msg1 mov ah.9 mov ax.stack .09h int 21h lea dx.5 cwd div bx add ax.code main proc mov ax.00 mov al.32 mov si.12.num mov dx.res ."Fahrenheit Temperature is:$" num db ? res db 10 DUP('$') .

'0' push dx inc cx cmp ax.0Ah jge rpt1 add al.01h int 21h sub al.al rpt2: pop ax .00h mov bx.4c00h int 21h main endp readnum proc near mov ah.'0' add num.'0' mov bh.00 div bx add dl.al mov ah.0Ah mul bh mov num.mov ah.09h int 21h mov ax.01h int 21h sub al.'0' mov [si].0Ah rpt1: mov dx.al ret readnum endp hex2asc proc near push ax push bx push cx push dx push si mov cx.

al loop rpt2 inc si mov al.al pop si pop dx pop cx pop bx pop ax ret hex2asc endp end Output: Enter a number to find fahrenheit temperature:28 Fahrenheit Temperature is:82 Enter a number to find fahrenheit temperature:40 Fahrenheit Temperature is:104 .inc si mov [si].'$' mov [si].

asm) Title adds the sales tax in the price list of items and replace price list with a new list: dosseg .model small .data msg1 db 13."How many numbers:$" msg2 db 13.09h int 21h call readnum lea dx.09h int 21h . Prg(saltax.temp mov [si].10. Write a Program which adds the sales tax in the Price list of items and replace the price list with a new list.10."After add sales tax price list is:$" msg6 db 13."Sales tax 2 rupes for less then 100 rupees:$" msg5 db 13.13.stack ."Enter Price:$" msg4 db 13.msg1 mov ah.offset ntable mov ch.ax lea dx.msg3 mov ah.al .00 mov cl.10.10."Price number is:$" ntable db 100 DUP(0) num db ? temp db ? res db 20 DUP('$') .msg2 mov ah.09h int 21h call readnum1 mov al.read all numbers mov si.code main proc mov ax.@data mov ds.10.num nread:lea dx.10."Enter number between 1 to 99:$" msg3 db 13.

01h .msg5 mov ah.inc si loop nread mov si.09h int 21h inc di loop rpt mov ax.msg4 mov ah.offset ntable rpt: mov ax.00 mov al.00 mov cl.al inc si loop sl lea dx.num mov si.msg6 mov ah.res mov ah.offset res mov di.[di] call hex2asc lea dx.2 mov [si].num sl: mov ax.00 mov cl.09h int 21h mov cx.4c00h int 21h main endp readnum proc near mov ah.09h int 21h lea dx.[si] add al.00 mov al.offset ntable mov cx.09h int 21h lea dx.

'0' mov bh.00h mov bx.0Ah mul bh mov num.10 mul bh mov temp.'0' add num.'0' mov bh.al mov ah.01h int 21h sub al.int 21h sub al.'0' push dx inc cx cmp ax.0Ah rpt1: mov dx.01h int 21h sub al.00 div bx add dl.'0' add temp.al mov ah.0Ah .01h int 21h sub al.al ret readnum1 endp hex2asc proc near push ax push bx push cx push dx push si mov cx.al ret readnum endp readnum1 proc near mov ah.

'0' mov [si].al loop rpt2 inc si mov al.al rpt2: pop ax inc si mov [si].al pop si pop dx pop cx pop bx pop ax ret hex2asc endp end Output: How many numbers:04 Enter number between 1 to 99: Enter Price:11 Enter Price:22 Enter Price:33 Enter Price:44 Sales tax 2 rupes for less then 100 rupees: After add sales tax price list is: Price number is:13 Price number is:24 Price number is:35 Price number is:46 .jge rpt1 add al.'$' mov [si].

10.7:Loop and Comparisons: 1.09h int 21h mov ax.09h int 21h call readnum mov ax.msg1 mov ah.stack .10.data msg1 db 13.msg2 mov ah.01 mov ch. Prg(fact."Factorial of given number is:$" num db ? res db 10 DUP('$') .00 mul cx loop rpt skip:mov si.Session 5.00 je skip rpt: mov dx.num cmp cx.@data mov ds.ax lea dx. Write a program to find the factorial of decimal number given by user."Enter a number to find factorial:$" msg2 db 13.00 mov cl.code main proc mov ax.6.offset res call hex2asc lea dx.model small .4c00h .09h int 21h lea dx.asm) Title factorial of a given number dosseg .res mov ah.

0Ah rpt1: mov dx.0Ah jge rpt1 add al.'0' push dx inc cx cmp ax.'0' mov bh.0Ah mul bh mov num.al ret readnum endp hex2asc proc near push ax push bx push cx push dx push si mov cx.int 21h main endp readnum proc near mov ah.01h int 21h sub al.al loop rpt2 .01h int 21h sub al.00 div bx add dl.00h mov bx.al rpt2: pop ax inc si mov [si].'0' add num.al mov ah.'0' mov [si].

al pop si pop dx pop cx pop bx pop ax ret hex2asc endp end Output: Enter a number to find factorial:03 Factorial of given number is:06 Enter a number to find factorial:05 Factorial of given number is:120 .inc si mov al.'$' mov [si].

n sub al.nmr = n-r .09h int 21h call readnum1 lea dx.ax lea dx.code main proc mov ax.al .msg3 mov ah.r= .asm) Title nCr of a given number dosseg .09h int 21h lea dx.10.compute nf = n! .n= .model small .stack .data msg1 db 13.2.09h int 21h call readnum2 mov al.."Enter n <xx>:$" msg3 db 13.10.."Program to compute nCr . Write a program to find n C r for a given n and r Prg(ncrfact.:$" msg2 db 13.r mov nmr."Enter r <xx>:$" msg4 db 13.msg1 mov ah."nCr = :$" n db ? r db ? nmr db ? nf dw ? rf dw ? nmrf dw ? ncr dw ? temp dw ? res db 20 DUP('$') .@data mov ds.10.msg2 mov ah.10.

nmr call fact mov nmrf.09h int 21h mov si.nf div temp mov ncr.ax .00 mov ax.compute rf = r! mov al.ax .ax .ax .09h int 21h mov ax.n call fact mov nf.nmrf mul rf mov temp.mov al.res mov ah.r call fact mov rf.offset res mov ax.4c00h int 21h main endp fact proc near push cx push dx .ax .compute nmrf = (n-r)! mov al.ax = ax(nf)/(nmrf*rf) mov ax.ncr call hex2asc lea dx.msg4 mov ah.temp (n-r)! * r! mov dx.convert ax to ASCII form lea dx.

01h int 21h sub al.00 je skip rpt: mov dx.01h int 21h sub al.00 mul cx loop rpt skip:pop dx pop cx ret fact endp readnum1 proc near mov ah.01 cmp cx.01h int 21h sub al.'0' add r.'0' add n.'0' mov bh.al mov ah.al mov ah.al mov ax.al ret readnum1 endp readnum2 proc near mov ah.01h int 21h sub al.al .'0' mov bh.mov ch.0Ah mul bh mov r.0Ah mul bh mov n.00 mov cl.

00h mov bx.'0' push dx inc cx cmp ax.ret readnum2 endp hex2asc proc near push ax push bx push cx push dx push si mov cx.al rpt2: pop ax inc si mov [si].al loop rpt2 inc si mov al.al pop si pop dx pop cx pop bx pop ax ret hex2asc endp end .0Ah jge rpt1 add al.'$' mov [si].0Ah rpt1: mov dx.'0' mov [si].00 div bx add dl.

Output: Program to compute nCr ...: Enter n <xx>:05 Enter r <xx>:02 nCr = :10 Program to compute nCr ...: Enter n <xx>:06 Enter r <xx>:06 nCr = :01

3. Write a program to arrange given n numbers in descending order Prg(décor.asm) Title sort(bubble sort) an given array element in descending order dosseg .model small .stack .data msg1 db 13,10,"How many numbers:$" msg2 db 13,10,"Enter number:$" msg3 db 13,10,"Entered elements are:$" msg4 db 13,10,"Element:$" ntable db 100 DUP(0) num db ? temp db ? count db ? res db 10 DUP('$') .code main proc mov ax,@data mov ds,ax lea dx,msg1 mov ah,09h int 21h call readnum ;read all numbers mov si,offset ntable mov ch,00 mov cl,num nread:lea dx,msg2 mov ah,09h int 21h call readnum1 mov al,temp mov [si],al inc si loop nread ;sorting an array elements mov cx,00 mov cl,num

cmp cx,01 je pnxt1

;if(num=01)then print array elements

nxtps:mov dx,00 ;flag =false mov bx,00 ;j=1 nxtj: mov al,ntable[bx] mov ah,ntable[bx+1] cmp ah,0 je skip cmp al,ah jge skip mov ntable[bx],ah mov ntable[bx+1],al mov dl,01 skip: inc bx cmp bx,cx jl nxtj dec cx jz pnxt1 cmp dl,01h je nxtps ;print array elements pnxt1:mov ch,00 mov cl,num mov di,offset ntable mov si,offset res lea dx,msg3 mov ah,09h int 21h pnxt: lea dx,msg4 mov ah,09h int 21h mov ah,00 mov al,[di] call hex2asc lea dx,res mov ah,09h int 21h inc di

01h int 21h sub al.01h int 21h sub al.0Ah mul bh mov num.loop pnxt mov ax.0Ah .4c00h int 21h main endp readnum proc near mov ah.0Ah mul bh mov temp.01h int 21h sub al.al ret readnum endp readnum1 proc near mov ah.'0' mov bh.'0' add temp.'0' mov bh.'0' add num.al ret readnum1 endp hex2asc proc near push ax push bx push cx push dx push si mov cx.al mov ah.00h mov bx.01h int 21h sub al.al mov ah.

al loop rpt2 inc si mov al.rpt1: mov dx.'$' mov [si].0Ah jge rpt1 add al.00 div bx add dl.al pop si pop dx pop cx pop bx pop ax ret hex2asc endp end Output: How many numbers:04 Enter number:06 Enter number:02 Enter number:01 Enter number:03 Entered elements are: Element:06 Element:03 Element:02 Element:01 .al rpt2: pop ax inc si mov [si].'0' push dx inc cx cmp ax.'0' mov [si].

"Enter number:$" msg3 db 13.10.@data mov ds."Enter number and get the sum untill 00 is read:$" msg2 db 13.00 mov temp.00 mov al.al mov ax.msg1 mov ah.00 mov al.model small .num mov temp.al read: lea dx.00 je ou mov ax. it should print out the sum of the numbers read in so far."Sum is:$" num db ? temp db ? res db 10 DUP('$') .code main proc mov ax.asm) Title read decimal inputs repeatedly until a zero value is read and print sum of the numbers read in so far: dosseg .10.num cmp al. at this point .temp mov si.data msg1 db 13.read numbers mov ax.10.msg2 mov ah.stack .09h int 21h . which will read in decimal inputs repeatedly until a zero value is read.ax lea dx. Prg(sum0.temp add al.offset res .09h int 21h call readnum mov al. Write a program.4.

'0' add num.'0' mov bh.4c00h int 21h main endp readnum proc near mov ah.00 mov al.01h int 21h sub al.res mov ah.0Ah rpt1: mov dx.00 div bx .msg3 mov ah.temp jmp read ou: mov ax.01h int 21h sub al.00h mov bx.al mov ah.call hex2asc lea dx.al ret readnum endp hex2asc proc near push ax push bx push cx push dx push si mov cx.09h int 21h lea dx.09h int 21h mov ax.0Ah mul bh mov num.

al rpt2: pop ax inc si mov [si].'$' mov [si].0Ah jge rpt1 add al.'0' mov [si].add dl.al loop rpt2 inc si mov al.al pop si pop dx pop cx pop bx pop ax ret hex2asc endp end Output: Enter number and get the sum untill 00 is read: Enter number:11 Sum is:11 Enter number:22 Sum is:33 Enter number:33 Sum is:66 Enter number:44 Sum is:110 Enter number:00 .'0' push dx inc cx cmp ax.

09h mov dx.lf.offset msg1 int 21h call readinteger .Read number2 mov ah."Enter number2:$" msg3 db cr.data cr equ 0dh lf equ 0ah msg db cr.lf.model small ."Enter numbe1:$" msg2 db cr.Read number1 mov ah.@data mov ds.lf."Program for LCM of two positive Integers.:$" msg1 db cr.ax mov ah.09h mov dx. Develop and execute an assembly language program to find the LCM of two 16 bit unsigned integers."LCM=:$" num1 dw ? num2 dw ? gcd dw ? num3 dw ? lcm dw ? res db 10 DUP(0) buff db 80 db 0 db 80 DUP(?) .stack . dosseg .5.asm) Title program to find lcm of two 16 bit unsigned integers.09h mov dx.lf. Prg(lcm16.code main proc mov ax..offset msg2 int 21h call readinteger1 .offset msg int 21h .

num2 push ax call findgcd add sp.lcm mov si.09h mov dx.4 .00 mul num2 div gcd mov lcm.ax .0ah mov dx.offset buff add bx.offset msg3 int 21h mov ax.push num1 and num2 into stack mov ax.offset res int 21h mov ax.num[i+1]) .gcd = findgcd(num[i].print LCM mov ah.num1 mov dx.LCM = (num1*num2)/gcd(num1.2 ..num2) mov ax.adjust stack pointer mov gcd.offset res call hex2asc mov ah.ax .num1 push ax mov ax.offset buff int 21h mov bx.09h mov dx.4c00h int 21h main endp readinteger proc near push dx push bx push ax mov ah.

ax pop ax pop bx pop dx ret readinteger1 endp findgcd proc near push bp mov bp.sp push dx push bx rpt: mov ax.offset buff add bx.offset buff int 21h mov bx.[bp+4] mov bx.[bp+6] cmp ax.push bx call atoi pop bx mov num1.2 push bx call atoi pop bx mov num2.bx jl skip mov [bp+6].0ah mov dx.ax pop ax pop bx pop dx ret readinteger endp readinteger1 proc near push dx push bx push ax mov ah.ax .

sp push si push dx push cx push bx mov si.bx dec cx .[bp+6] div word ptr[bp+4] mov [bp+6].00 mov ax.[si] inc bx inc si cmp al.cx=length of the string mov cx.mov [bp+6].00 jne rpt mov ax.00 nxtch: mov al.[bp+4] pop bx pop dx pop bp ret findgcd endp atoi proc near push bp mov bp.00 mov bx.si is pointing outside the string so adjust dec si mov dx.01 nxt: dec si push dx .finding the length of the string mov bx.bx skip: mov dx.dx cmp dx.[bp+4] .cr jne nxtch .num2/num1 .

.100.1000.dx pop bx pop cx pop dx pop si pop bp ret atoi endp hex2asc proc near push ax push bx push cx push dx push si mov cx.dx mov ah.bx mul cx mov bx.'0' push dx .dx:ax=digit xor dx. push dx push cx xor dx.'0' mul bx pop dx add dx.ax pop cx pop dx loop nxt mov ax...[si] sub al..00h mov bx.0Ah rpt1: mov dx.10 mov ax.ax .00 mov al.generate multiples bx=10.dx mov cx.00 div bx add dl.

: Enter numbe1:150 Enter number2:75 LCM=:150 .al loop rpt2 inc si mov al..inc cx cmp ax.'0' mov [si].0Ah jge rpt1 add al.al pop si pop dx pop cx pop bx pop ax ret hex2asc endp end Output: Program for LCM of two positive Integers.al rpt2: pop ax inc si mov [si].'$' mov [si].

offset ntable mov ch.09h int 21h call readnum .al inc si loop nread mov si.data msg1 db 13."Larget number is:$" ntable db 100 DUP(0) num db ? temp db ? res db 10 DUP('$') .09h int 21h call readnum1 mov al.num nread:lea dx."How many numbers:$" msg2 db 13.msg2 mov ah.code main proc mov ax.offset ntable mov bl.model small .@data mov ds.01 nchk: inc si .temp mov [si].read all numbers mov si.00 mov cl.asm) Title largest in given n numbers dosseg .msg1 mov ah.10.6.[si] mov cl.10.ax lea dx. Write a program for finding largest number in given n numbers.10.stack . Prg(larnnum."Enter number:$" msg3 db 13.

01h int 21h sub al.00 mov al.bl mov si.09h int 21h mov ax.res mov ah.msg3 mov ah.01h int 21h sub al.offset res call hex2asc lea dx.0Ah .num je nomore cmp bl.'0' mov bh.0Ah mul bh mov num.'0' mov bh.[si] jge skip mov bl.4c00h int 21h main endp readnum proc near mov ah.'0' add num.01h int 21h sub al.al ret readnum endp readnum1 proc near mov ah.09h int 21h lea dx.cmp cl.al mov ah.[si] skip:inc cl jmp nchk nomore:mov ah.

al ret readnum1 endp hex2asc proc near push ax push bx push cx push dx push si mov cx.al pop si pop dx pop cx pop bx .0Ah jge rpt1 add al.0Ah rpt1: mov dx.01h int 21h sub al.al mov ah.al loop rpt2 inc si mov al.'0' push dx inc cx cmp ax.00h mov bx.'0' mov [si].'0' add temp.al rpt2: pop ax inc si mov [si].mul bh mov temp.'$' mov [si].00 div bx add dl.

model small ."Element:$" ntable db 100 DUP(0) num db ? temp db ? count db ? res db 10 DUP('$') .10. Develop and execute a program to sort a given set of 8 bit unsigned integers into ascending order.10.asm) Title sort(bubble sort) an given array element in ascending order dosseg .stack .10."Enter number:$" msg3 db 13.pop ax ret hex2asc endp end Output: How many numbers:05 Enter number:20 Enter number:05 Enter number:00 Enter number:99 Enter number:70 Larget number is:99 How many numbers:06 Enter number:01 Enter number:05 Enter number:04 Enter number:06 Enter number:00 Enter number:03 Larget number is:06 7."Sorted elements in ascending order are:$" msg4 db 13.10."How many numbers:$" msg2 db 13.code main proc . Prg(ascor.data msg1 db 13.

ah jle skip mov ntable[bx].ah mov ntable[bx+1].ntable[bx] mov ah.09h int 21h call readnum .ntable[bx+1] cmp ah.00 mov cl.num nread:lea dx.mov ax.msg1 mov ah.if(num=01)then print array elements je pnxt1 nxtps:mov dx.cx jl nxtj .01 skip: inc bx cmp bx.temp mov [si].msg2 mov ah.09h int 21h call readnum1 mov al.al inc si loop nread .flag =false mov bx.al mov dl.@data mov ds.0 je skip cmp al.00 .offset ntable mov ch.00 mov cl.00 .j=1 nxtj: mov al.ax lea dx.read all numbers mov si.sorting an array elements mov cx.01 .num cmp cx.

01h int 21h sub al.print array elements pnxt1:mov ch.01h je nxtps .offset ntable mov si.'0' mov bh.msg3 mov ah.al ret .[di] call hex2asc lea dx.0Ah mul bh mov num.09h int 21h inc di loop pnxt mov ax.4c00h int 21h main endp readnum proc near mov ah.09h int 21h pnxt: lea dx.'0' add num.res mov ah.num mov di.00 mov al.msg4 mov ah.09h int 21h mov ah.offset res lea dx.al mov ah.01h int 21h sub al.dec cx jz pnxt1 cmp dl.00 mov cl.

0Ah jge rpt1 add al.'0' mov [si].al loop rpt2 .al ret readnum1 endp hex2asc proc near push ax push bx push cx push dx push si mov cx.al rpt2: pop ax inc si mov [si].0Ah mul bh mov temp.'0' push dx inc cx cmp ax.al mov ah.01h int 21h sub al.'0' add temp.readnum endp readnum1 proc near mov ah.00 div bx add dl.00h mov bx.01h int 21h sub al.0Ah rpt1: mov dx.'0' mov bh.

Develop and execute an assembly language program to sort a given set of 16 bit unsigned integers into descending order. Prg(decor16."Program to sort 16 bit number into descending order.lf...asm) Title program to sort(bubble sort) a given set of 16 bit unsigned integers into descending order using dosseg ."Element:$" ...."Number of Elements:$" msg2 db cr....'$' mov [si].lf.stack .:$" msg1 db cr.lf."Elements are.:$" msg5 db cr.al pop si pop dx pop cx pop bx pop ax ret hex2asc endp end Output: How many numbers:04 Enter number:04 Enter number:03 Enter number:02 Enter number:01 Sorted elements in ascending order are: Element:01 Element:02 Element:03 Element:04 8."After sorting.:$" msg4 db cr.lf..inc si mov al."Enter Element:$" msg3 db cr.lf.data cr equ 0dh lf equ 0ah msg db cr.model small .lf.

cx=count .offset msg int 21h .02 .sorting an array elements mov cx.Read element count mov ah.09h mov dx.cx=count add cx.Table Index bx=tab[1] rdnxt: mov ah.ax add bx.01 je pnxt .count .code main proc mov ax.tnum mov tab1[bx].offset msg2 int 21h call readinteger1 mov ax.09h mov dx.2 loop rdnxt .offset msg1 int 21h call readinteger mov cx.count dw ? tab1 dw 20 DUP(0) num dw ? tnum dw ? temp dw ? result db 10 DUP(0) buff db 80 db 0 db 80 DUP(?) .count mov bx.09h mov dx.ax mov ah.count cmp cx.@data mov ds.

02 .ax mov dx.temp mov tab1[bx].00 mov bx.09h mov dx.09h mov dx.offset result call hex2asc mov ah.offset msg5 int 21h mov ax.offset msg3 int 21h mov ah.tab1[bx] cmp ax.tab1[bx] mov si.ax mov ax.tab1[bx+2] mov temp.print result pnxt: mov ah.02 .cx jl nxts1 dec cx dec cx jz pnxt cmp dx.01 skip: inc bx cmp bx.nxts: mov dx.Table Index bx=tab[1] rdnxt1: mov ah.ax mov ax.00 je skip cmp ax.Table Index bx=tab[1] nxts1: mov ax.01h je nxts .09h .count mov bx.cx=count .09h mov dx.temp jge skip mov tab1[bx+2].offset msg4 int 21h mov cx.

2 loop rdnxt1 skip2: mov ax.4c00h int 21h main endp readinteger proc near push dx push bx push ax mov ah.offset buff int 21h mov bx.mov dx.offset buff add bx.offset buff int 21h mov bx.2 push bx call atoi pop bx mov count.0ah mov dx.offset result int 21h add bx.ax pop ax pop bx pop dx ret readinteger endp readinteger1 proc near push dx push bx push ax mov ah.2 push bx call atoi .0ah mov dx.offset buff add bx.

ax pop ax pop bx pop dx ret readinteger1 endp atoi proc near push bp mov bp.dx mov ah.01 nxt: dec si push dx .'0' mul bx pop dx add dx.sp push si push dx push cx push bx mov si.00 mov al.00 nxtch: mov al.[si] sub al.finding the length of the string mov bx.bx dec cx .pop bx mov tnum.dx:ax=digit xor dx.si is pointing outside the string so adjust dec si mov dx.cx=length of the string mov cx.cr jne nxtch .[si] inc bx inc si cmp al.ax .[bp+4] .00 mov bx.

.al .10 mov ax.00 div bx add dl.1000.0Ah jge rpt1 add al. push dx push cx xor dx.'0' push dx inc cx cmp ax...bx mul cx mov bx.generate multiples bx=10.'0' mov [si].dx pop bx pop cx pop dx pop si pop bp ret atoi endp hex2asc proc near push ax push bx push cx push dx push si mov cx.ax pop cx pop dx loop nxt mov ax..0Ah rpt1: mov dx.100.dx mov cx.00h mov bx.

. ( Repeated program in session 3 and 4 : Simple assembly programs) 10. Prg(ascdec.rpt2: pop ax inc si mov [si]..'$' mov [si]. Write a program which adds the sales tax in the price list of items and replace the price list with calculated values...: Element:55 Element:44 Element:33 Element:22 Element:11 9.: Elements are.asm) Title convert ASCII to decimal digit dosseg .. Write a program to Convert ASCII number into decimal digit.: Number of Elements:05 Enter Element:11 Enter Element:44 Enter Element:22 Enter Element:55 Enter Element:33 After sorting...al pop si pop dx pop cx pop bx pop ax ret hex2asc endp end Output: Program to sort 16 bit number into descending order.model small ..al loop rpt2 inc si mov al..

msg2 mov ah.res mov ah.4c00h int 21h main endp readnum proc near mov ah.'0' add num.09h int 21h call readnum skip:mov si."Decimal number is:$" num db ? res db 10 DUP('$') .'0' mov bh.09h int 21h mov ax.offset res mov ax.stack .10..ax lea dx.10.al mov ah."Enter a number:$" msg2 db 13.@data mov ds.num call hex2asc lea dx.01h int 21h sub al.09h int 21h lea dx.al ret .msg1 mov ah.0Ah mul bh mov num.data msg1 db 13.01h int 21h sub al.code main proc mov ax.00 mov al.

'0' push dx inc cx cmp ax.0Ah rpt1: mov dx.al loop rpt2 inc si mov al.al rpt2: pop ax inc si mov [si].al pop si pop dx pop cx pop bx pop ax ret hex2asc endp end .0Ah jge rpt1 add al.'$' mov [si].00h mov bx.'0' mov [si].readnum endp hex2asc proc near push ax push bx push cx push dx push si mov cx.00 div bx add dl.

Output: Enter a number:12 Decimal number is:12 .

"Result Z=:$" numa db ? numb db ? numc db ? numab db ? numabc db ? result db ? res db 10 DUP('$') .asm) Title perform the following operation Z = ((A-B)/10 *C)*2 dosseg .10.msg2 mov ah. Z=((A-B)/10*C)*2.10.09h int 21h call readnum1 lea dx.10.$" msg3 db 13.09h int 21h call readnum lea dx.ax lea dx.."Enter the value for B:$" msg5 db 13..msg5 mov ah..09h int 21h lea dx.code main proc mov ax."Enter the value for C:$" msg6 db 13.@data mov ds.model small ."The following program performs the operation:$" msg2 db 13.msg1 mov ah.09h .11.data msg1 db 13...stack .10.10."Z = ((A-B)/10*C)*2. Prg(funope.09h int 21h lea dx.10.msg4 mov ah. Write a program for performing the following operation.msg3 mov ah."Enter the value for A:$" msg4 db 13.

int 21h call readnum2 .numabc = (numab)/10*C mov ax.09h int 21h lea dx.numa sub al.00 mov al.00 mov bl.numab = (A .00 mov bl.result=(numabc)*2 mov ax.00 mov bx.res mov ah.result mov si.al .0Ah mov al.00 mov al.numb cwd mov numab.offset res call hex2asc lea dx.4c00h int 21h main endp .00 div bx mov bx.numab mov dx.09h int 21h mov ax.02 mul bx mov result.00 mov bl.numabc mov bx.al mov ax.al .B) mov ax.numc mul bx mov numabc.msg6 mov ah.00 mov al.

01h int 21h sub al.0Ah mul bh mov numb.01h int 21h sub al.0Ah mul bh mov numc.al mov ah.'0' mov bh.al ret readnum endp readnum1 proc near mov ah.01h int 21h sub al.'0' add numb.01h int 21h sub al.al ret readnum2 endp .readnum proc near mov ah.al mov ah.al mov ah.'0' add numc.'0' mov bh.al ret readnum1 endp readnum2 proc near mov ah.01h int 21h sub al.0Ah mul bh mov numa.'0' add numa.'0' mov bh.01h int 21h sub al.

al pop si pop dx pop cx pop bx pop ax ret hex2asc endp end .al rpt2: pop ax inc si mov [si].'0' mov [si].00 div bx add dl.'0' push dx inc cx cmp ax.hex2asc proc near push ax push bx push cx push dx push si mov cx.00h mov bx.'$' mov [si].al loop rpt2 inc si mov al.0Ah jge rpt1 add al.0Ah rpt1: mov dx.

Output: The following program performs the operation: Z = ((A-B)/10*C)*2...... Enter the value for A:30 Enter the value for B:10 Enter the value for C:10 Result Z=:40 .

....asm) Title program to add array of binary digits dosseg .:$" msg1 db cr....lf.model small .09h mov dx..ax mov ah... Prg(arbinad......lf.lf.:$" msg2 db cr.Table Index bx=tab[1] .."Program to add array of binary element.offset msg1 int 21h call readinteger mov cx.lf."Enter Element:$" msg3 db cr.09h ."After adding array element.code main proc mov ax.....count mov bx.:$" msg4 db cr."Total=:$" count dw ? tab1 dw 20 DUP(0) num dw ? tnum dw ? temp dw ? result db 10 DUP(0) buff db 80 db 0 db 80 DUP(?) .offset msg int 21h ..@data mov ds..Read element count mov ah..stack ..data cr equ 0dh lf equ 0ah msg db cr...02 rdnxt: mov ah... Write a program for adding an array of binary digits.cx=count .09h mov dx..lf."How many elements to enter...12.

offset result int 21h skip2: mov ax.tnum mov tab1[bx].offset msg2 int 21h call readinteger1 mov ax.temp inc bx inc bx loop rpt .09h mov dx.02 mov cx.cx=count add cx.tab1[bx] add ax.00 rpt: mov ax.adding array element mov cx.print result pnxt: mov ah.09h mov dx.ax mov dx.00 mov cx.2 loop rdnxt .temp mov si.4c00h .mov dx.offset msg4 int 21h mov ax.count cmp cx.01 je pnxt mov bx.count .count mov dx.ax add bx.09h mov dx.dx mov temp.offset msg3 int 21h rdnxt1: mov ah.offset result call hex2asc mov ah.

0ah mov dx.2 push bx call atoi pop bx mov tnum.int 21h main endp readinteger proc near push dx push bx push ax mov ah.offset buff int 21h mov bx.offset buff add bx.0ah mov dx.ax pop ax pop bx pop dx ret readinteger endp readinteger1 proc near push dx push bx push ax mov ah.ax pop ax pop bx pop dx ret readinteger1 endp .2 push bx call atoi pop bx mov count.offset buff add bx.offset buff int 21h mov bx.

'0' mul bx pop dx add dx.00 mov al.[si] inc bx inc si cmp al..[si] sub al.1000..bx dec cx .100.cx=length of the string mov cx.sp push si push dx push cx push bx mov si.dx mov ah.bx mul cx ..dx mov cx. push dx push cx xor dx.10 mov ax.finding the length of the string mov bx.si is pointing outside the string so adjust dec si mov dx.atoi proc near push bp mov bp.dx:ax=digit xor dx.generate multiples bx=10.cr jne nxtch .[bp+4] .01 nxt: dec si push dx .00 nxtch: mov al.00 mov bx.ax .

ax pop cx pop dx loop nxt mov ax.'0' mov [si].'0' push dx inc cx cmp ax.'$' mov [si].al .al loop rpt2 inc si mov al.dx pop bx pop cx pop dx pop si pop bp ret atoi endp hex2asc proc near push ax push bx push cx push dx push si mov cx.00h mov bx.0Ah jge rpt1 add al.al rpt2: pop ax inc si mov [si].mov bx.00 div bx add dl.0Ah rpt1: mov dx.

.....: Total=:8956 .:02 Enter Element:11 Enter Element:22 After adding array element...............: How many elements to enter...........: How many elements to enter..: Total=:33 Program to add array of binary element............pop si pop dx pop cx pop bx pop ax ret hex2asc endp end Output: Program to add array of binary element.......:05 Enter Element:1234 Enter Element:22 Enter Element:134 Enter Element:2134 Enter Element:5432 After adding array element................

..offset msg int 21h mov ah. Write a program..data cr equ 0dh lf equ 0ah msg db cr.offset msg2 ... Ex: input = 4721 4 ^2 + 7 ^ 2 + 2 ^ 2 + 1 ^ 2 = 16+49+4+1 Result = 70(Display) Title program to sum of square of digits dosseg .lf.........ax mov ah..stack .."Enter Element:$" msg3 db cr.....:$" msg1 db cr..:$" msg4 db cr......."Program to sum of square of digits.lf........code main proc mov ax..lf..:$" msg2 db cr..lf."Enter 4 digits<xxxx>.09h mov dx.13.Read element count mov ah. and display the sum of square of digits as given below.. which takes the input of 4 digit number.offset msg1 int 21h ..."After adding digits.lf......model small ...@data mov ds."Total=:$" count dw ? tab1 dw 20 DUP(0) num dw ? tnum dw ? temp dw ? result db 10 DUP(0) buff db 80 db 0 db 80 DUP(?) .09h mov dx.09h mov dx...

09h mov dx.int 21h call readinteger mov cx.offset result int 21h skip2: mov ax.00 div bx mov num.ax mov tnum.00 mov temp.tnum mov dx.04 rpt: mov bx.offset msg3 int 21h mov ah.temp mov si.num mov dx.10 mov ax.ax mov ax.offset result call hex2asc mov ah.cx mov cx.offset msg4 int 21h mov ax.09h mov dx.00 mul bx add ax.num loop rpt .4c00h int 21h .09h mov dx.00 mov ax.00 mov ax.00 mov bx.dx mov ax.print result mov ah.temp mov temp.tnum mov bx.00 mov bx.

offset buff add bx.main endp readinteger proc near push dx push bx push ax mov ah.00 nxtch: mov al.ax pop ax pop bx pop dx ret readinteger endp atoi proc near push bp mov bp.2 push bx call atoi pop bx mov num.finding the length of the string mov bx.[si] inc bx inc si cmp al.bx dec cx .[bp+4] .offset buff int 21h mov bx.0ah mov dx.sp push si push dx push cx push bx mov si.cx=length of the string mov cx.cr jne nxtch .

..00h .00 mov al.100.si is pointing outside the string so adjust dec si mov dx..dx:ax=digit xor dx.bx mul cx mov bx.[si] sub al.'0' mul bx pop dx add dx.dx mov cx. push dx push cx xor dx.00 mov bx.ax .dx pop bx pop cx pop dx pop si pop bp ret atoi endp hex2asc proc near push ax push bx push cx push dx push si mov cx.generate multiples bx=10.1000..10 mov ax.01 nxt: dec si push dx .dx mov ah.ax pop cx pop dx loop nxt mov ax.

...............'0' push dx inc cx cmp ax.....al loop rpt2 inc si mov al.......al pop si pop dx pop cx pop bx pop ax ret hex2asc endp end Output: Program to sum of square of digits.: Enter Element:3421 After adding digits...0Ah jge rpt1 add al......: Enter Element:6743 After adding digits..00 div bx add dl....: Total=:110 ...'$' mov [si]...................mov bx.: Enter 4 digits<xxxx>....: Enter 4 digits<xxxx>.......: Total=:30 Program to sum of square of digits...........'0' mov [si].......0Ah rpt1: mov dx................al rpt2: pop ax inc si mov [si].

.$" msg2 db 13...14....02h ... 34h.09h int 21h mov cx.10. 34h...00 mov cl...num1[di] mov ah.....00 nxt: lea dx.10... 35h sum db 6 DUP(0) res db 10 DUP(0) ."Sum is:$" num1 db 31h...msg1 mov ah............"Element in second array."To calculate sum of 5 byte number stored in memory....$" msg4 db 13......10....09h int 21h mov dl.."Element is:$" msg3 db 13. 32h.data len equ 05h msg db 13.stack ..asm) Title add 5 byte numbers(num1 and num2 array) and stores the sum array named RESULT dosseg ... 32h.10....ax lea dx.10. Write a program which should adds two 5-byte numbers (numbers are stored in array NUM1 and NUM2 ) and stores the sum in another array named RESULT.model small ."Element in first array..msg mov ah.@data mov ds.05 mov di..msg2 mov ah......09h int 21h .. 33h... 33h..code main proc mov ax..print first array element lea dx. 35h num2 db 31h.$" msg1 db 13..... Prg(ad5bnm.

num2[si] mov ah.09h int 21h .09h int 21h mov dl.00 lea dx.00 mov cl.msg4 mov ah.00 mov cl.05 mov si.00 mov cl.msg2 mov ah.num1[si] adc al.00 mov cx.al inc si loop again rcl al.05 clc again:mov al.02h int 21h inc si loop nxt1 .01h and al.num2[si] mov sum[si].06 mov si.print second array element lea dx.00 nxt1:lea dx.al .adding 2 array element mov si.printing array sum mov cx.01h mov sum[si].int 21h inc di loop nxt .09h int 21h mov cx.msg3 mov ah.

...........02h int 21h inc si loop pnxt mov ax.................pnxt:mov dl............sum[si] mov ah... Element is:1 Element is:2 Element is:3 Element is:4 Element is:5 Element in second array......4c00h int 21h main endp end Output: To calculate sum of 5 byte number stored in memory......... Element is:1 Element is:2 Element is:3 Element is:4 Element is:5 Sum is:bdfhj ... Element in first array...........

10.10.10."To convert bcd number of 4 digit:$" msg1 db 13.1000 =3E8h msg db 13.code main proc mov ax."The number stored in memory is 4567h:$" msg6 db 13.10.10.09h int 21h lea dx."Stored in memory to binary equivalent:$" msg2 db 13.09h int 21h lea dx. Write a program which should convert 4 digits BCD number into its binary equivalent."Hex number for 10 is 0Ah:$" msg3 db 13.asm) Title convert 4 digit bcd number into its binary equivalent dosseg .09h int 21h lea dx."Its Hex number is 11D7h:$" msg7 db 13."After converting bcd number to binary number:$" msg8 db 13."Hex number for 100 is 64h:$" msg4 db 13.msg1 mov ah.15.msg4 mov ah.msg mov ah.10.msg2 mov ah.09h int 21h lea dx.@data mov ds.10. Prg(bcdbin.msg3 mov ah."Binary number is:$" bcd dw 4567h hex dw ? res db 40 DUP('$') ."Hex number for 1000 is 3E8h:$" msg5 db 13.ax lea dx.10.model small .09h int 21h .stack .data thou equ 3E8h .10.

msg7 mov ah.0F0Fh and bx.1000 to set to there place value mov ax.0F0Fh mov cx.ah mov bh.ax mov ax.bl mov cl.cl and ax.0000h mov al.09h int 21h .100.lea dx.09h int 21h lea dx.ax .msg5 mov ah.09h int 21h .cl ror bh.its hex value is stored in memory lea dx.000Ah mul bh add dx.printing the binary number .bcd mov bx.ax mov ax.ax mov al.converting bcd to binary mov ax.0064h mul cl add dx.msg6 mov ah.bl add dx.04 ror ah.00h mov dl.ch mov di.multiplying the number by 10.dx .thou mul di mov dh.ax mov hex.

0Ah jge rpt1 add al.00h mov bx.offset res mov ax.00 div bx add dl.00 mov si.'0' push dx inc cx cmp ax.msg8 mov ah.al rpt2: pop ax inc si mov [si].offset res mov ah.hex call hex2asc mov dx.al loop rpt2 .'0' mov [si].4c00h int 21h main endp hex2asc proc near push ax push bx push cx push dx push si mov cx.lea dx.09h int 21h mov ax.0Ah rpt1: mov dx.09h int 21h mov ax.

al pop si pop dx pop cx pop bx pop ax ret hex2asc endp end Output: To convert bcd number of 4 digit: Stored in memory to binary equivalent: Hex number for 10 is 0Ah: Hex number for 100 is 64h: Hex number for 1000 is 3E8h: The number stored in memory is 4567h: Its Hex number is 11D7h: After converting bcd number to binary number: Binary number is:4567 .inc si mov al.'$' mov [si].

unsigned integers.data cr equ 0dh lf equ 0ah msg db cr. Write a program to conduct a binary search on a given sorted array of 16 bit."Element Not found in the list:$" msg6 db cr."Program for Binary search.cx=count .Table Index bx=tab[1] .09h mov dx.code main proc mov ax."Element to be searched:$" msg4 db cr.lf."Element found in the list:$" msg5 db cr.ax mov ah. Prg(binser.lf.:$" msg1 db cr.02 .offset msg int 21h .Read element count mov ah."Enter Element:$" msg3 db cr.@data mov ds.lf.model small ."Number of Elements:$" msg2 db cr.09h mov dx..unsigned integer dosseg .stack .16.lf.lf.count mov bx.lf.lf.offset msg1 int 21h call readinteger mov cx."Element found at Location:$" count dw ? tab1 dw 20 DUP(0) num dw ? tnum dw ? result db 10 DUP(0) buff db 80 db 0 db 80 DUP(?) .asm) Title binary search on sorted array of 16 bit.

rdnxt: mov ah,09h mov dx,offset msg2 int 21h call readinteger1 mov ax,tnum mov tab1[bx],ax add bx,2 loop rdnxt mov ah,09h mov dx,offset msg3 int 21h call readinteger2 ;performing binary search,cx - low,dx-high,bx-mid mov cx,01 mov dx,count chknxt:cmp cx,dx jg nfound ;bx =mid = (low+high)/2 mov bx,cx add bx,dx shr bx,01 ;read data from the table push bx shl bx,01 mov ax,tab1[bx] pop bx cmp num,ax je found jl lhalf ;low = mid +1 inc bx mov cx,bx jmp skip1 lhalf: dec bx mov dx,bx skip1: jmp chknxt

;Data not found in the list nfound:mov ah,09h mov dx,offset msg5 int 21h jmp skip2 ;Data found in the list ;location of element is in bx register found: mov ah,09h mov dx,offset msg4 int 21h mov ax,bx mov si,offset result call hex2asc ;print result mov ah,09h mov dx,offset msg6 int 21h mov ah,09h mov dx,offset result int 21h skip2: mov ax,4c00h int 21h main endp readinteger proc near push dx push bx push ax mov ah,0ah mov dx,offset buff int 21h mov bx,offset buff add bx,2 push bx call atoi pop bx mov count,ax pop ax pop bx pop dx

ret readinteger endp readinteger1 proc near push dx push bx push ax mov ah,0ah mov dx,offset buff int 21h mov bx,offset buff add bx,2 push bx call atoi pop bx mov tnum,ax pop ax pop bx pop dx ret readinteger1 endp readinteger2 proc near push dx push bx push ax mov ah,0ah mov dx,offset buff int 21h mov bx,offset buff add bx,2 push bx call atoi pop bx mov num,ax pop ax pop bx pop dx ret

dx mov ah.00 nxtch: mov al.si is pointing outside the string so adjust dec si mov dx.bx .'0' mul bx pop dx add dx.100..cx=length of the string mov cx.bx dec cx .ax .[si] inc bx inc si cmp al.[si] sub al.sp push si push dx push cx push bx mov si.10 mov ax.finding the length of the string mov bx.readinteger2 endp atoi proc near push bp mov bp.[bp+4] .00 mov bx.dx mov cx.dx:ax=digit xor dx.00 mov al.cr jne nxtch .generate multiples bx=10.01 nxt: dec si push dx .1000. push dx push cx xor dx...

00 div bx add dl.0Ah rpt1: mov dx.'0' mov [si].'$' mov [si].mul cx mov bx.ax pop cx pop dx loop nxt mov ax.al loop rpt2 inc si mov al.00h mov bx.al rpt2: pop ax inc si mov [si].dx pop bx pop cx pop dx pop si pop bp ret atoi endp hex2asc proc near push ax push bx push cx push dx push si mov cx.al .0Ah jge rpt1 add al.'0' push dx inc cx cmp ax.

pop si pop dx pop cx pop bx pop ax ret hex2asc endp end Output: Program for Binary search.: Number of Elements:05 Enter Element:5 Enter Element:99 Enter Element:250 Enter Element:545 Enter Element:999 Element to be searched:250 Element found in the list: Element found at Location:03 ..: Number of Elements:05 Enter Element:5 Enter Element:99 Enter Element:250 Enter Element:545 Enter Element:999 Element to be searched:100 Element Not found in the list: Program for Binary search..

asm) Title string concat dosseg .10.09h int 21h second:mov ah.01h int 21h cmp al.ax lea di.msg2 mov ah.code main proc mov ax.msg1 mov ah.24h je next .al inc di jmp first next: lea dx.al inc di jmp second . Prg(strcon. inc di mov [di].@data mov ds.24h je con .10.strg lea dx.model small .10.data msg1 db 13.stack .Session 8:Strings 1) Write a program which takes 2 string as input and display the concatenated string."Enter a string with dolar symbol as a break:$" msg2 db 13."Concated string is:$" strg db 20 DUP(0) ."Enter second string with dolar symbol as a break:$" msg3 db 13.09h int 21h first:mov ah. inc di mov [di].01h int 21h cmp al.

09h int 21h lea di.msg3 mov ah.[di] cmp al.con : lea dx.02h int 21h inc di jmp dis ou: mov ax.al mov ah.0 je ou mov dl.4c00h int 21h main endp end Output: Enter a string with dolar symbol as a break:saint$ Enter second string with dolar symbol as a break:alosius$ Concated string is:saintalosius .strg dis: mov al.

2) Write a program which converts string lower case character to upper case characters and upper case character to lower case characters. Prg(strul.asm) Title convert string upper case to lower case and lower case to upper case dosseg .model small .stack .data msg1 db 13,10,"Enter a string with dolar symbol as a break:$" msg2 db 13,10,"Modified string is:$" buf db 80 DUP(0) revbuf db 80 DUP(0) strlen db ? .code main proc mov ax,@data mov ds,ax lea dx,msg1 mov ah,09h int 21h lea si,buf read: mov ah,01h int 21h mov [si],al inc si cmp al,24h je check jmp read check:lea si,buf lea di,revbuf start:mov al,[si] cmp al,'$' je dis cmp al,60h jb lower cmp al,7Ah jb upper jmp start

lower:cmp al,40h jb skip cmp al,5Ah jb up up:add al,20h mov [di],al inc di inc si jmp start upper:cmp al,60h ja lo lo: sub al,20h mov [di],al inc di inc si jmp start skip: mov [di],al inc si inc di jmp start dis:mov al,'$' mov [di],al lea dx,msg2 mov ah,09h int 21h lea dx,revbuf mov ah,09h int 21h ou:mov ax,4c00h int 21h main endp end Output: Enter a string with dolar symbol as a break:SaiNt$ Modified string is:sAInT

3) Write a program for reversing a given string. Prg(strrev.asm) Title reversing a string dosseg .model small .stack .data msg1 db 13,10,"Enter a string with dolar symbol as a break:$" msg2 db 13,10,"Reverse of a string is:$" strg db 20 DUP(0) restr db 20 DUP(0) .code main proc mov ax,@data mov ds,ax mov es,ax mov di,00 lea dx,msg1 mov ah,09h int 21h read:mov ah,01h int 21h cmp al,24h je next inc di mov strg[di],al jmp read next: mov si,00 start:cmp di,0 je dmsg2 mov al,strg[di] mov restr[si],al inc si dec di jmp start dmsg2:lea dx,msg2 mov ah,09h int 21h

4c00h int 21h main endp end Output: Enter a string with dolar symbol as a break:saint$ Reverse of a string is:tnias .restr[di] cmp al.0 je ou mov dl.dis:mov al.al mov ah.02h int 21h inc di jmp dis ou: mov ax.

data msg1 db 13. If ‘NO’ output the message “No it is not a palindrome”.ax lea dx.09h int 21h lea si.24h je rev inc bx jmp count .00 count:mov al.[si] inc si .model small .buf mov bx.msg1 mov ah.4) Write a program to determine a given string is a palindrome."String length is:$" msg4 db 13.10.buf read: mov ah.10.10.24h je cou jmp read cou: lea si. If ‘Yes ‘ output the message “The given string is a palindrome”."Enter a string with dolar symbol as a break:$" msg2 db 13.@data mov ds.10.code main proc mov ax.asm) Title string palindrome dosseg .inc bl cmp al.01h int 21h mov [si].al inc si cmp al. Prg(strpal."Not a Palindrome:$" buf db 80 DUP(0) revbuf db 80 DUP(0) strlen db ? .stack ."Reverse of a given string is:$" msg3 db 13.10."Is Palindrome:$" msg5 db 13.

al dec si inc di loop revst lea di.revbuf lea si.al jne pal inc di inc si loop check lea dx.buf lea di.09h int 21h lea si.09h .msg5 mov ah.09h int 21h jmp ou pal:lea dx.msg4 mov ah.revbuf mov cx.[si] cmp [di].00 mov cx.bx dec si revst:mov al.bx check:mov al.al dis:lea dx.rev: lea di.msg2 mov ah.revbuf mov ah.buf add si.09h int 21h lea dx.bx add si.bx mov al.bx mov cx.[si] mov [di].buf add di.revbuf lea si.[si] mov [di].

int 21h ou:mov ax.4c00h int 21h main endp end Output: Enter a string with dolar symbol as a break:srrs$ Reverse of a given string is:srrs Is Palindrome: .

model small . Prg(strchr.ax lea dx.01h int 21h mov [si].offset chr mov ah.al inc si mov al.09h int 21h read1:mov si.asm) Title count character occourence in a string dosseg .01h int 21h mov [si].10.24h je next jmp read next: lea dx.msg2 mov ah.5) Write a program to search a character in a given string and calculate the number of occurrence of the character in the given string.@data mov ds.24h mov [si]."Enter a string with dolar symbol as a break:$" msg2 db 13.msg1 mov ah.al inc si cmp al.10.code main proc mov ax."Enter a character to count:$" msg3 db 13.al .offset buf read: mov ah.09h int 21h mov si.stack .data msg1 db 13.10."Number of times occoured in a given string:$" buf db 80 DUP(0) chr db 10 DUP('$') strlen db ? res db 10 DUP('$') .

offset buf mov ax.[si] cmp al.'$' je dis inc si jmp check count:inc bl inc si jmp check dis:mov strlen.res mov ah.00h .strlen call hex2asc lea dx.msg3 mov ah.00 mov di.00 mov si.offset chr check:mov al.res mov ax.09h int 21h lea dx.mov bx.09h int 21h ou:mov ax.4c00h int 21h main endp hex2asc proc near push ax push bx push cx push dx push si mov cx.bl lea si.[di] je count cmp al.00 mov al.

al rpt2: pop ax inc si mov [si].0Ah jge rpt1 add al.'0' mov [si].al pop si pop dx pop cx pop bx pop ax ret hex2asc endp end Output: Enter a string with dolar symbol as a break:saintalosius$ Enter a character to count:a Number of times occoured in a given string:02 .'$' mov [si].00 div bx add dl.mov bx.'0' push dx inc cx cmp ax.0Ah rpt1: mov dx.al loop rpt2 inc si mov al.

converts these values to binary and multiplies the two values."Second number in 1th position is:$" msg6 db 13."Result is:$" num1 db ? num2 db ? total db ? res db 20 DUP('$') .code main proc mov ax.10.10."Enter the two number <xx>:$" msg4 db 13.asm) Title program to accepts two input values of single ASCII digit.10.10.stack .10.09h int 21h lea dx.msg3 mov ah.09h int 21h . Prg(2isamul.10.msg mov ah."Enter two values whose result is less then 250:$" msg3 db 13."Program to accepts two numbers from single ASCII digit:$" msg1 db 13. .msg2 mov ah."Multiply two numbers and store it in AL register:$" msg2 db 13.msg1 mov ah.09h int 21h .reading the two number lea dx.09h int 21h lea dx.Lab Assignment: 1) Write and run an assembly language program that accepts two input values of single ASCII digit each."First number in 10th position is :$" msg5 db 13.converts these values to binary and multiplies the two values .10.ax lea dx. The Result is kept in AL register.model small .data msg db 13.@data mov ds.Result is kept in AL register dosseg .

09h int 21h mov ax.msg6 mov ah.call readinteger .offset res mov ah.printing the first number lea dx.offset res mov al.00 mov si.num1 mul bl mov total.09h int 21h .00 mov bl.printing the second number lea dx.00 mov bx.offset res mov ah.multiplying the two numbers mov ax.num1 call hex2asc mov dx.al .num2 mov al.printing the total lea dx.09h int 21h .msg5 mov ah.09h int 21h mov ax.num2 call hex2asc mov dx.msg4 mov ah.printing the two numbers .00 mov si.00 mov si.09h int 21h mov ax.offset res .offset res mov al.

'0' mov num2.10 mov ah.'0' mul bl mov num1.01h int 21h sub al.'0' push dx .01h int 21h sub al.00 mov bl.0Ah rpt1: mov dx.00 div bx add dl.total call hex2asc mov dx.4c00h int 21h main endp readinteger proc near mov bx.00h mov bx.mov al.al mov ah.09h int 21h mov ax.offset res mov ah.al ret readinteger endp hex2asc proc near push ax push bx push cx push dx push si mov cx.

al rpt2: pop ax inc si mov [si].'$' mov [si].'0' mov [si].0Ah jge rpt1 add al.inc cx cmp ax.al pop si pop dx pop cx pop bx pop ax ret hex2asc endp end Output: Program to accepts two numbers from single ASCII digit: Multiply two numbers and store it in AL register: Enter two values whose result is less then 250: Enter the two number <xx>:23 First number in 10th position is :20 Second number in 1th position is:03 Result is:60 .al loop rpt2 inc si mov al.

09h int 21h lea dx. Prg(stride.asm) Title program to check if two string are identical or not."Entered two string are not identical:$" buf db 80 DUP(0) revbuf db 80 DUP(0) .code main proc mov ax.al .@data mov ds."End the string with dolor as break symble:$" msg2 db 13.ax lea dx. dosseg .09h int 21h lea dx.09h int 21h .01h int 21h mov [si].msg3 mov ah.10.data msg db 13."Program to check two strings entered identical or Not:$" msg1 db 13.buf read: mov ah."Enter the second string:$" msg5 db 13.msg2 mov ah.reading first string lea dx.10."Entered two string are identical:$" msg6 db 13.10."Enter two strings of equal length:$" msg3 db 13.model small . Assume that the strings are stored one after the other in the memory.09h int 21h lea si.10. otherwise the output should be NOT IDENTICAL.10.msg1 mov ah. In case the two strings are identical the program output should be IDENTICAL.10.10.msg mov ah.2) Write and run an assembly program that checks if two strings are identical."Enter first string:$" msg4 db 13.stack .

al inc si cmp al.09h int 21h lea si.revbuf mov cx.24h je sec jmp read .[si] inc si cmp al.al jne pal inc di inc si loop check lea dx.buf cou1: mov al.00 lea si.reading second string sec: lea dx.msg5 mov ah.00 mov cx.buf lea di.bx check:mov al.01h int 21h mov [si].00 mov cx.msg4 mov ah.inc si cmp al.09h int 21h .[si] cmp [di].revbuf read1: mov ah.24h je cou jmp read1 cou: mov bx.24h je dis inc bx jmp cou1 dis: lea si.

"Enter second number:$" msg3 db cr.."Program to multiply two number passed as paramets to subfunction.lf.jmp ou pal:lea dx.lf.09h int 21h ou:mov ax..4c00h int 21h main endp end Output: Program to check two strings entered identical or Not: End the string with dolor as break symble: Enter two strings of equal length: Enter first string:saint$ Enter the second string:saint$ Entered two string are identical: F:\masm>stride Program to check two strings entered identical or Not: End the string with dolor as break symble: Enter two strings of equal length: Enter first string:staint$ Enter the second string:saint$ Entered two string are not identical: 3) Write and run a assembly subroutine that multiplies two numbers passed to it as parameters..asm) Title program to multiply two numbers passed as parameter dosseg ...lf.msg6 mov ah."Enter firs numbe:$" msg2 db cr."After multiply the two number."Total=:$" num1 dw ? .....:$" msg4 db cr.:$" msg1 db cr......lf.lf.. Prg(submul.....data cr equ 0dh lf equ 0ah msg db cr.model small .... You must write and run the appropriate main program that calls the subroutine...stack ..

09h int 21h lea dx.msg2 mov ah.msg3 mov ah.multiplying the two numbers lea dx.09h int 21h call readinteger1 .00 mov si.offset result mov ah.ax lea dx.msg4 mov ah.msg mov ah.num2 dw ? total dw ? result db 30 DUP(0) buff db 80 db 0 db 80 DUP(?) .printing the total lea dx.@data mov ds.msg1 mov ah.09h int 21h call readinteger lea dx.09h int 21h mov ax.09h int 21h .offset result mov ax.09h int 21h call multiple .code main proc mov ax.total call hex2asc mov dx.

2 push bx call atoi pop bx mov num2.offset buff int 21h mov bx.4c00h int 21h main endp readinteger proc near push dx push bx push ax mov ah.offset buff int 21h mov bx.mov ax.2 push bx call atoi pop bx mov num1.0ah mov dx.0ah mov dx.offset buff add bx.ax pop ax pop bx pop dx ret readinteger endp readinteger1 proc near push dx push bx push ax mov ah.offset buff add bx.ax pop ax pop bx pop dx .

[si] inc bx inc si cmp al..generate multiples bx=10.bx dec cx .1000.01 nxt: dec si push dx .finding the length of the string mov bx.'0' mul bx pop dx add dx.00 mov al.00 nxtch: mov al.[bp+4] .dx .dx:ax=digit xor dx.100.ret readinteger1 endp atoi proc near push bp mov bp.[si] sub al.ax . push dx push cx xor dx..cr jne nxtch .00 mov bx.dx mov ah.sp push si push dx push cx push bx mov si.si is pointing outside the string so adjust dec si mov dx.cx=length of the string mov cx..

00h mov bx.al loop rpt2 .10 mov ax.0Ah jge rpt1 add al.00 div bx add dl.bx mul cx mov bx.'0' mov [si].'0' push dx inc cx cmp ax.al rpt2: pop ax inc si mov [si].dx pop bx pop cx pop dx pop si pop bp ret atoi endp hex2asc proc near push ax push bx push cx push dx push si mov cx.ax pop cx pop dx loop nxt mov ax.mov cx.0Ah rpt1: mov dx.

..........ax ret multiple endp end Output: Program to multiply two number passed as paramets to subfunction...num1 mov bx.: Total=:400 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>END<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< .: Total=:100 Program to multiply two number passed as paramets to subfunction..'$' mov [si]..........inc si mov al.: Enter firs numbe:10 Enter second number:10 After multiply the two number.......al pop si pop dx pop cx pop bx pop ax ret hex2asc endp multiple proc near mov ax..num2 mul bx mov total............: Enter firs numbe:20 Enter second number:20 After multiply the two number...........

Develop and execute an assembly language program to find the HCF of two unsigned 16 bit numbers. Write a program to convert a string in upper case to lower case of lower case to upper case. 7. Write a program to find the sum of two BCD numbers stored in memory.( Repeated in session 8: Strings) . (Repeat of programe 1 in session 3 and 4 :Simple assembly program) 6.5.

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.