Thread: Show current date without using system timer

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    3

    Show current date without using system timer

    hello,

    I'm already using system timer to do the interrupt, in order to show the date and time, i need to get it from BIOS date. please advice how to accomplish this, thanks!

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    Posting you initial attempt will help everyone guage what you already know and precipitate better replies.

    [Welcome, code tags: [code][/code].]
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Don't forget to say which Operating system / compiler / application type you're creating.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Just kidding.... fnoyan's Avatar
    Join Date
    Jun 2003
    Location
    Still in the egg
    Posts
    275
    Well, I think you have to dig into assembly code in order to get the time from bios. Maybe int 0x1A is the one you are looking for.

    Accessing BIOS from user level is restricted. It is sometimes a real headache trying to access to BIOS under pm OSes!

  5. #5
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Quote Originally Posted by fnoyan
    Accessing BIOS from user level is restricted.
    Not in DOS it isn't. See, this is why it's good to always list the target platform.


    Quzah.
    Hope is the first step on the road to disappointment.

  6. #6
    Just kidding.... fnoyan's Avatar
    Join Date
    Jun 2003
    Location
    Still in the egg
    Posts
    275
    Quote Originally Posted by quzah
    Not in DOS it isn't. See, this is why it's good to always list the target platform.
    I meant a pm OS. Maybe it is better to clearly write what I really want to mean

  7. #7
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    >I meant a pm OS. Maybe it is better to clearly write what I really want to mean
    That would help. Like pm OS ... what does that mean? One could guess.

  8. #8
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    It only works at night.


    Quzah.
    Hope is the first step on the road to disappointment.

  9. #9
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    And that would change things for us programmers how? (The only working at night thing I mean.)

  10. #10
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    >It only works at night.
    Yes, thank you, I wonder if those outnumber the am OS?

  11. #11
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    swoopy, please tell me you are just joking and you really know what is a PMOS. . .

    EDIT: Does knowing what PMOS is mean that I'm old?
    Last edited by Kennedy; 09-29-2006 at 06:22 PM.

  12. #12
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Thinking you must be old to know that might indicate you misinterpret the term. Seeing as nowadays we all use PMOSs, we (that is, the computer people) ought to know what they are.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  13. #13
    Registered User
    Join Date
    Oct 2004
    Posts
    151
    Quote Originally Posted by swoopy
    >It only works at night.
    Yes, thank you, I wonder if those outnumber the am OS?
    I have a rare am/pm OS.

    I bought it at a convenience store.
    System: Debian Sid and FreeBSD 7.0. Both with GCC 4.3.

    Useful resources:
    comp.lang.c FAQ | C++ FQA Lite

  14. #14
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    >swoopy, please tell me you are just joking and you really know what is a PMOS. . .
    Well, the problem is, that P and M could mean too many different things. Sure I can guess what it means, and I might guess right, but if say 50% of your audience (the audience being this message board) can't, why speak in gibberish? Why not type it out? PM OS is pretty ambiguous. For example take the P. Is that:
    Privileged?
    Partitioned?
    Primitive?
    Private?
    Protected?
    Protective?
    Primary?
    Physical?
    Permanent?

    Take the M. Is that:
    Memory?
    Mapped?
    Mode?
    Modular?
    Last edited by swoopy; 09-29-2006 at 09:56 PM.

  15. #15
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    Quote Originally Posted by zx-1
    I have a rare am/pm OS.

    I bought it at a convenience store.
    Hmm, I did not know they made such an animal. The guy who invented it must be a genius.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. FAQ: How do i display current time and date ?
    By davie_scotland in forum FAQ Board
    Replies: 2
    Last Post: 01-24-2002, 11:18 AM
  2. Help! I need to know how to use the system date!
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 12-17-2001, 11:20 PM
  3. Variable Allocation in a simple operating system
    By awkeller in forum C Programming
    Replies: 1
    Last Post: 12-08-2001, 02:26 PM
  4. how to pull system time, date, etc from <ctime>
    By Matt in forum C++ Programming
    Replies: 1
    Last Post: 09-25-2001, 09:08 AM
  5. System Date
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 08-28-2001, 06:03 PM