Timer? input question
Carl Ijames
ijames at netaxs.com
Fri Aug 24 00:10:27 GMT 2001
>What is the reason for a section of code to do something like this? I'm
>hypothesizing that it is reading a timer from outside the HC11, and it
>wants to compare whatever is at $14a6 & $1486, without getting interrupted
>and the lda & nop are just for a little delay to read or time to twiddle
>bits or something. Am I in the ballpark?
My guess is that either the hardware register is double buffered so they
read it twice to get the latest data (and for some reason this is slow so
they need the nop to let the register get ready to be read again), or maybe
reading it clears the register so they get only the data that came in
during the time needed to execute one nop (and if an interrupt happened
during this it would screw it all up so that's why they di/ei). Anyway,
just a guess.
>di
>ldaA L14A6
>nop
>ldX L14A6
>ldaA L1486
>nop
>cmpX L1486
>ei
>bne @18
Regards,
Carl Ijames ijames at netaxs.com
----------------------------------------------------------------------------
To unsubscribe from gmecm, send "unsubscribe gmecm" (without the quotes)
in the body of a message (not the subject) to majordomo at lists.diy-efi.org
More information about the Gmecm
mailing list