1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-05 21:29:03 +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 ldy #1
lda (sp),y ; get hi byte lda (sp),y ; get hi byte
tax ; into x tax ; into x
.ifpc02
lda (sp) ; get lo byte
.else
dey dey
lda (sp),y ; get lo byte lda (sp),y ; get lo byte
.endif
.endproc .endproc

View File

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