Moved 6502-specific implementation of local continuations into a 'sys' folder in order to allow the
#include "sys/lc.h" in core/sys/pt.h to find it.
This commit is contained in:
parent
859ab1b706
commit
6c4bcfb86f
3 changed files with 1 additions and 53 deletions
30
cpu/6502/sys/lc-asm.S
Normal file
30
cpu/6502/sys/lc-asm.S
Normal file
|
@ -0,0 +1,30 @@
|
|||
;---------------------------------------------------------------------
|
||||
.importzp ptr1
|
||||
.export _lc_set
|
||||
.export _lc_resume
|
||||
;---------------------------------------------------------------------
|
||||
_lc_set:
|
||||
sta ptr1
|
||||
stx ptr1+1
|
||||
tsx
|
||||
lda $0102,x
|
||||
ldy #$01
|
||||
sta (ptr1),y
|
||||
lda $0101,x
|
||||
dey
|
||||
sta (ptr1),y
|
||||
rts
|
||||
;---------------------------------------------------------------------
|
||||
_lc_resume:
|
||||
sta ptr1
|
||||
stx ptr1+1
|
||||
ldy #$01
|
||||
lda (ptr1),y
|
||||
beq :+
|
||||
tsx
|
||||
sta $0102,x
|
||||
dey
|
||||
lda (ptr1),y
|
||||
sta $0101,x
|
||||
: rts
|
||||
;---------------------------------------------------------------------
|
Loading…
Add table
Add a link
Reference in a new issue