mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-09 12:38:06 +11:00
14 lines
527 B
Plaintext
14 lines
527 B
Plaintext
|
( The word below is designed to wait the proper 100us per tick
|
||
|
at 500kHz when tickfactor is 1. If the CPU runs faster,
|
||
|
tickfactor has to be adjusted accordingly. "t" in comments
|
||
|
below means "T-cycle", which at 500kHz is worth 2us. )
|
||
|
CODE TICKS
|
||
|
HL POP, chkPS,
|
||
|
( we pre-dec to compensate for initialization )
|
||
|
BEGIN,
|
||
|
HL DECd, ( 6t )
|
||
|
IFZ, ( 12t ) JPNEXT, THEN,
|
||
|
A tickfactor @ LDri, ( 7t )
|
||
|
BEGIN, A DECr, ( 4t ) JRNZ, ( 12t ) AGAIN,
|
||
|
JR, ( 12t ) AGAIN, ( outer: 37t inner: 16t )
|