Author Topic: Write a program in assembly language  (Read 3652 times)

Offline mazhar

  • Jr. Member
  • *
  • Posts: 3
Write a program in assembly language
« on: July 23, 2014, 02:55:50 PM »
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”

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2329
  • Country: us
Re: Write a program in assembly language
« Reply #1 on: July 23, 2014, 03:32:57 PM »
Is that a question? What is it?
(hint: int 21h is not a BIOS interrupt)

Best,
Frank


Offline mazhar

  • Jr. Member
  • *
  • Posts: 3
Re: Write a program in assembly language
« Reply #2 on: July 24, 2014, 04:31:53 AM »
yes , this is  question  for assignment  making.
 so plzz   wrte the programme

Offline mazhar

  • Jr. Member
  • *
  • Posts: 3
Re: Write a program in assembly language
« Reply #3 on: July 24, 2014, 04:42:56 AM »


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




Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2329
  • Country: us
Re: Write a program in assembly language
« Reply #4 on: July 24, 2014, 07:33:49 AM »
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: [Select]
; 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
;------------------

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


Offline Winchester14

  • New Member
  • Posts: 1
Re: Write a program in assembly language
« Reply #5 on: November 21, 2017, 08:39:07 PM »
Great informative site. I'm really impressed after reading this blog post. I really appreciate the myassignmenthelp reviews
 time and effort you spend to share this with us! I do hope to read more updates from you.