Category : C Source Code
Archive   : PCC-FNCT.ZIP
Filename : TIMESTAM.A

 
Output of file : TIMESTAM.A contained in archive : PCC-FNCT.ZIP
; Copyright (c) 1985 Martin Nohr and Tom Serface
; All Rights Reserved
;
;Revision Date Description
;-------- --------- --------------------------------------------

cseg
;GetStamp Get Modification Time on a File.
; Returns 0 if worked
; 2/4 file not found
; 5 access denied
; 12 invalid access code
; Call as: GetStamp(file,&dosdate);
; int GetStamp();
; char *file;
; long dosdate;
;
public GetStamp_
GetStamp_:
push bp
mov bp,sp
mov dx,[bp+4] ; name of file to get date from
mov ax,3d00h ; open file to get handle
int 21h
jc gstamp_error ; if can't open
mov bx,ax ; get handle
mov ax,5700h ; time stamp function
int 21h
jc gstamp_error ; if can't set
mov ax,3e00h ; close function
int 21h
mov si,[bp+6]
mov word [si],cx ; get date
mov word [si+2],dx ; get time
xor ax,ax
pop bp
ret

gstamp_error:
pop bp
ret


;SetStamp Change Modification Time on a File.
; Returns 0 if worked
; 2/4 file not found
; 5 access denied
; 12 invalid access code
; Call as: SetStamp(file,dosdate);
;
; int SetStamp();
; long dosdate;
;
public SetStamp_
SetStamp_:
push bp
mov bp,sp
mov dx,[bp+4] ; name of file to change
mov ax,3d00h ; open file to get handle
int 21h
jc sstamp_error ; if can't open
mov bx,ax ; get handle
mov cx,[bp+6] ; get date
mov dx,[bp+8] ; get time
mov ax,5701h ; time stamp function
int 21h
jc sstamp_error ; if can't set
mov ax,3e00h ; close function
int 21h
xor ax,ax
pop bp
ret

sstamp_error:
pop bp
ret


  3 Responses to “Category : C Source Code
Archive   : PCC-FNCT.ZIP
Filename : TIMESTAM.A

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/