Write and execute an alp to 8086 Microprocessor to find the length of a given string which terminates with a special character
Aim:
To write an assembly language program to find the length of the given string.
Tools:
PC installed with TASM.
Program:
ASSUME CS : CODE, DS : DATA CODE SEGMENT MOV AX, DATA MOV DS, AX MOV AL, ’$’ MOV CX, 00H MOV SI, OFFSET STR1 BACK : CMP AL, [SI] JE GO INC CL INC SI JMP BACK GO : MOV LENGTH, CL HLT CODE ENDS DATA SEGMENT STR1 DB ‘STUDENT BOX OFFICE$’ LENGTH DB ? DATA ENDS END
Flow Chart:
Result:
Input:
STR (DS : 0000H) = STUDENT BOX OFFICE
Output:
LENGTH = 18
Viva-voce questions:
1. How does the CPU identify between 8-bit and 16-bit operations? 2. What is the ASCII value of ‘@’? 3. How to convert BCD to ASCII and ASCII to BCD? 4. What is the difference between packed BCD and unpacked BCD? 5. What are the different machine level instruction codes of 8086 µP?
-
UpdatedNov 05, 2014
-
Views33,182
Write and execute an alp to 8086 Microprocessor to add, subtract and multiply two 16 bit unsigned numbers. Store the result in extra segment
Write and execute an alp to 8086 Microprocessor to a sort the give array of 32 bit number in ascending and descending order.
Program to generate following waveforms
- Ramp waveform
- Square waveform
- Step waveform
- Triangle waveform
Write and execute an alp to 8086 Microprocessor to find the length of a given string which terminates with a special character
Write and execute an alp to 8086 Microprocessor to divide a 32 bit unsigned numbers by a 16 bit unsigned number. Store the result in stack segment
Interface a stepper motor to 8086 and operate it in clock wise and anticlockwise by choosing variable stepsize.