mirror of
https://github.com/irmen/prog8.git
synced 2024-12-25 23:29:55 +00:00
irq-safe irqd handling for RDTIM16
This commit is contained in:
parent
8e5c67b4b2
commit
b5255444cd
@ -70,9 +70,10 @@ asmsub RDTIM16() -> uword @AY {
|
|||||||
; -- like RDTIM() but only returning the lower 16 bits in AY for convenience
|
; -- like RDTIM() but only returning the lower 16 bits in AY for convenience
|
||||||
%asm {{
|
%asm {{
|
||||||
phx
|
phx
|
||||||
|
php
|
||||||
sei
|
sei
|
||||||
jsr c64.RDTIM
|
jsr c64.RDTIM
|
||||||
cli
|
plp
|
||||||
pha
|
pha
|
||||||
txa
|
txa
|
||||||
tay
|
tay
|
||||||
@ -927,6 +928,7 @@ sys {
|
|||||||
asmsub wait(uword jiffies @AY) {
|
asmsub wait(uword jiffies @AY) {
|
||||||
; --- wait approximately the given number of jiffies (1/60th seconds) (N or N+1)
|
; --- wait approximately the given number of jiffies (1/60th seconds) (N or N+1)
|
||||||
; note: the system irq handler has to be active for this to work as it depends on the system jiffy clock
|
; note: the system irq handler has to be active for this to work as it depends on the system jiffy clock
|
||||||
|
; note: this routine cannot be used from inside a irq handler
|
||||||
%asm {{
|
%asm {{
|
||||||
phx
|
phx
|
||||||
sta P8ZP_SCRATCH_W1
|
sta P8ZP_SCRATCH_W1
|
||||||
|
Loading…
Reference in New Issue
Block a user