CALENDRIC & TEMPORAL PROGRAMMING
Re: CALENDRIC & TEMPORAL PROGRAMMING
We should compare the length of your code, BDD, with JGH's modified code!
- BigDumbDinosaur
- Posts: 9426
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: CALENDRIC & TEMPORAL PROGRAMMING
BigEd wrote:
We should compare the length of your code, BDD, with JGH's modified code!
Well, you can’t get something for nothing!
His is limited to a relatively small date range. Granted, most of us won’t alive and kicking by the time 2100 rolls around, so I suppose range isn’t everything. Then again, no one was paying attention to date ranges in the 1970s and the next thing you knew, it was 1999 and all that old code was a problem.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: CALENDRIC & TEMPORAL PROGRAMMING
BigDumbDinosaur wrote:
I was cleaning up my general-purpose DayOfWeek routines yesterday, and they use shift-right-2, divide-by-25, shift-right-2. I had two versions, and couldn't work out which I prefered, so I've uploaded both!
BigDumbDinosaur wrote:
BigEd wrote:
We should compare the length of your code, BDD, with JGH's modified code!
His is limited to a relatively small date range. Granted, most of us won’t alive and kicking by the time 2100 rolls around, so I suppose range isn’t everything. Then again, no one was paying attention to date ranges in the 1970s and the next thing you knew, it was 1999 and all that old code was a problem.
I'm sure there's probably a bit more optimisation that can be done.
--
JGH - http://mdfs.net
JGH - http://mdfs.net
- BigDumbDinosaur
- Posts: 9426
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
CALENDRIC & TEMPORAL PROGRAMMING
It’s been a while since I posted anything to this topic, but that doesn’t mean it’s dead. I have been working on improvements to my calendric library, as well as my 64-bit integer math library, and have re-spun the date program to use the new-and-improved™ libraries. The assembly listing is attached.
x86? We ain't got no x86. We don't NEED no stinking x86!
-
GlennSmith
- Posts: 162
- Joined: 26 Dec 2002
- Location: Occitanie, France
Re: CALENDRIC & TEMPORAL PROGRAMMING
I was so impressed when I saw "broken-down-time", "at last", I said to myself, "a real calendar that takes into account of all my patched-up hardware that doesn't work as expected all of the time !"
Good work, and super documentation!
Good work, and super documentation!
Glenn-in-France
- BigDumbDinosaur
- Posts: 9426
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
CALENDRIC & TEMPORAL PROGRAMMING
GlennSmith wrote:
I was so impressed when I saw "broken-down-time", "at last", I said to myself, "a real calendar that takes into account of all my patched-up hardware that doesn't work as expected all of the time !"
Thanks! You should know that the author of the date program is also “broken down.”
Quote:
Good work, and super documentation!
I try to be lucid with documentation, especially with non-obvious operations. Of course, I don’t do silly things such as...
Code: Select all
CLC ;clear carryWhat you don’t see in that listing are the technical notes I often add to the ends of the library files. They are placed after the .END pseudo-op in the file so they aren’t added to (and greatly lengthen) the assembly listing. I’ve attached the source code for libtime.2, which is the calendric library, so you can see what I mean.
I’ve also attached the main source file for the date program itself—it’s more macros than code, with much of the grunt work being done in the libraries.
x86? We ain't got no x86. We don't NEED no stinking x86!