Mercurial > hg > Members > kono > nitros9-code
view lib/alib/datestr.a @ 2772:0a3f4d8ea6d5
Found ENDC in wrong location in dwread.asm and dwwrite.asm. Corrected.
Moved the native 6309 code in dwread.asm and dwwrite.asm into the H6309 labeled area and changed IFEQ H6309 to IFNE H6309. Also moved the 57600bps 6809 code to the default location. This change had been done in the old dwread.asm and dwwrite.asm files to make it easier to follow. Though these two files were overwritten from the HDBDOS project dwread.asm and dwwrite.asm files. So this conversion needed to be done again so it made the source easier to follow.
author | drencor-xeen |
---|---|
date | Wed, 23 Jan 2013 12:36:55 -0600 |
parents | 7d70b7e1cb21 |
children | aaba193af04f |
line wrap: on
line source
***************************************** * Convert a date to a string. This can be used * for converting the system time as well as * modify/create dates from files. The date must * be 6 bytes -- null pad file dates. * OTHER MODULES NEEDED: BIN_ASC * ENTRY: X=binary date * Y=buffer for ascii * EXIT: all registers preserved (except cc) nam Get ASCII Date ttl Assembler Library Module psect DATESTR,0,0,0,0,0 DATESTR: pshs d,x,y,u leau delims,pcr loop bsr get1 convert a byte lda ,u+ get next delimiter sta ,y+ add to ascii buffer bne loop not end yet puls d,x,y,u,pc get1 ldb ,x+ get next byte to convert clra only doing one byte value pshs x save ptr to date packet leas -8,s buffer for ascii number tfr s,x lbsr BIN_DEC convert ldd ,x get ascii tstb 1byte number? bne get2 no tfr a,b lda #'0 leading "0" get2 std ,y++ to buffer leas 8,s puls x,pc delims fcc '// ::' fcb 0 endsect t