flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
cod3b453 19 Mar 2012, 19:48
The %t parameter can be deconstructed into it's time and date components from its seconds value.
EDIT: This is the time but I don't don't know how to get date Code: x = %t time_s = x mod 60 time_m = (x / 60) mod 60 time_h = (x / 3600) mod 24 |
|||
![]() |
|
Mike Gonta 19 Mar 2012, 21:42
cod3b453 wrote: The %t parameter can be deconstructed into it's time and date components from its seconds value. http://board.flatassembler.net/topic.php?t=1139 |
|||
![]() |
|
cod3b453 19 Mar 2012, 22:31
Thanks for that info Mike Gonta
In particular, this post http://board.flatassembler.net/topic.php?p=8586#8586 shows how to extract the date information correctly. |
|||
![]() |
|
smiddy 19 Mar 2012, 23:59
Isn't that just the current time/date?
For instance if I do: Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; SmiddyOS File Inclussion ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SmiddyOS: file 'SMIDDYOS.EXE' .End: times 2047 - ($+2047) mod 2048 db 0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; VENDOR.TXT File Inclussion ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; VendorTextFile: file 'VENDORS.TXT' .End: ; TIMES 2048-($-VendorTextFile) ; Aligns VENDORS.TXT (a file is aligned after its actual size) times 2047 - ($+2047) mod 2048 db 0 I'd like to include the files information in here: Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Root Directory ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; RootDirectory: db .RootDirectoryEnd - RootDirectory ; (0) Length of this directory entry db 0 ; (1) Extended Attribute Record Length (0 ?) dd (RootDirectory - CDROMImageStart) / 2048 ; (2) Location of root directory in Little Endian BED (RootDirectory - CDROMImageStart) / 2048 ; (6) Location of root directory in Big Endian dd .RootDirectoryEnd - RootDirectory ; (10) The size in sectors (Big or Little Endian) BED .RootDirectoryEnd - RootDirectory ; (14) The size in sectors (Big or Little Endian) db 111 ;;; (1 ...where all the file information is, instead of hard coding it. Does this make sense? Does the %t pull the information on the included files? How specifically do I get it? ie. SMIDDYOSEXEDate = %T.SMIDDYOS.EXE or something? |
|||
![]() |
|
cod3b453 20 Mar 2012, 18:00
Apologies I total misunderstood
![]() External file time stamp information is OS specific, so I don't think there is a direct way to do this. [This might be a possible addition to FASM, as it has OS wrapper code for files anyway] However, this kind of task cna be handled by an external script. Sorry I can't be of more help. |
|||
![]() |
|
smiddy 20 Mar 2012, 18:18
Nope, that's kewl! The way I've done it in the past was write a C program to get the information fo packaging up a "build" so I may do that very same thing but instead write the CDROM.ASM file out, that creates the *.ISO, which will have that information within it. I was hoping there was a direct what at compile to to gather that information.
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.