(15C) MM.DDYYYY or DD.MMYYYY to Julian Day [Stack-Only]
|
08-26-2016, 04:08 AM
(This post was last modified: 08-27-2016 08:19 PM by Nick.)
Post: #1
|
|||
|
|||
(15C) MM.DDYYYY or DD.MMYYYY to Julian Day [Stack-Only]
Formula: http://www.cs.utsa.edu/~cs1063/projects/...ation.html
Input: X = MM.DDYYYY (Date) Output: X = JD (Julian Day) Size: 87 Bytes Related to: (15C) Julian Day to Day of Week Related to: (15C) Delta Days Note: This design requires no temp registers and does not preserve the stack. Enjoy, Nick Code: 01 LBL 0 For DD.MMYYYY, insert the following between steps 7 and 8: Code: 7.1 INT Comments: 08 M; DD.YYYY ' Month (Day and Year stored together) 17 a; M; D.Y ' Expression: a 26 m; D.Y; a; a ' Expression: m 35 JD; D.Y; a; a ' Accumulator: JD 40 D; JD; a; .Y ' Day 46 Y; a; JD ' Year 53 y; JD ' Expression: y 57 j; JD; j; j ' Expression: j positioned for constant operation 72 EEX 2 / instead of 1% per accumulator operation 86 JD ' Result |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)