Microprocessor Lab CSL1543 0:0:2

Slides:



Advertisements
Similar presentations
Defining and processing tables
Advertisements

Program.-(9)* Write a program Input two numbers from keyboard and multiply of given values using by variables. Input value No 1 input value No2 Multiply.
Array : To store multiple value in one variable, “but value must be homogenous or similar type” is called array. We can say in other word Arrangement of.
Flow of Control Instruction/Control structure Looping structure Looping structure Branching structure Branching structure For assembly language program.
Program.(08) Write a program Divide 5 by 2 and display answer value and remainder value. 1 Store 5 into AL 2 Store BL into 2 3Divide AL Into BL 4Store.
COMP 2003: Assembly Language and Digital Logic
University of Tehran 1 Microprocessor System Design Interrupt Omid Fatemi
EDUSAT SESSION FOR ADVANCED MICROPROCESSOR (EC54) Date: Session VII Topic: Programming Examples Faculty: Anita Kanavalli MSRIT.
Writing and reading files. Creating a file on a disk Get a file handle from system Use INT 21H function 3C to create a directory entry for the file Use.
Subroutines: Passing Arguments Using the Stack. Passing Arguments via the Stack Arguments to a subroutine are pushed onto the stack. The subroutine accesses.
IP high IP low IP high IP low BP high BP low IP high IP low BP high BP low FL high FL low CS high CS low IP high IP low _TEXTsegment byte public ‘CODE’
Assembly Language for Intel-Based Computers Chapter 5: Procedures Kip R. Irvine.
Irvine: Assembly Language for Intel-Based Computers (1999) Symbolic Constants Equal-sign Directive EQU Directive TEXTEQU Directive.
Kip Irvine: Assembly Language for Intel-Based Computers Overview Stack Operations (PUSH and POP) Procedures Procedure Parameters Software Interrupts MS-DOS.
Flow Control Instructions
Kip Irvine: Assembly Language for Intel-Based Computers
8.4 Instruction Execution Times TOBIN PROC FAR SUB AX,AX MOV DX,AX MOV CX,4 NEXTD: PUSH CX SUB BP,BP MOV CX,4 GETNUM: RCL BX,1 RCL BP,1 LOOP GETNUM.
Factorial of a number data segment x1 db 4 fact dw ? data ends
Program.-(4)* Write a program for input two integer number with message and display their sum. Algorithm steps Algorithm steps 1.Display message for input.
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#7)
COSC 456 Lesson 8 Cool Codes ADD AL,SIAL AL + SI ADD AL,[SI]AL AL + [SI] INC BXBX BX + 1 INC [BX]Ambiguity error INC BYTE PTR [BX][BX] [BX] + 1 INC WORD.
BIOS and DOS Programming in DOS INT 10 and 21H. Interrupts There are some extremely useful subroutines within BIOS or DOS that are available to the user.
The Stack and Introduction to Procedures Dr. Konstantinos Tatas and Dr. Haris Haralambous.
Lecture 14 Basic I/O Interface Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
Executing and Linking an assembly program. Lesson plan Review Program logic and control Practice exercise Assembling, Linking and Executing Programs Practice.
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#9) By Dr. Syed Noman.
Writing and using procedures
2/20/2016CAP 2211 Flow Control Instructions. 2/20/2016CAP 2212 Transfer of Control Flow control instructions are used to control the flow of a program.
Assembly Language Lecture 2. Lecture Outline Program Structure Memory models Data Segment Stack Segment Code Segment Input and Output Instructions INT.
BITS Pilani Pilani Campus Pawan Sharma Lecture /12/ EEE /INSTR/CS F241 ES C263 Microprocessor Programming and Interfacing.
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#7) By Dr. Syed Noman.
Assembly language programming
Multi-module programming
Introduction to assembly programmıng language
Format of Assembly language
1st prog! Q: Read a char – from a keyboard & display it at the beginning of the next line! ====== A.
COURSE OUTCOMES OF MICROPROCESSOR AND PROGRAMMING
Instruksi Set Prosesor 8088
Microprocessor and Assembly Language
Lecture 4 Control Flow Structures (LOOPS)
INSTRUCTION SET.
Assembly IA-32.
Assembly Language Programming Part 2
Microprocessor and Assembly Language
Microprocessor Lab CSL1543 0:0:2
(The Stack and Procedures)
9/17/2018 Kiến Trúc Máy Tính.
اصول اساسی برنامه نویسی به زبان اسمبلی
Chapter 4: Instructions
Programming 8086 – Part IV Stacks, Macros
8086 Registers Module M14.2 Sections 9.2, 10.1.
Microprocessor Lab CSL1543 0:0:2
Microprocessor and Assembly Language
תכנות בסיסי בשפת סף פרק 5 מצגת 3.
(The Stack and Procedures)
Assembly Language Programming
Flow Control Instructions
Morgan Kaufmann Publishers Computer Organization and Assembly Language
A brief history •First microprocessor at Intel in
University of Gujrat Department of Computer Science
X86 Assembly Review.
High-level language structures
UNIT-II Assembly Language Programs Involving Logical
Assembly Language for Intel 8086 Jump Condition
(The Stack and Procedures)
Chapter 8: Instruction Set 8086 CPU Architecture
UNIT-II ADDRESSING MODES & Instruction set
Procedures & Macros Introduction Syntax Difference.
Part VI Looping Structures
Procedures and Macros.
Presentation transcript:

Microprocessor Lab CSL1543 0:0:2 Week 10 : DAC Interfacing

1. WRITE AND EXECUTE AN ASSEMBLY LANGUAGE PROGRAM TO GENERATE THE SQUARE WAVEFORM USING A DAC INTERFACE. Department of CSE, MSRIT

SQUARE WAVE .MODEL SMALL .STACK 100 .DATA .CODE DELAY PROC NEAR MOV BX, 0FFFH L1: MOV SI, 02FFFH L2: DEC SI JNZ L2 DEC DX JNZ L1 RET DELAY ENDP Department of CSE, MSRIT

.MODEL SMALL .STACK 100 .DATA .CODE DELAY PROC NEAR DELAY ENDP START: MOV AX,@DATA MOV DS, AX MOV AL, 80H MOV DX, 24A3H OUT DX, AL SQUARE: MOV AL, 00H MOV DX, 24A0H CALL DELAY MOV AL, 0FFH MOV AH, 06h MOV DL, 0FFh INT 21h JNZ LAST JMP SQUARE ;INT 03H LAST: MOV AH,04Ch END START .MODEL SMALL .STACK 100 .DATA .CODE DELAY PROC NEAR MOV BX, 0FFFH L1: MOV SI, 02FFFH L2: DEC SI JNZ L2 DEC DX JNZ L1 RET DELAY ENDP Department of CSE, MSRIT

2. WRITE AND EXECUTE AN ASSEMBLY LANGUAGE PROGRAM TO GENERATE THE TRIANGULAR WAVEFORM USING A DAC INTERFACE. Department of CSE, MSRIT

MOV AH, 06h MOV DL, 0FFh INT 21h JNZ LAST JMP L1 INT 03H .MODEL SMALL .STACK 100 .DATA .CODE START: MOV AX,@DATA MOV DS, AX MOV AL, 80H MOV DX, 24A3H OUT DX, AL L1: MOV AL, 00H UP: MOV DX, 24A0H INC AL CMP AL, 0FFH JNE UP MOV AL, 0FFH DOWN: MOV DX, 24A0H DEC AL CMP AL, 00H JNE DOWN MOV AH, 06h MOV DL, 0FFh INT 21h JNZ LAST JMP L1 INT 03H LAST: MOV AH,04Ch END START Department of CSE, MSRIT

3. WRITE AND EXECUTE AN ASSEMBLY LANGUAGE PROGRAM TO GENERATE THE RAMP WAVE (UP) USING THE DAC INTERFACE. Department of CSE, MSRIT

MODEL SMALL .STACK 20 .DATA .CODE START: MOV AX,@DATA MOV DS, AX MOV AL, 80H MOV DX, 24A3H OUT DX, AL L1: MOV AL, 00H UP: MOV DX, 24A0H INC AL CMP AL, 0FFH JNE UP MOV AH, 06h MOV DL, 0FFh INT 21h JNZ LAST JMP L1 LAST: MOV AH, 04ch ; INT 03H END START Department of CSE, MSRIT

4. WRITE A PROGRAM TO INTERFACE A DAC TO GENERATE A RAMP WAVE FORM (DOWN). Department of CSE, MSRIT

.MODEL SMALL .STACK 100 .DATA .CODE START: MOV AX,@DATA MOV DS, AX MOV AL, 80H MOV DX, 24A3H OUT DX, AL L1: MOV AL, 0FFH UP: MOV DX, 24A0H DEC AL CMP AL, 00H JNE UP MOV AH, 06h MOV DL, 0FFh INT 21h JNZ LAST JMP L1 INT 03H LAST: MOV AH, 04ch END START Department of CSE, MSRIT