Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Countdown timer using 80x86 MSDOS


  • Please log in to reply

#1
yuri killian

yuri killian

    New Member

  • Member
  • Pip
  • 2 posts
Hi, I'm just new here. :whistling: I'm having a problem regarding this old system using ascii codes we're using at school. I'm also a newbie in programming so I decided to ask if anyone could help me.

our professor gave us this program (see below) as reference for setting time.

a100
mov ah, 09
mov dx, 14f
int 21
mov ah, 08
int 21
mov ah, 2c
int 21
mov [210], ch
mov [211], cl
mov [212], dh
mov [213], dl
mov di, 210
mov bp, 1a7
mov bh, a
mov cx, 04
mov ah, 0
mov al, [di]
div bh
add ax, 3030
mov [bp], ax
inc di
add bp, 3
loop 12a
mov ah, 09
mov dx, 1a7
int 21
mov ah, 06
mov dl, ff
int 21
cmp al, 73
jne 10b
int 20
db " this program will display the system time of your computer",0a,0d
db "strike any key to start",0a,0a,0d,24
db "--:--:--:--",0d, 24

--

read in MS DOS computer like so (see below)

-a100
1357:0100 mov ah, 09
1357:0102 mov dx, 14f
1357:0105 int 21
1357:0107 mov ah, 08
1357:0109 int 21
1357:010B mov ah, 2c
1357:010D int 21
1357:010F mov [210], ch
1357:0113 mov [211], cl
1357:0117 mov [212], dh
1357:011B mov [213], dl
1357:011F mov di, 210
1357:0122 mov bp, 1a7
1357:0125 mov bh, a
1357:0127 mov cx, 04
1357:012A mov ah, 0
1357:012C mov al, [di]
1357:012E div bh
1357:0130 add ax, 3030
1357:0133 mov [bp], ax
1357:0136 inc di
1357:0137 add bp, 3
1357:013A loop 12a
1357:013C mov ah, 09
1357:013E mov dx, 1a7
1357:0141 int 21
1357:0143 mov ah, 06
1357:0145 mov dl, ff
1357:0147 int 21
1357:0149 cmp al, 73
1357:014B jne 10b
1357:014D int 20
1357:014F db " this program will display the system time of your computer",0a,0d

1357:018C db "strike any key to start",0a,0a,0d,24
1357:01A7 db "--:--:--:--",0d, 24


---

now he's asking us to make a program about a countdown timer (2 minutes down) and when it stops the program should display a text like "KABOOM" or something ... and I have no idea what to do with this.
can anyone :blink: ? thanks.
  • 0

Advertisements


#2
AminRoy

AminRoy

    New Member

  • Member
  • Pip
  • 1 posts
wau. this is a 6 years old post. and still no one is responding.

but, that is fine. i will just make a simple reply as other people can refer to this later. just to get the FUNDAMENTAL in IA32 / IA16 (Intel Architecture - 32 /16 bit)

corresponding to this topic, 8086 is a IA-16, and using a MS-DOS platform as a 16-bit OS. (nowadays people just use a command prompt (32bit/64bit virtual MS-DOS)in windows GUI environment).

to be precise, the program u post above is a IA-16 low level language which can be compiled / assembled using 'MASM615' (microsoft macro assembler) software, and can be debug using a 'debungging tools for windows' software in windows environment.

so, essential software is : 1. MS Macro Assembler (615)
2. debugging tools for windows (GUI)

to know more in this intel based assembly language : search a book, Assembly Language for Intel-based Computers, Kip R. Irvine, 4th edition.
  • 0






Similar Topics

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP