File tree 2 files changed +18
-5
lines changed
2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 1
- [ ![ build] ( https://github.com/oric -software/datetime/actions/workflows/main.yml/badge.svg )] ( https://github.com/orix-software/datetime/actions/workflows/main.yml )
1
+ [ ![ build] ( https://github.com/orix -software/datetime/actions/workflows/main.yml/badge.svg )] ( https://github.com/orix-software/datetime/actions/workflows/main.yml )
2
2
3
3
# Description
4
4
Utility to display or set the date and time from a DS1501
Original file line number Diff line number Diff line change @@ -258,10 +258,26 @@ typedef .struct ds1501
258
258
sta buffer+1
259
259
260
260
lda ds1501::month
261
+ ; Conversion BCD -> binaire simplifiée
261
262
cmp #$10
262
263
bcc *+4
263
264
sbc #06
264
265
266
+ ; Vérifie que le mois est < 13
267
+ cmp #13
268
+ bcc month
269
+
270
+ ; Erreur numéro de mois incorrect,
271
+ ; on affiche la valeur
272
+ lda ds1501::month
273
+ jsr byte2str
274
+ stx buffer+3
275
+ sta buffer+4
276
+ lda #'?'
277
+ sta buffer+5
278
+ bne century
279
+
280
+ month:
265
281
asl
266
282
asl
267
283
tax
@@ -274,10 +290,7 @@ typedef .struct ds1501
274
290
cpy #$02
275
291
bne loop_month
276
292
277
- ; jsr byte2str
278
- ; stx buffer+3
279
- ; sta buffer+4
280
-
293
+ century:
281
294
lda ds1501::century
282
295
jsr byte2str
283
296
stx buffer+6 +2
You can’t perform that action at this time.
0 commit comments