COE205 - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

COE205

Description:

LEA DX,MSG or MOV DX,OFFSET MSG. MOV AH,09H. INT 21H ; Now, the String is on the screen ... LEA DX, Id or MOV DX,OFFSET Id. MOV AH,0AH. INT 21H ; ... – PowerPoint PPT presentation

Number of Views:76
Avg rating:3.0/5.0
Slides: 17
Provided by: ccseKf
Category:
Tags: coe205 | courses

less

Transcript and Presenter's Notes

Title: COE205


1
  • COE-205
  • Computer Organization Assembly Language
  • Section 56
  • Experiment3

2
Outline
  • Review
  • Basic Input/Output

3
Assembly Language Syntax(Directives)
4
Review
TITLE prog.asm .MODEL SMALL .STACK
200 .Data NUM1 DB 2 NUM2 DB 4 .CODE MOV
AX,_at_DATA MOV DS,AX MOV AL,NUM1 MOV
BL,NUM2 MOV AX,4C00H INT 21H END

0B01
STACK
0A3C
DATA
MOV AX,_at_DATA MOV DS,AX MOV AL,NUM1 MOV
BL,NUM2 MOV AX,4C00H INT 21H
0A3B
OCDE
5
Review

STACK
0A3C
DATA
MOV AX,_at_DATA MOV DS,AX MOV AL,NUM1 MOV
BL,NUM2 MOV AX,4C00H INT 21H
0A3C
OCDE
6
ASCII Table
7
How is doing it?
  • Do you think that the program does I/O itself?

Program
OS
BIOS, Drivers
HW
8
INT 21H
  • Do you remember ?
  • MOV AH,4CH
  • INT 21H
  • That was one function(4CH) of INT 21H, to exit
    the program.

9
Other INT 21H Functions
10
Function 01H
  • MOV AH,01H
  • INT 21H
  • Now, AL contains the ASCII code of the read
    character

11
Function 08H
  • MOV AH,08H
  • INT 21H
  • Now, AL contains the ASCII code of the read
    character, but no echo on the screen

12
Function 02H/06H
  • MOV DL,A or MOV DL,41H or MOV DL,010000001B
  • MOV AH,02H
  • INT 21H
  • Now, the character is now on the screen

13
Function 09H
  • .DATA
  • MSG DB Hello,0DH,0AH,
  • .CODE
  • LEA DX,MSG or MOV DX,OFFSET MSG
  • MOV AH,09H
  • INT 21H
  • Now, the String is on the screen

14
Function 0AH
  • Before you read a String you must prepare the
    buffer for it.
  • Buffer size the max string to be read1
  • Actual size the actual of char read.

15
Function 0AH (Read Student ID)
  • .DATA
  • Id DB 7,8 DUP(?)
  • .CODE
  • LEA DX, Id or MOV DX,OFFSET Id
  • MOV AH,0AH
  • INT 21H
  • Now, the String is in memory pointed by Std_ID

16
Function 0AH (Read Student ID)
  • .If the use input 201456
Write a Comment
User Comments (0)
About PowerShow.com