1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-01 08:29:37 +00:00

Some more 6502 code

git-svn-id: svn://svn.cc65.org/cc65/trunk@485 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2000-11-27 23:37:53 +00:00
parent b4163d0e4e
commit 6cbd32b49d
2 changed files with 14 additions and 5 deletions

View File

@ -14,8 +14,12 @@
ldy #1
lda (sp),y ; get hi byte
tax ; into x
.ifpc02
lda (sp) ; get lo byte
.else
dey
lda (sp),y ; get lo byte
.endif
.endproc

View File

@ -5,7 +5,7 @@
;
.export tossuba0, tossubax
.import addysp1
.import addysp1
.importzp sp, ptr1
;
@ -15,14 +15,19 @@
tossuba0:
ldx #0
tossubax:
ldy #0
sta ptr1
stx ptr1+1
lda (sp),y ; lo byte
sec
.ifpc02
lda (sp),y ; Get lo byte
ldy #1 ; Hi index
.else
ldy #0
lda (sp),y ; Lo byte
iny ; Hi index
.endif
sec
sbc ptr1
sta ptr1 ; save lo byte
iny
lda (sp),y
sbc ptr1+1
tax