%from IMP %include Mcode, SysSpecs %string(255)%fn GetDt(%integer From, To) %string(31) S %integer P %recordformat F(%bytearray S(1:25)) %record(F) D P = Addr(D) *LDR _ R1, P *MOV _ R0, #0 *STRB _ R0, [R1] {0= read clock in string format} *MOV _ R0, #14 {osword 14 - read CMOS clock} *SWI _ Brasil Word {osword} S = "" S = S.Tostring(D_S(P)) %for P = From, 1, To %result = S %end ! ! >>> TIME <<< ! ! Returns the time string for the current time. ! %external %string(255) %function Time %alias "3L_IMP_TIME" %result = GetDT(17, 24) %end ! ! >>> DATE <<< ! ! Returns the date string for the current date. ! %external %string(255) %function Date %alias "3L_IMP_DATE" %result = GetDT(1, 15) %end