Repository navigation
Expand file tree
/
Copy pathtime.asm
More file actions
68 lines (61 loc) · 1.49 KB
/
Copy pathtime.asm
File metadata and controls
68 lines (61 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
keep obj/time
mcopy time.macros
case on
****************************************************************
*
* Time - Time and date libraries for C
*
* This code implements the tables and subroutines needed to
* support the standard C library TIME.
*
* This porition of the library contains subroutines that are
* dependent on the way floating-point calculations are
* performed. The main portion of the library is in ORCACLib.
*
* January 1989
* Mike Westerfield
*
* Copyright 1989
* Byte Works, Inc.
*
****************************************************************
*
Time start dummy segment
end
****************************************************************
*
* difftime - return the difference between two times as a real
*
* Inputs:
* t1, t2 - two times
*
* Outputs:
* returns the difference as a real
*
****************************************************************
*
difftime start
csubroutine (4:t1,4:t2),0
phb
phk
plb
sec get the difference
lda t1
sbc t2
sta itime
lda t1+2
sbc t2+2
sta itime+2
lda #0
bcs lb1
dec a
lb1 sta itime+4
sta itime+6
ph4 #itime convert to real
ph4 #xtime
fc2x
plb
creturn 10:xtime
itime ds 8
xtime ds 10
end