mirror of
https://github.com/cc65/cc65.git
synced 2025-08-08 06:25:17 +00:00
Add c16 files as well.
This commit is contained in:
22
libsrc/c16/fast.s
Normal file
22
libsrc/c16/fast.s
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
;
|
||||||
|
; Marco van den Heuvel, 2018-03-20
|
||||||
|
;
|
||||||
|
; void fast (void);
|
||||||
|
; /* Switch the CPU into double clock mode. */
|
||||||
|
;
|
||||||
|
|
||||||
|
.export _fast
|
||||||
|
|
||||||
|
.include "plus4.inc"
|
||||||
|
|
||||||
|
|
||||||
|
.proc _fast
|
||||||
|
|
||||||
|
lda TED_CLK
|
||||||
|
and #%11111101
|
||||||
|
sta TED_CLK
|
||||||
|
rts
|
||||||
|
|
||||||
|
.endproc
|
||||||
|
|
||||||
|
|
22
libsrc/c16/isfast.s
Normal file
22
libsrc/c16/isfast.s
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
;
|
||||||
|
; Marco van den Heuvel, 2018-03-20
|
||||||
|
;
|
||||||
|
; unsigned char isfast (void);
|
||||||
|
; /* Returns 1 if the CPU is in double clock mode. */
|
||||||
|
;
|
||||||
|
|
||||||
|
.export _isfast
|
||||||
|
|
||||||
|
.include "plus4.inc"
|
||||||
|
|
||||||
|
|
||||||
|
.proc _isfast
|
||||||
|
|
||||||
|
lda TED_CLK
|
||||||
|
lsr
|
||||||
|
and #$01
|
||||||
|
ldx #$00
|
||||||
|
rts
|
||||||
|
|
||||||
|
.endproc
|
||||||
|
|
22
libsrc/c16/slow.s
Normal file
22
libsrc/c16/slow.s
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
;
|
||||||
|
; Marco van den Heuvel, 2018-03-28
|
||||||
|
;
|
||||||
|
; void slow (void);
|
||||||
|
; /* Switch the CPU into single clock mode. */
|
||||||
|
;
|
||||||
|
|
||||||
|
.export _slow
|
||||||
|
|
||||||
|
.include "plus4.inc"
|
||||||
|
|
||||||
|
|
||||||
|
.proc _slow
|
||||||
|
|
||||||
|
lda TED_CLK
|
||||||
|
ora #%00000010
|
||||||
|
sta TED_CLK
|
||||||
|
rts
|
||||||
|
|
||||||
|
.endproc
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user