Assembly language program which shows the current date and time in a form identical to that used by Posix ctime() ; showdate.asm ; ; prints the date and time to stdout ; equivalent to the following C++ program: ; ;#include <iostream.h> ;#include <time.h> ; ;int main() ;{ ; time_t t; ; time(&t); // get the current time ; cout << ctime(&t); // convert to string and print ; return 0; ;} ; ; This code may be assembled and linked using Borland's TASM: ; tasm /la /m2 showdate ; tlink /Tdc showdate ; STDOUT equ 01h ; handle of standard output device
Learn C++ Programming fast and easy, find C++ Program Codes