Page 1 of 2

Real time clock access

Posted: Sun Aug 07, 2005 5:33 pm
by SebMcClouth
Is there any way to access the real time clock through qb? If so, how can this be achieved?

grtz
Seb

Posted: Sun Aug 07, 2005 5:35 pm
by Z!re
No, no way that would give you anything useful.

QB is too slow..


There's the DOS clock, and there's the windows API clock..

But QB is too slow to take advantage of it..

Posted: Sun Aug 07, 2005 5:37 pm
by SebMcClouth
I need quickbasic just to get the time from the RTC, so my program runs with the BIOS time...

grtz
Seb

er, time$?

Posted: Sun Aug 07, 2005 7:37 pm
by mennonite
actually there's a routine somewhere on the qbasic forum about how the data is stored for the RTC, similar to information about how integers and floating point vars are stored in memory, but i'm not sure what you want it for.

z!re's right, qbasic's timing features are far from ideal, but if you're not counting on precision (i mean, the bios rtc doesn't keep time as well as an ordinary wristwatch anyway) you can just use time$ which (i assume you know... i'm confused about your question) returns a string with "hh:mm:ss" in 24 hour format.

timer, which returns a floating point variable consisting of the seconds past midnight (0 to 86400) but also the 1/10 and 1/100 seconds after the decimal point. what exactly were you accessing the RTC for, and do you need the raw data from memory? if you do, i might be able to find the 16 bit code for you, it might even be in the qbasic forum faq. whether it's worth it really depends on what you need it for, but... dunno, time$ should suit most purposes outside of animation...

Posted: Sun Aug 07, 2005 8:24 pm
by {Nathan}
I dunno about you, but time$ doesn't work for me... it like... gets a wronge time, while dos says the right time... like... yeah...

that's insane

Posted: Sun Aug 07, 2005 11:27 pm
by mennonite
when you say "wrong time"... no, i can't imagine.
god, the more i hear about dos emulation (more like mutilation) in xp...
what about timer? does it return the wrong number of seconds too? god damn you, bill.

Posted: Sun Aug 07, 2005 11:34 pm
by SebMcClouth
I know I can use time$ but my program requires (for the dull reason that it is still is based upon Linux) time & date from the RTC.

grtz
Seb

i was unable to find what i thought was on the qbasic forum

Posted: Mon Aug 08, 2005 12:16 am
by mennonite
but i found this:
http://support.novell.com/techcenter/ar ... 40103.html

which not only has the interrupts you need, but example basic code.

be sure to use it as an outline. the page is copyrighted.

not that the code is complex enough to protect, "print hello world" but i'd be careful to make sure mine was original.

i'm glad you're basing your shell on linux. that's what makes it unique in the long running joke of shells and "os's" in qb. i'm all for it, and look forward to learning more about it / seeing it work. i just hope for your sake that xp actually allows you to access the part of memory that the clock is in. win xp turns off a lot of 16 bit access. i wonder if vista or what comes after will turn off a lot of 32 bit access. assholes.

Posted: Mon Aug 08, 2005 12:36 am
by SebMcClouth
The best thing would be, if qbinux ever becomes bigger, that ms-programs can be run through the GUI and then you don't have to worry about the rest of the windows envirment. It is possible, I've seen in Linux, so it's worth a try. Until then, I hope to first have a stable text-mode and hopefully, internet access too...

grtz
Seb

will there be a website?

Posted: Mon Aug 08, 2005 1:33 am
by mennonite
as i understand right now the only way to get a copy is by email. is it that you prefer not too many copies to float around right now, or is it more that you just haven't gotten around to putting stuff about it online?

if it's the latter, i admire your project and would be happy to maintain a small site about it. people could then download the latest beta (which i'm sure you know is the surest way to get feedback/suggestions/bugalerts/bugfixes) and could find out about it easily.

if and when you're ready to take over the site at some point, i could just give you the password and user, like handing over the keys to a car.

i'd like to see a qbinux site though, whether i'm part of it or not. you're making it too big to keep teasing everyone without a place they read about it :)

oh and as far as design goes, please ignore my own site, would you? it's no example- i've never had something central to organize it around. i've been thinking about tidying it up a bit, but a single project is a lot easier to design a site around. mine is something i'm letting grow into it's own natural shape, and i'm still finding out that is. it wasn't intentional, but i looked at the 4 big links at the top and the vaporware box on the side today and was shocked at how much i unconsciously ripped off pete's format. (now all it needs is side navigation, something i've been planning to never put in.) if it's original at all, though, i'm happy. i love pete's site. the only place i'm more likely to look for stuff on qbasic is the qbasic forum and google.

Posted: Mon Aug 08, 2005 1:37 am
by SebMcClouth
There will be a site, give me about two weeks... I got storage but I'm realling trying to develop qbinux more. Meanwhile I can get some stuff for the site.


grtz
Seb McClouth

Re: i was unable to find what i thought was on the qbasic fo

Posted: Mon Aug 08, 2005 10:34 am
by Nodtveidt
mennonite wrote:i'm glad you're basing your shell on linux. that's what makes it unique in the long running joke of shells and "os's" in qb. i'm all for it, and look forward to learning more about it / seeing it work.
Novix was also based on linux.

Posted: Mon Aug 08, 2005 11:15 am
by MystikShadows
What's the Novix URL?

Posted: Mon Aug 08, 2005 11:31 am
by DrV
novix.tk

Posted: Mon Aug 08, 2005 11:42 am
by MystikShadows
yeah it's what I thought but it tells me that it could not be found.

Posted: Mon Aug 08, 2005 12:42 pm
by SebMcClouth
try www.novix.tk

grtz

seb

Posted: Mon Aug 08, 2005 12:44 pm
by SebMcClouth
Novix will be implented as a part of qbinux.

grtz
Seb

Posted: Mon Aug 08, 2005 1:09 pm
by Zamaster
What does "GRTZ" mean?!!!!!

Posted: Mon Aug 08, 2005 1:32 pm
by SebMcClouth
GRTZ = short for greets, an expression for a salution...

so...

Grtz
Seb

Posted: Mon Aug 08, 2005 1:38 pm
by SebMcClouth
I have another question. I can get the time but how can I get the date through this:

Code: Select all

CLS
OUT &H70, 0
SEC = INP(&H71)
OUT &H70, 2
MIN = INP(&H71)
OUT &H70, 4
HOUR = INP(&H71)
PRINT HEX$(HOUR); ":";HEX$(MIN); ":";HEX$(SEC)
grtz
Seb