MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / ProDOS_PackDate

Function ProDOS_PackDate

source/ProDOS_FileSystem.h:151–159  ·  view source on GitHub ↗

| Byte 1 | Byte 0 | Bytes +-------------------------------+-------------------------------+ | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Bits +---------------------------------------------------------------+ <-----------Year-----------> <----Month----> <-------Day-------> Date

Source from the content-addressed store, hash-verified

149 // +---------------------------------------------------------------+
150 // <-----------Year-----------> <----Month----> <-------Day-------> Date
151 uint16_t ProDOS_PackDate ( int year, int month, int day )
152 {
153 uint16_t date = 0
154 | ((year & 0x7F) << 9)
155 | ((month & 0x0F) << 5)
156 | ((day & 0x1F) << 0)
157 ;
158 return date;
159 }
160
161 // | Byte 1 | Byte 0 | Bytes
162 // +---------------------------------------------------------------+

Callers 4

Util_ProDOS_CopyBASICFunction · 0.85
Util_ProDOS_CopyBitsyByeFunction · 0.85
Util_ProDOS_CopyDOSFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected