osd-contiki/cpu/6502/sys/lc-asm.S
2006-12-31 14:26:02 +00:00

31 lines
571 B
ArmAsm

;---------------------------------------------------------------------
.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
;---------------------------------------------------------------------