NASM Forum > Website and Forum

Write a program in assembly language

(1/2) > >>

mazhar:
hi
please help dear:
Write a program in assembly language which uses BIOS interrupt INT 21 to read current system time and displays it on the top-left corner of the screen.

Following should be the output of your code:

Hint: You can use “printnum” and “clrscr”

Frank Kotler:
Is that a question? What is it?
(hint: int 21h is not a BIOS interrupt)

Best,
Frank

mazhar:
yes , this is  question  for assignment  making.
 so plzz   wrte the programme

mazhar:


plzzz help me  to making assignment:::::::::;;

Computer Architecture and Assembly Language Programming (CS401)
Assignment # 4(Graded)
Total marks = 20


Please carefully read the following instructions before attempting assignment.




Assignment Statement:
Write a program in assembly language which uses BIOS interrupt INT 21 to read current system time and displays it on the top-left corner of the screen.

Following should be the output of your code:

Hint: You can use “printnum” and “clrscr” subroutines



Frank Kotler:
You're messin' with us, right? Who is this really?

Okay, I'll play along. As a prize for the most optimistic poster I've ever seen, here's the shortest "time" program I know (I don't know who the author is):

--- Code: ---; From: qscgz (at) aol (dot) com (QSCGZ)
; display the time , 24 bytes
; nasm -f bin -o tinyclok.com tinyclok.asm

org 100h

segment .text
   mov ah,2
   int 1ah      ; time in BCD , dl=0
   push cx
   push dx
   pop eax
m1:
   mov al,163
   sub dl,160   ; gives c,c,nc,c,c,nc,c,nc+z
   ja $+3       ;       h h :  m m  : s  s
   rol eax,4
   int 29h
   jne m1
   ret
;------------------

--- End code ---

Good luck if you choose to hand this in as your own work. You'll probably get thrown out of the course. I would!

Best,
Frank

Navigation

[0] Message Index

[#] Next page

Go to full version