SlideShare a Scribd company logo
Write a program to display the current system time using DOS INT 21H, function 2CH.
macro putc c
mov dl, c
mov ah, 2
int 21h
endm
.model small
.data
msg db 10,13,'The current time is:$'
.stack 100
.code
mov ax, @data
mov ds, ax
mov ah, 2ch
int 21h
push dx
mov al,ch
aam
add ax, 3030h
mov bx, ax
putc bh
putc bl
putc ':'
mov al,cl
aam
add ax, 3030h
mov bx, ax
putc bh
putc bl
putc ':'
pop cx
mov al,ch
aam
add ax, 3030h
mov bx, ax
putc bh
putc bl
putc ':'
mov al,cl
aam
add ax, 3030h
mov bx, ax
putc bh
putc bl
mov ah, 4ch
int 21h
end

More Related Content

PDF
Instalación de emu8086
PPTX
App-o-Lockalypse now!
PPTX
我在 Mac 上的常用开发工具
PDF
ncurses in your hobostove
PDF
Coding with Vim
PDF
Libtcc and gwan
PDF
TrackPad Destroyer
PDF
Building a DSL with GraalVM (VoxxedDays Luxembourg)
Instalación de emu8086
App-o-Lockalypse now!
我在 Mac 上的常用开发工具
ncurses in your hobostove
Coding with Vim
Libtcc and gwan
TrackPad Destroyer
Building a DSL with GraalVM (VoxxedDays Luxembourg)

What's hot (6)

PDF
Understanding the nodejs event loop
PDF
Rubinius @ RubyAndRails2010
PPTX
Nasamatic NewHaven.IO 2014 05-21
PDF
Groovy and Grails talk
PDF
Building a DSL with GraalVM (CodeOne)
PPT
Cpp tutorial
Understanding the nodejs event loop
Rubinius @ RubyAndRails2010
Nasamatic NewHaven.IO 2014 05-21
Groovy and Grails talk
Building a DSL with GraalVM (CodeOne)
Cpp tutorial
Ad

More from Dr. Loganathan R (20)

PDF
Ch 6 IoT Processing Topologies and Types.pdf
PDF
IoT Sensing and Actuation.pdf
PDF
Ch 4 Emergence of IoT.pdf
PDF
Program in ‘C’ language to implement linear search using pointers
PDF
Implement a queue using two stacks.
PDF
Bcsl 033 data and file structures lab s5-3
PDF
Bcsl 033 data and file structures lab s5-2
PDF
Bcsl 033 data and file structures lab s4-3
PDF
Bcsl 033 data and file structures lab s4-2
PDF
Bcsl 033 data and file structures lab s3-3
PDF
Bcsl 033 data and file structures lab s3-2
PDF
Bcsl 033 data and file structures lab s3-1
PDF
Bcsl 033 data and file structures lab s2-3
PDF
Bcsl 033 data and file structures lab s2-2
PDF
Bcsl 033 data and file structures lab s2-1
PDF
Bcsl 033 data and file structures lab s1-4
PDF
Bcsl 033 data and file structures lab s1-3
PDF
Bcsl 033 data and file structures lab s1-2
PDF
Bcsl 033 data and file structures lab s1-1
PPT
Introduction to Information Security
Ch 6 IoT Processing Topologies and Types.pdf
IoT Sensing and Actuation.pdf
Ch 4 Emergence of IoT.pdf
Program in ‘C’ language to implement linear search using pointers
Implement a queue using two stacks.
Bcsl 033 data and file structures lab s5-3
Bcsl 033 data and file structures lab s5-2
Bcsl 033 data and file structures lab s4-3
Bcsl 033 data and file structures lab s4-2
Bcsl 033 data and file structures lab s3-3
Bcsl 033 data and file structures lab s3-2
Bcsl 033 data and file structures lab s3-1
Bcsl 033 data and file structures lab s2-3
Bcsl 033 data and file structures lab s2-2
Bcsl 033 data and file structures lab s2-1
Bcsl 033 data and file structures lab s1-4
Bcsl 033 data and file structures lab s1-3
Bcsl 033 data and file structures lab s1-2
Bcsl 033 data and file structures lab s1-1
Introduction to Information Security
Ad

Recently uploaded (20)

PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Cell Types and Its function , kingdom of life
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
01-Introduction-to-Information-Management.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Classroom Observation Tools for Teachers
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Pre independence Education in Inndia.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Basic Mud Logging Guide for educational purpose
PPTX
master seminar digital applications in india
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Pharma ospi slides which help in ospi learning
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
GDM (1) (1).pptx small presentation for students
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
VCE English Exam - Section C Student Revision Booklet
Module 4: Burden of Disease Tutorial Slides S2 2025
Cell Types and Its function , kingdom of life
102 student loan defaulters named and shamed – Is someone you know on the list?
Microbial diseases, their pathogenesis and prophylaxis
01-Introduction-to-Information-Management.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
2.FourierTransform-ShortQuestionswithAnswers.pdf
Classroom Observation Tools for Teachers
Supply Chain Operations Speaking Notes -ICLT Program
Pre independence Education in Inndia.pdf
PPH.pptx obstetrics and gynecology in nursing
Basic Mud Logging Guide for educational purpose
master seminar digital applications in india
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Pharma ospi slides which help in ospi learning
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Microbial disease of the cardiovascular and lymphatic systems
GDM (1) (1).pptx small presentation for students
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
VCE English Exam - Section C Student Revision Booklet

Session 9 4 alp to display the current system time using dos int 21 h

  • 1. Write a program to display the current system time using DOS INT 21H, function 2CH. macro putc c mov dl, c mov ah, 2 int 21h endm .model small .data msg db 10,13,'The current time is:$' .stack 100 .code mov ax, @data mov ds, ax mov ah, 2ch int 21h push dx mov al,ch aam add ax, 3030h mov bx, ax putc bh putc bl putc ':' mov al,cl aam add ax, 3030h mov bx, ax putc bh putc bl putc ':' pop cx mov al,ch aam add ax, 3030h mov bx, ax putc bh putc bl putc ':' mov al,cl aam add ax, 3030h mov bx, ax putc bh putc bl mov ah, 4ch int 21h end