File tree Expand file tree Collapse file tree 1 file changed +18
-11
lines changed Expand file tree Collapse file tree 1 file changed +18
-11
lines changed Original file line number Diff line number Diff line change 99
1010void pause (unsigned char delay )
1111{
12- #ifdef DRAGON
13- asm
14- {
15- // We come here from a JMP $C000 in Color Basic (normally at
16- // $A10A in v1.2). At this point, the 60 Hz interrupt has
17- // not been enabled yet, so enable it.
18- lda $FF03 // get control register of PIA0, port B
12+ #ifdef DRAGON
13+ asm
14+ {
15+ // We come here from a JMP $C000 in Color Basic (normally at
16+ // $A10A in v1.2). At this point, the 60 Hz interrupt has
17+ // not been enabled yet, so enable it.
18+ lda $FF03 // get control register of PIA0, port B
1919 ora #1
20- sta $FF03 // enable 60 Hz interrupt
20+ sta $FF03 // enable 60 Hz interrupt
2121
22- // Unmask interrupts to allow the timer IRQ to be processed.
22+ // Unmask interrupts to allow the timer IRQ to be processed.
2323 andcc #$AF
24- }
24+ }
2525#endif
26- sleep (delay /20 );
26+
27+ if (!delay )
28+ {
29+ return ;
30+ }
31+
32+ setTimer (0 );
33+ while (getTimer () < delay );
2734}
2835
2936#endif /* _CMOC_VERSION */
You can’t perform that action at this time.
0 commit comments