We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e99291d commit ef867dbCopy full SHA for ef867db
1 file changed
src/crt/crt0.S
@@ -288,11 +288,16 @@ ___libload_libs_ret:
288
res ti.bTmr1Enable, (hl)
289
set ti.bTmr1Crystal, (hl)
290
res ti.bTmr1Overflow, (hl)
291
- ld l, (ti.mpTmr1Counter + 1) & 0xFF
292
- ld de, 0 ; Set the counter to zero
293
- ld (hl), de
294
- dec hl
295
- ld (hl), e
+
+ ; Set the counter to zero
+ .errif (ti.mpTmr1Counter & 0xFFFF) != 0
+ ld l, h ; ld hl, ti.mpTmr1Counter
+ ld b, 4
296
+.L.zeroize_counter:
297
+ ld (hl), h
298
+ inc hl
299
+ djnz .L.zeroize_counter
300
301
ld l, ti.mpTmrCtrl & 0xFF
302
set ti.bTmr1Enable, (hl) ; Enable the timer
303
#endif
0 commit comments