Preview

Assembly Language Example Programs

Satisfactory Essays
Open Document
Open Document
1874 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Assembly Language Example Programs
(1)
.model small
.stack 100h
.data

dis1 db "Enter First Character:$" dis2 db "Enter Second Character:$" nme db "ASSEMBLY$"

.code start: mov ax, @data mov ds, ax

mov ah, 9h lea dx, dis1 int 21h

mov ah, 1h int 21h

mov bl, al

mov ah, 2h mov dl, 0ah int 21h

mov dl, 0dh int 21h

mov ah, 9h lea dx, dis2 int 21h

mov ah, 1h int 21h

mov bh, al

mov ah, 2h mov dl, 0ah int 21h

mov dl, 0dh int 21h

mov ah, 2h mov dl, bl int 21h int 21h int 21h int 21h int 21h int 21h int 21h int 21h int 21h int 21h

mov ah, 2h mov dl, 0ah int 21h

mov dl, 0dh int 21h

mov dl, bl int 21h

mov ah, 9h lea dx, nme int 21h

mov ah, 2h mov dl, bh int 21h

mov ah, 2h mov dl, 0ah int 21h

mov dl, 0dh int 21h

mov ah, 2h mov dl, bh int 21h int 21h int 21h int 21h int 21h int 21h int 21h int 21h int 21h int 21h

mov ah, 4ch int 21h

end start

(2)
.model small
.stack 100h
.data

ch0 db "Corresponding Letter for Color$" ch1 db 0ah, 0dh,"A. Blue$" ch2 db 0ah, 0dh, "B. Yellow$" ch3 db 0ah, 0dh, "C. Red$" selection db 0ah, 0dh, "Enter Chosen Letter of Color: $" void db "Invalid Selection of Choices!$" nam db "ASSEMBLY$"

.code start: mov ax, @data mov ds, ax

mov ah, 9h lea dx, ch0 int 21h

lea dx, ch1 int 21h

lea dx, ch2 int 21h

lea dx, ch3 int 21h

lea dx, selection int 21h

mov ah, 1h int 21h

mov cl, al

cmp cl, 'a' je blue

cmp cl, 'b' je yellow

cmp cl, 'c' je red

cmp cl, 'A' je blue

cmp cl, 'B' je yellow

cmp cl, 'C' je red

mov ah, 2h mov dl, 0ah int 21h

mov dl, 0dh int 21h

mov ah, 9h lea dx, void int 21h

jmp ext

blue: mov ah, 2h mov dl, 0ah int 21h

mov dl, 0dh int 21h

mov ah, 9h mov bl, 1 mov cx, 8 int 10h

lea dx, nam int 21h

jmp ext

yellow: mov ah, 2h mov dl, 0ah int 21h

mov dl, 0dh int 21h

mov ah, 9h mov bl, 6 mov cx, 8 int 10h

lea dx, nam int 21h

jmp ext

red: mov ah, 2h mov dl, 0ah int 21h

mov dl, 0dh int 21h

mov ah, 9h mov bl, 4 mov cx, 8 int 10h

lea dx, nam int 21h

jmp ext

ext:

mov ah, 4ch int 21h

end start

3)
.model small
.stack 100h
.data
string db

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Garbage Collector in C#: Runtime has a Garbage Collector Which cleans the objects that are not in use.…

    • 485 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Printer Qualities: Resolution � dpi; Print Speed (and memory); Cost to Purchase; Cost to Run (cost per page; monthly pages & maintenance)…

    • 648 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Intro to Computers

    • 609 Words
    • 3 Pages

    | Allows users to organize data in rows and columns and perform calculations and recalculate when data changes.…

    • 609 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    F f of if I defined dxid I a. mg h j oh g g crucible g I off of go lglg pg of Dhgsvdhsbhshshshshshsgsgsbbgucjjjcu h I just h h gig exit gg Dhgsvdhsbhshshshshshsgsgsbbgucjjjcu h I just h h gig exit gg of g I f if lg g I f of of if I defined dxid I a. mg h j oh g g crucible g I off of go lglg pg of of. F f g I f Dhgsvdhsbhshshshshshsgsgsbbgucjjjcu h I just h h gig exit gg of g I f if lg g I f of of if I defined dxid I a. mg h j oh g g crucible g I off of go lglg pg of of. F f lg g I f Dhgsvdhsbhshshshshshsgsgsbbgucjjjcu h I just h h gig exit gg of g I f if lg g I f of of if I defined dxid I a. mg h j oh g g crucible g I off of go lglg pg of of. F f of if I defined dxid I a. mg h j oh g g crucible g I off of go lglg pg of of. F f. F fDhgsvdhsbhshshshshshsgsgsbbgucjjjcu h I just h h gig exit gg of g I f if lg g I f of of if I defined dxid I a. mg h j oh g g crucible g I off of go lglg pg…

    • 603 Words
    • 3 Pages
    Satisfactory Essays
  • Best Essays

    Program Summary

    • 2232 Words
    • 9 Pages

    Retrieved January 8, 2009, from Axia College, Week 1 Reading, aXcess, HSM 270 ' '…

    • 2232 Words
    • 9 Pages
    Best Essays
  • Good Essays

    Warehouse Profiling Case

    • 1329 Words
    • 6 Pages

    WHERE (((ques7.C) Is Null) AND ((ques7.D) Is Null) AND ((ques7.E) Is Null) AND ((ques7.G) Is Null));…

    • 1329 Words
    • 6 Pages
    Good Essays
  • Good Essays

    Time Warner Cable (TWC) is one of the nation’s largest cable companies and being such has a large network of hardware and software at its disposal. According to "Time Warner Cable" (2013), its mission statement is to connect people and businesses with information, entertainment, and to give customers controls that are simple and easy to use. TWC utilizes Microsoft Windows XP and Microsoft Office giving the employees access from a TWC location or by a virtual private network (VPN) setup by the employee. Employees also have access to web based email that can be accessed via the internet anywhere in the World. In today’s business environment, technology is continually changing and improving. Operating systems and applications are used within companies worldwide to gather, disseminate, and control the flow of information. The application software can range from general covering a broad spectrum of information to addressing very specific information, enabling an organization to meet objectives.…

    • 796 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Intro to Programming

    • 390 Words
    • 2 Pages

    Procedure Programming identifies steps and procedures on a (step-by-step) hierarchal method, while Object Oriented Programming does not result from step-by-step procedure and is more focused on problem solving elements.…

    • 390 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Unit 4 Study guide

    • 344 Words
    • 2 Pages

    6. State the steps that the SUBB instruction will go through for each of the following:…

    • 344 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Chemalite Case Study

    • 395 Words
    • 2 Pages

    Problem Set #2: Chemalite Case 1. Record the effects of Chemalite’s 1991 events on the BSE worksheet Cash Flow type (O, I, F) Event Cash A/R 375,000 F P1 (7,500)…

    • 395 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Dos Commands

    • 802 Words
    • 4 Pages

    APPEND Allows programs to open data files in specified directories as if they were in the current directory.…

    • 802 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Programming fundamentals

    • 299 Words
    • 2 Pages

    Note. This assignment is cumulative and the information and results will be used in the following weeks.…

    • 299 Words
    • 2 Pages
    Satisfactory Essays
  • Better Essays

    Alkali Metals

    • 1243 Words
    • 5 Pages

    Alkali metals refer to six elements belonging to the Group IA of the long form of the Modern Periodic Table, viz. Lithium (Li), Sodium (Na), Potassium (K), Rubidium (Rb), Cesium (Cs) and Francium (Fr). Fr is a radioactive element. These elements are called so because they form strongly alkaline oxides and hydroxides.…

    • 1243 Words
    • 5 Pages
    Better Essays
  • Powerful Essays

    A smart phone is definitely a mini computer that will do the same as a larger computer, as well as work as a phone and a camera. The smart phone processes information through aps to help a user to work, or just to be entertained, as well as surf the internet.…

    • 1161 Words
    • 5 Pages
    Powerful Essays
  • Satisfactory Essays

    BIOS and CMOS are two terms that many people think they know but cannot differentiate between. BIOS and CMOS are two different and distinct things in a computer, but being closely related, they are spoken of almost interchangeably. BIOS (basic Input Output System) is a program containing instructions for the start up of a computer, whereas CMOS (complimentary metal oxide semiconductor) is where all this BIOS information such as date, time, and system configuration details that are needed to start the computer are stored. Yes, they are closely related and perform very important functions at the startup of a computer but they cannot be more dissimilar also. Let us find the difference between BIOS and CMOS that seems to be so very confusing. In the simplest of terms, BIOS is a computer program that controls the computer when you switch on the power until the time the operating system of the computer takes over. Since BIOS is a firmware, it cannot store even this small bit of information, and CMOS it is that is used by BIOS to store the variable data.…

    • 456 Words
    • 2 Pages
    Satisfactory Essays

Related Topics