write a program to simulate

3
CODECARTA CODECARTA | CODE ENCYCLOPEDIA | REFERANCE | WORKSHOP|C/C++ CATEGORIES 4th semester (27) 5th semester (3) ADA (13) Assembly Level Language (12) bachelor of engineering (30) basic (1) basic mathematics (2) BE (45) beginners (10) C language (20) C Language Programming (5) C++ Language (5) c++ program (9) calculations (7) CCP Lab programing (3) Computer Programming Lab (3) computer science (30) DAA Lab Programming (13) Data Structure and C++ laboratory Program (6) Data Structure and C++ labotary Program (5) Design and Analysis of algorithm (14) downloadable (5) engineering syllabus (4) First Year (5) MASM (12) Microprocessor (12) Microprocessor lab program (12) simple program (6) System Software & OS Laboratory (5) Unix program (4) TREND POSTS PROGRAM 1(Quadratic Equation)|First Year Engineering Computer Lab Programming|VTU Syllabus 2013| Friday, February 21, 2014 5:11 PM | Posted by shamnas cv | ASSUME CS: CODE CODE SEGMENT ; code segment starts START: MOV BX, 00 ; initialize counter BX as 00 REPEAT: PUSH BX ; save the BX value in stack memory. MOV AH, 07H ; BIOS service number to clear the screen MOV AL, 00H ; Number of lines to scroll; 00 blank screen. MOV BH, 0FH ; attribute of character; 0F white and 00 black MOV CX, 00H ; CH=00 Y coordinate of upper left corner and CL=00 X ; coordinate of upper right corner MOV DH, 31H ; Number of rows; Lower right row MOV DL, 79H ; Number of rows; Lower right row INT 10H ; BIOS interrupt to clear the screen is invoked MOV AH, 02H ;BIOS service number to set the cursor MOV BH, 00H ; set video Page number to 0 MOV DH, 0CH ; store row number in DH (Y coordinate) MOV DL, 25H ; store the column number (X) in DL register INT 10H ; BIOS interrupt to set the cursor is invoked POP BX ; pop the counter value stored in stack to BX MOV AL, BL ; copy the 8 bit (1 byte) counter value in BL to AL AAM ; convert Hex value in AL to unpacked BCD ADD AX, 3030H ; add 3030H to AX, to get the ASCII code of the converted no. MOV CX, AX ; store AX value temporally in CX MOV DL, AH ; display the upper digit of the counter value on the screen MOV AH, 02H ; using 02H service no. with DOS 21H interrupt. INT 21H MOV DL, CL ; display the lower digit of the counter value on the screen MOV AH, 02H ; using 02H service no. with DOS 21H interrupt INT 21H WRITE A PROGRAM TO SIMULATE A DECIMAL UPCOUNTER TO DISPLAY 00 99. HOME

Upload: pankaj-sinha

Post on 10-Nov-2015

13 views

Category:

Documents


4 download

DESCRIPTION

NA

TRANSCRIPT

  • 5/18/2015 WriteaprogramtosimulateaDecimalUpcountertodisplay0099.|CODECARTA

    http://codecarta.blogspot.in/2014/02/writeprogramtosimulatedecimalup.html 1/3

    CODECARTACODECARTA|CODEENCYCLOPEDIA|REFERANCE|WORKSHOP|C/C++

    CATEGORIES

    4thsemester(27)5thsemester(3)ADA(13)AssemblyLevelLanguage(12)bachelorofengineering(30)basic(1)basicmathematics(2)BE(45)beginners(10)Clanguage(20)CLanguageProgramming(5)C++Language(5)c++program(9)calculations(7)CCPLabprograming(3)ComputerProgrammingLab(3)computerscience(30)DAALabProgramming(13)Data Structure and C++laboratoryProgram(6)Data Structure and C++labotaryProgram(5)Design and Analysis ofalgorithm(14)downloadable(5)engineeringsyllabus(4)FirstYear(5)MASM(12)Microprocessor(12)Microprocessor lab program(12)simpleprogram(6)System Software & OSLaboratory(5)Unixprogram(4)

    TRENDPOSTS

    PROGRAM1(QuadraticEquation)|FirstYearEngineeringComputer Lab

    Programming|VTUSyllabus2013|

    Friday,February21,2014

    5:11PM| Postedbyshamnascv|

    ASSUMECS:CODE

    CODESEGMENTcodesegmentstartsSTART:MOVBX,00initializecounterBXas00REPEAT:PUSHBXsavetheBXvalueinstackmemory.MOVAH,07HBIOSservicenumbertoclearthescreenMOVAL,00HNumberoflinestoscroll00blankscreen.MOVBH,0FHattributeofcharacter0Fwhiteand00blackMOVCX,00HCH=00YcoordinateofupperleftcornerandCL=00X

    coordinateofupperrightcornerMOVDH,31HNumberofrowsLowerrightrowMOVDL,79HNumberofrowsLowerrightrowINT10HBIOSinterrupttoclearthescreenisinvokedMOVAH,02HBIOSservicenumbertosetthecursorMOVBH,00HsetvideoPagenumberto0MOVDH,0CHstorerownumberinDH(Ycoordinate)MOVDL,25Hstorethecolumnnumber(X)inDLregisterINT10HBIOSinterrupttosetthecursorisinvokedPOPBXpopthecountervaluestoredinstacktoBXMOVAL,BLcopythe8bit(1byte)countervalueinBLtoALAAMconvertHexvalueinALtounpackedBCDADDAX,3030Hadd3030HtoAX,togettheASCIIcodeoftheconvertedno.MOVCX,AXstoreAXvaluetemporallyinCXMOVDL,AHdisplaytheupperdigitofthecountervalueonthescreenMOVAH,02Husing02Hserviceno.withDOS21Hinterrupt.INT21HMOVDL,CLdisplaythelowerdigitofthecountervalueonthescreenMOVAH,02Husing02Hserviceno.withDOS21HinterruptINT21H

    WRITE A PROGRAM TO SIMULATE ADECIMALUPCOUNTERTODISPLAY0099.

    HOME

  • 5/18/2015 WriteaprogramtosimulateaDecimalUpcountertodisplay0099.|CODECARTA

    http://codecarta.blogspot.in/2014/02/writeprogramtosimulatedecimalup.html 2/3

    Read an alphanumeric characterand display its equivalent ASCIIcodeatthecenterofthescreen.

    Search a key element in a list ofn 16bit numbers using theBinarysearchalgorithm.

    Write two ALPmodules stored intwodifferent files onemodule isto read a character from thekeyboardand theotherone is todisplayacharacter.Usetheabovetwo modules to read a string ofcharacters from the keyboardterminated by the carriage returnandprintthestringonthedisplayinthenextline.

    Lab ProgramNo:13|OCTAL

    IMPLEMENTATIONUsingOperatorOverloading|2nd Year DataStructurewithC/C++Labotary|

    SortagivensetofnnumbersinascendingorderusingtheBubbleSortalgorithm.

    Compute nCr using recursiveprocedure.Assumethatnandrarenonnegativeintegers.

    PROGRAM2(SparseMatrix)|SecondYearEngineeringComputer Lab

    Programming|VTUSyllabus2013|

    Program ( INFIX toPOSTFIX)|Second Year Datastructure/cLabProgramming|VTUSyllabus2013|

    Lab ProgramNo:3|Evaluationof postfixExpression|2ndYear DataStructure with

    C/C++Labotary|

    BLOGGERNEWS

    AUTHOR

    View LUQMAN's profile

    CALLDELAYcallDELAYprocedure,toprovidesomedelayaftereachcounterdisplay

    INCBLincrementBL(countervalue)by1CMPBL,100comparethiscountervalueinBLwith100JNEREPEATifthecountervalueisMasm10a.asmD:\MASM>Link10a.objD:\MASM>10a.exe

    +1 Recommend this on Google

    0comments:

    PostaComment

    YouareveryImportanttoUs...STAYTUNE...

    Labels: 4th semester, Assembly Level Language, bachelor of engineering, BE, computer science, Decimal upcounter,MASM,Microprocessor,Microprocessorlabprogram,vtuEngineeringsyllabus2013

  • 5/18/2015 WriteaprogramtosimulateaDecimalUpcountertodisplay0099.|CODECARTA

    http://codecarta.blogspot.in/2014/02/writeprogramtosimulatedecimalup.html 3/3

    NewerPost OlderPostHome

    Subscribeto:PostComments(Atom)

    FOLLOWERS

    JointhissitewithGoogleFriendConnect

    Members(5)

    Alreadyamember?Signin

    BLOGARCHIVE

    2015(1)2014(37)

    October(1)August(4)July(20)February(12)

    aprogramtocreateafile(inputfile)andtodel...

    ReadapairofinputcoordinatesinBCDandmove...

    WriteaprogramtosimulateaDecimalUpcountert...

    Readthecurrenttimefromthesystemanddisplay...

    ComputenCrusingrecursiveprocedure.Assumethat...

    Readyournamefromthekeyboardanddisplayitat...

    Readtwostrings,storetheminlocationsSTR1and...

    Reverseagivenstringandcheckwhetheritisap...

    Readanalphanumericcharacteranddisplayitsequ...

    Sortagivensetofnnumbersinascendingorder...

    WritetwoALPmodulesstoredintwodifferentfile...

    Searchakeyelementinalistofn16bitnumbe...

    2013(20)

    Enteryourcomment...

    Commentas: GoogleAccount

    Publish Preview

    Linkstothispost

    CreateaLink

    Copyright2015.AllRightsReserved...