Mercurial > hg > Members > kono > nitros9-code
comparison level1/cmds/date.asm @ 924:c155aac72190
Made cosmetic changes
author | boisy |
---|---|
date | Sun, 19 Jan 2003 14:54:09 +0000 |
parents | 4a8e6693b9fe |
children | 84ea83668304 |
comparison
equal
deleted
inserted
replaced
923:840aa54d6f45 | 924:c155aac72190 |
---|---|
43 edition set 7 | 43 edition set 7 |
44 | 44 |
45 mod eom,name,tylg,atrv,start,size | 45 mod eom,name,tylg,atrv,start,size |
46 | 46 |
47 org 0 | 47 org 0 |
48 SysYear rmb 1 | 48 sysyear rmb 1 |
49 SysMonth rmb 1 | 49 sysmonth rmb 1 |
50 SysDay rmb 1 | 50 sysday rmb 1 |
51 SysHour rmb 1 | 51 syshour rmb 1 |
52 SysMin rmb 1 | 52 sysmin rmb 1 |
53 SysSec rmb 1 | 53 syssec rmb 1 |
54 u0006 rmb 2 | 54 u0006 rmb 2 |
55 u0008 rmb 440 | 55 u0008 rmb 440 |
56 size equ . | 56 size equ . |
57 | 57 |
58 name fcs /Date/ | 58 name fcs /Date/ |
71 fcs 'October' | 71 fcs 'October' |
72 fcs 'November' | 72 fcs 'November' |
73 fcs 'December' | 73 fcs 'December' |
74 | 74 |
75 start pshs x | 75 start pshs x |
76 leax SysYear,u | 76 leax sysyear,u |
77 leau u0008,u | 77 leau u0008,u |
78 stu <u0006 | 78 stu <u0006 |
79 os9 F$Time | 79 os9 F$Time |
80 bsr Add2Buff go print the date in buffer | 80 bsr Add2Buff go print the date in buffer |
81 ldd [,s++] now, did we have a -t | 81 ldd [,s++] now, did we have a -t |
93 os9 I$WritLn and go print it | 93 os9 I$WritLn and go print it |
94 bcs Exit | 94 bcs Exit |
95 clrb | 95 clrb |
96 Exit os9 F$Exit | 96 Exit os9 F$Exit |
97 | 97 |
98 DoTime ldb <SysHour | 98 DoTime ldb <syshour |
99 bsr Byte2ASC | 99 bsr Byte2ASC |
100 ldb <SysMin | 100 ldb <sysmin |
101 bsr L00AB | 101 bsr L00AB |
102 ldb <SysSec | 102 ldb <syssec |
103 L00AB lda #': | 103 L00AB lda #': |
104 sta ,u+ | 104 sta ,u+ |
105 bra Byte2ASC | 105 bra Byte2ASC |
106 | 106 |
107 Add2Buff leay >MonTable,pcr point to month table | 107 Add2Buff leay >MonTable,pcr point to month table |
108 ldb <SysMonth get month byte | 108 ldb <sysmonth get month byte |
109 beq L00C4 branch if zero (illegal) | 109 beq L00C4 branch if zero (illegal) |
110 cmpb #12 compare against last month of year | 110 cmpb #12 compare against last month of year |
111 bhi L00C4 if too high, branch | 111 bhi L00C4 if too high, branch |
112 L00BD lda ,y+ get byte | 112 L00BD lda ,y+ get byte |
113 bpl L00BD keep going if hi bit not set | 113 bpl L00BD keep going if hi bit not set |
114 decb else decrement month | 114 decb else decrement month |
115 bne L00BD if not 0, keep going | 115 bne L00BD if not 0, keep going |
116 L00C4 bsr PrtStrng | 116 L00C4 bsr PrtStrng |
117 ldb <SysDay | 117 ldb <sysday |
118 bsr Byte2ASC | 118 bsr Byte2ASC |
119 ldd #C$COMA*256+C$SPAC get comma and space in D | 119 ldd #C$COMA*256+C$SPAC get comma and space in D |
120 std ,u++ store in buffer and increment twice | 120 std ,u++ store in buffer and increment twice |
121 lda #19 | 121 lda #19 |
122 ldb <SysYear get year | 122 ldb <sysyear get year |
123 CntyLp subb #100 | 123 CntyLp subb #100 |
124 bcs pr we have century we need | 124 bcs pr we have century we need |
125 inca | 125 inca |
126 bra CntyLp | 126 bra CntyLp |
127 pr addb #100 | 127 pr addb #100 |