REM The serial number is computed from the current date and time when the
REM disk is created; the first part is the sum of the seconds/hundredths
REM and month/day, the second part is the sum of the hours/minutes and year.

PRINT "Creating serial.."
d$ = DATE$ ' mm-dd-yyyy
t$ = TIME$ ' hh:mm:ss
sec = VAL(RIGHT$(t$, 2))
min = VAL(MID$(t$, 4, 2))
hrs = VAL(LEFT$(t$, 2))
t1! = TIMER
hundreds = INT((t1! - INT(t1!)) * 100)
PRINT "Time: ";
PRINT RIGHT$("00" + MID$(STR$(hrs), 2), 2); ":";
PRINT RIGHT$("00" + MID$(STR$(min), 2), 2); ":";
PRINT RIGHT$("00" + MID$(STR$(sec), 2), 2); ":";
PRINT RIGHT$("00" + MID$(STR$(hundreds), 2), 2)
yr = VAL(RIGHT$(d$, 4))
dy = VAL(MID$(d$, 4, 2))
mnth = VAL(LEFT$(d$, 2))
PRINT "Date: ";
PRINT RIGHT$("00" + MID$(STR$(mnth), 2), 2); "-";
PRINT RIGHT$("00" + MID$(STR$(dy), 2), 2); "-";
PRINT MID$(STR$(yr), 2)
s1! = sec + hundreds + mnth + dy
s2! = hrs + min + yr
PRINT "Serial value: ";
PRINT RIGHT$("0000" + MID$(STR$(s1!), 2), 4); "-";
PRINT RIGHT$("0000" + MID$(STR$(s2!), 2), 4); "(dec)"
PRINT "Serial number: ";
PRINT RIGHT$("0000" + HEX$(s1!), 4) + "-";
PRINT RIGHT$("0000" + HEX$(s2!), 4); "(hex)"
END

