SlideShare una empresa de Scribd logo
1 de 7
(COMPUTER SYSTEMS AND PLATFORM
TECHNOLOGIES)
EXERCISE
5
String Manipulation using TASM Environment
ROBIN VIDAL Name of Professor
Data Performed Date Submitted
OBJECTIVES:
1. To create a program in assembler using the TASM or Turbo Assembler
2. To learn how to process string in assembly language programming using the data types and
data definition, and the string input and output subroutines
DISCUSSION:
The assembler supports all the various data types of the 80x86microprocessor by providing data
directives that define the data types and set aside memory for them.
Assembler data directives:
 ORG (origin)
ORG is used to indicate the beginning of the offset address. The number that c
o
m
e
s
after ORG
can either in hex or in decimal
 DB (define byte)
It allows allocation of memory in byte – seized chunks. This is indeed the s
m
a
l
l
e
s
t allocation unit
permitted. DB can be used to define numbers in decimal, binary, hexadecimal, and ASCII. For
decimal, the D after the decimal number is optional, but using B(binary), and H (hexadecimal) for the
others is required. Using ASCII, simply place it in single/double quotation m arks for indication.
 DUP (duplicate)
DUPisusedtoduplicateagivennumberofcharacters.Thiscanavoidalotoft
y
p
i
n
g
.
 EQU (equate)
This is used to define a constant without occupying a memory location. EQU d
o
e
s
not set
aside storage for data item but associates a constant value with a data label so that when the label
appears inthe program; itsconstant value will be substitutedfor thelabel.
 DD (define double-word)
TheDDdirectiveisusedtoallocatememorythatare4bytes(twowords)insize.
 DQ (define quad-word)
DQ is used to allocate memory 8 bytes (four words) in size.
 DT (define ten bytes)
DT is used for memory allocation of packed BCD numbers.
String Input and Output Routines
Function : String Output
Purpose : Sends a string of characters to the standard output device (monitor). On
Entry : AH = 09H
DS = segment address of the first character of the string DX =
offset address of the first character of the string
On Exit : None
Note: Function 09 displays a string of characters starting with the first character (address in
DS:DX) output, but not including the character “$”.
Function : Buffered Keyboard Input
Purpose : Reads a string of characters from the keyboard and places it in a buffer. On
Entry : AH = 0AH
DS = segment address of the input buffer DX
= offset address of the input buffer
On Exit : String in buffer at DS:DX
PROCEDURE:
1. In the current DOS window for TASM, change to the drive and/or directory where your program is
located.
2. In the current directory, type edit tasm to activate the assembler TASM. Write the following sample
program.
.MODEL SMALL
.STACK
.DATA
var db ’This is a sample program using data types and data definition…’,13,10,’$’
.CODE
START:
MOV AX, @DATA
MOV DS,AX
MOV AH,09
LEA DX, var
INT 21H
MOV AH, 4CH
INT 21H
END START
3. Execute the given program. What is the output?
4. Explain the flow of the program.
- The flow of the program is you have to declare first what is the output and then create new location
for it and just repeat the program you have created until you are down to the last variable
SUPPLEMENTARY PROBLEM:
Develop a program that will produce the given output below. Save your file as
resume[surname].asm, assemble then run the program in the command prompt.
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<name>
<address>
<contact no.>
<e-mail add.>
Birthday:
Birthplace:
Civil Status:
Father:
Mother:
Age:
Citizenship:
Religion:
Occupation:
Occupation:
EDUCATIONAL BACKGROUND:
Primary:
Secondary:
Tertiary:
CHARACTER REFERENCES:
<name>, <position>
<address>,<contact no.>
<name>, <position>
<address>,<contact no.>
<name>, <position>
<address>,<contact no.>
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SCREENSHOTS
Lab 5 - String Manipulation usingTASM Environment-1.docx

Más contenido relacionado

Similar a Lab 5 - String Manipulation usingTASM Environment-1.docx

Programming basic computer
Programming basic computerProgramming basic computer
Programming basic computer
Martial Kouadio
 
Lec 04 intro assembly
Lec 04 intro assemblyLec 04 intro assembly
Lec 04 intro assembly
Abdul Khan
 
cmp104 lec 8
cmp104 lec 8cmp104 lec 8
cmp104 lec 8
kapil078
 
C programming session 01
C programming session 01C programming session 01
C programming session 01
Dushmanta Nath
 
Unit 3 assembler and processor
Unit 3   assembler and processorUnit 3   assembler and processor
Unit 3 assembler and processor
Abha Damani
 

Similar a Lab 5 - String Manipulation usingTASM Environment-1.docx (20)

Chap03[1]
Chap03[1]Chap03[1]
Chap03[1]
 
20 -miscellaneous
20  -miscellaneous20  -miscellaneous
20 -miscellaneous
 
Mp lab manual
Mp lab manualMp lab manual
Mp lab manual
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
 
Programming basic computer
Programming basic computerProgramming basic computer
Programming basic computer
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
 
7986-lect 7.pdf
7986-lect 7.pdf7986-lect 7.pdf
7986-lect 7.pdf
 
Chapter 2 programming concepts - I
Chapter 2  programming concepts - IChapter 2  programming concepts - I
Chapter 2 programming concepts - I
 
Assembly Language Basics
Assembly Language BasicsAssembly Language Basics
Assembly Language Basics
 
Introduction of 8086 micro processor .
Introduction of 8086 micro processor .Introduction of 8086 micro processor .
Introduction of 8086 micro processor .
 
Lec 04 intro assembly
Lec 04 intro assemblyLec 04 intro assembly
Lec 04 intro assembly
 
X86 assembly nasm syntax
X86 assembly nasm syntaxX86 assembly nasm syntax
X86 assembly nasm syntax
 
Draft sas and r and sas (may, 2018 asa meeting)
Draft sas and r and sas (may, 2018 asa meeting)Draft sas and r and sas (may, 2018 asa meeting)
Draft sas and r and sas (may, 2018 asa meeting)
 
MASM -UNIT-III
MASM -UNIT-IIIMASM -UNIT-III
MASM -UNIT-III
 
cmp104 lec 8
cmp104 lec 8cmp104 lec 8
cmp104 lec 8
 
Input-output
Input-outputInput-output
Input-output
 
Microprocessor chapter 9 - assembly language programming
Microprocessor  chapter 9 - assembly language programmingMicroprocessor  chapter 9 - assembly language programming
Microprocessor chapter 9 - assembly language programming
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
C programming session 01
C programming session 01C programming session 01
C programming session 01
 
Unit 3 assembler and processor
Unit 3   assembler and processorUnit 3   assembler and processor
Unit 3 assembler and processor
 

Más de CCSSenatorAbogadoAj

Más de CCSSenatorAbogadoAj (19)

Diving Deep for Synonyms and Antonyms.pdf
Diving Deep for Synonyms and Antonyms.pdfDiving Deep for Synonyms and Antonyms.pdf
Diving Deep for Synonyms and Antonyms.pdf
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
out.pdf
out.pdfout.pdf
out.pdf
 
Hannok_Wanwisa_Spring-202011.pdf
Hannok_Wanwisa_Spring-202011.pdfHannok_Wanwisa_Spring-202011.pdf
Hannok_Wanwisa_Spring-202011.pdf
 
Job Matching Experiences of Cotabato State University (CSU) Public Administra...
Job Matching Experiences of Cotabato State University (CSU) Public Administra...Job Matching Experiences of Cotabato State University (CSU) Public Administra...
Job Matching Experiences of Cotabato State University (CSU) Public Administra...
 
Jenjen-Done..docx
Jenjen-Done..docxJenjen-Done..docx
Jenjen-Done..docx
 
local_media5375011518898876798.docx
local_media5375011518898876798.docxlocal_media5375011518898876798.docx
local_media5375011518898876798.docx
 
Justification.docx
Justification.docxJustification.docx
Justification.docx
 
Environmental Awareness and Practices-RESEARCH.docx
Environmental Awareness and Practices-RESEARCH.docxEnvironmental Awareness and Practices-RESEARCH.docx
Environmental Awareness and Practices-RESEARCH.docx
 
AU-Project-Report-Fulltext-132299.PDF
AU-Project-Report-Fulltext-132299.PDFAU-Project-Report-Fulltext-132299.PDF
AU-Project-Report-Fulltext-132299.PDF
 
Activity-Shella.docx
Activity-Shella.docxActivity-Shella.docx
Activity-Shella.docx
 
azrael_activity.docx
azrael_activity.docxazrael_activity.docx
azrael_activity.docx
 
argumentative essay on the issue of the government's transport modernization ...
argumentative essay on the issue of the government's transport modernization ...argumentative essay on the issue of the government's transport modernization ...
argumentative essay on the issue of the government's transport modernization ...
 
Ayumi_Activity.docx
Ayumi_Activity.docxAyumi_Activity.docx
Ayumi_Activity.docx
 
Activity_100pesos.docx
Activity_100pesos.docxActivity_100pesos.docx
Activity_100pesos.docx
 
Activity1&2.docx
Activity1&2.docxActivity1&2.docx
Activity1&2.docx
 
UPCAT_Reviewer_2021_2022.docx
UPCAT_Reviewer_2021_2022.docxUPCAT_Reviewer_2021_2022.docx
UPCAT_Reviewer_2021_2022.docx
 
Weekly Assessment # 2.pdf
Weekly Assessment # 2.pdfWeekly Assessment # 2.pdf
Weekly Assessment # 2.pdf
 
Weekly Assessment # 2.docx
Weekly Assessment # 2.docxWeekly Assessment # 2.docx
Weekly Assessment # 2.docx
 

Último

Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
imonikaupta
 
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
nirzagarg
 

Último (20)

Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 

Lab 5 - String Manipulation usingTASM Environment-1.docx

  • 1. (COMPUTER SYSTEMS AND PLATFORM TECHNOLOGIES) EXERCISE 5 String Manipulation using TASM Environment ROBIN VIDAL Name of Professor Data Performed Date Submitted
  • 2. OBJECTIVES: 1. To create a program in assembler using the TASM or Turbo Assembler 2. To learn how to process string in assembly language programming using the data types and data definition, and the string input and output subroutines DISCUSSION: The assembler supports all the various data types of the 80x86microprocessor by providing data directives that define the data types and set aside memory for them. Assembler data directives:  ORG (origin) ORG is used to indicate the beginning of the offset address. The number that c o m e s after ORG can either in hex or in decimal  DB (define byte) It allows allocation of memory in byte – seized chunks. This is indeed the s m a l l e s t allocation unit permitted. DB can be used to define numbers in decimal, binary, hexadecimal, and ASCII. For decimal, the D after the decimal number is optional, but using B(binary), and H (hexadecimal) for the others is required. Using ASCII, simply place it in single/double quotation m arks for indication.  DUP (duplicate) DUPisusedtoduplicateagivennumberofcharacters.Thiscanavoidalotoft y p i n g .  EQU (equate) This is used to define a constant without occupying a memory location. EQU d o e s not set aside storage for data item but associates a constant value with a data label so that when the label appears inthe program; itsconstant value will be substitutedfor thelabel.  DD (define double-word) TheDDdirectiveisusedtoallocatememorythatare4bytes(twowords)insize.  DQ (define quad-word) DQ is used to allocate memory 8 bytes (four words) in size.  DT (define ten bytes) DT is used for memory allocation of packed BCD numbers. String Input and Output Routines Function : String Output Purpose : Sends a string of characters to the standard output device (monitor). On Entry : AH = 09H DS = segment address of the first character of the string DX = offset address of the first character of the string On Exit : None
  • 3. Note: Function 09 displays a string of characters starting with the first character (address in DS:DX) output, but not including the character “$”. Function : Buffered Keyboard Input Purpose : Reads a string of characters from the keyboard and places it in a buffer. On Entry : AH = 0AH DS = segment address of the input buffer DX = offset address of the input buffer On Exit : String in buffer at DS:DX PROCEDURE: 1. In the current DOS window for TASM, change to the drive and/or directory where your program is located. 2. In the current directory, type edit tasm to activate the assembler TASM. Write the following sample program. .MODEL SMALL .STACK .DATA var db ’This is a sample program using data types and data definition…’,13,10,’$’ .CODE START: MOV AX, @DATA MOV DS,AX MOV AH,09 LEA DX, var INT 21H MOV AH, 4CH INT 21H END START
  • 4. 3. Execute the given program. What is the output?
  • 5. 4. Explain the flow of the program. - The flow of the program is you have to declare first what is the output and then create new location for it and just repeat the program you have created until you are down to the last variable SUPPLEMENTARY PROBLEM: Develop a program that will produce the given output below. Save your file as resume[surname].asm, assemble then run the program in the command prompt. ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| <name> <address> <contact no.> <e-mail add.> Birthday: Birthplace: Civil Status: Father: Mother: Age: Citizenship: Religion: Occupation: Occupation: EDUCATIONAL BACKGROUND: Primary: Secondary: Tertiary: CHARACTER REFERENCES: <name>, <position> <address>,<contact no.> <name>, <position> <address>,<contact no.> <name>, <position> <address>,<contact no.> ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||