Splitted the dec and inc modules into smaller ones

git-svn-id: svn://svn.cc65.org/cc65/trunk@419 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2000-10-31 18:42:47 +00:00
parent 0899e279b3
commit e2c2f872c0
14 changed files with 201 additions and 81 deletions

View file

@ -33,7 +33,9 @@ OBJS = add.o \
bpushbsp.o \
call.o \
compl.o \
dec.o \
decax1.o \
decax2.o \
decaxy.o \
decsp1.o \
decsp2.o \
decsp3.o \
@ -48,7 +50,14 @@ OBJS = add.o \
ge.o \
gt.o \
icmp.o \
inc.o \
incax1.o \
incax2.o \
incax3.o \
incax5.o \
incax6.o \
incax7.o \
incax8.o \
incaxy.o \
incsp1.o \
incsp2.o \
incsp3.o \

View file

@ -1,31 +0,0 @@
;
; Ullrich von Bassewitz, 29.12.1999
;
; CC65 runtime: Decrement ax by constant or value in Y
;
.export decaxy
.export decax2, decax1
.importzp tmp1
decaxy: sty tmp1
sec
sbc tmp1
bcs *+3
dex
rts
decax2: sec
sbc #2
bcs *+3
dex
rts
decax1: sec
sbc #1
bcs *+3
dex
rts

18
libsrc/runtime/decax1.s Normal file
View file

@ -0,0 +1,18 @@
;
; Ullrich von Bassewitz, 29.12.1999
;
; CC65 runtime: Decrement ax by 1
;
.export decax1
.macpack generic
.proc decax1
sub #1
bcs @L9
dex
@L9: rts
.endproc

18
libsrc/runtime/decax2.s Normal file
View file

@ -0,0 +1,18 @@
;
; Ullrich von Bassewitz, 29.12.1999
;
; CC65 runtime: Decrement ax by 2
;
.export decax2
.macpack generic
.proc decax2
sub #2
bcs @L9
dex
@L9: rts
.endproc

21
libsrc/runtime/decaxy.s Normal file
View file

@ -0,0 +1,21 @@
;
; Ullrich von Bassewitz, 29.12.1999
;
; CC65 runtime: Decrement ax by value in Y
;
.export decaxy
.importzp tmp1
.macpack generic
.proc decaxy
sty tmp1
sub tmp1
bcs @L9
dex
@L9: rts
.endproc

View file

@ -1,48 +0,0 @@
;
; Ullrich von Bassewitz, 05.08.1998
;
; CC65 runtime: Increment ax by constant or value in Y
;
.export incaxy
.export incax8, incax7, incax6, incax5
.export incax4, incax3, incax2, incax1
.importzp tmp1
incax8: ldy #8
bne incaxy
incax7: ldy #7
bne incaxy
incax6: ldy #6
bne incaxy
incax5: ldy #5
bne incaxy
incax4: ldy #4
bne incaxy
incax3: ldy #3
; bne incaxy
incaxy: sty tmp1
clc
adc tmp1
bcc *+3
inx
rts
incax2: clc
adc #2
bcc *+3
inx
rts
incax1: clc
adc #1
bcc *+3
inx
rts

18
libsrc/runtime/incax1.s Normal file
View file

@ -0,0 +1,18 @@
;
; Ullrich von Bassewitz, 05.08.1998
;
; CC65 runtime: Increment ax by 1
;
.export incax1
.macpack generic
.proc incax1
add #1
bcc @L9
inx
@L9: rts
.endproc

18
libsrc/runtime/incax2.s Normal file
View file

@ -0,0 +1,18 @@
;
; Ullrich von Bassewitz, 05.08.1998
;
; CC65 runtime: Increment ax by 2
;
.export incax2
.macpack generic
.proc incax2
add #2
bcc @L9
inx
@L9: rts
.endproc

16
libsrc/runtime/incax3.s Normal file
View file

@ -0,0 +1,16 @@
;
; Ullrich von Bassewitz, 05.08.1998
;
; CC65 runtime: Increment ax by 3
;
.export incax3
.import incaxy
.proc incax3
lda #3
jmp incaxy
.endproc

16
libsrc/runtime/incax5.s Normal file
View file

@ -0,0 +1,16 @@
;
; Ullrich von Bassewitz, 05.08.1998
;
; CC65 runtime: Increment ax by 5
;
.export incax5
.import incaxy
.proc incax5
lda #5
jmp incaxy
.endproc

16
libsrc/runtime/incax6.s Normal file
View file

@ -0,0 +1,16 @@
;
; Ullrich von Bassewitz, 05.08.1998
;
; CC65 runtime: Increment ax by 6
;
.export incax6
.import incaxy
.proc incax6
lda #6
jmp incaxy
.endproc

16
libsrc/runtime/incax7.s Normal file
View file

@ -0,0 +1,16 @@
;
; Ullrich von Bassewitz, 05.08.1998
;
; CC65 runtime: Increment ax by 7
;
.export incax7
.import incaxy
.proc incax7
lda #7
jmp incaxy
.endproc

16
libsrc/runtime/incax8.s Normal file
View file

@ -0,0 +1,16 @@
;
; Ullrich von Bassewitz, 05.08.1998
;
; CC65 runtime: Increment ax by 8
;
.export incax8
.import incaxy
.proc incax8
lda #8
jmp incaxy
.endproc

17
libsrc/runtime/incaxy.s Normal file
View file

@ -0,0 +1,17 @@
;
; Ullrich von Bassewitz, 05.08.1998
;
; CC65 runtime: Increment ax by valie in y
;
.export incaxy, incax4
.importzp tmp1
.macpack generic
incax4: ldy #4
incaxy: sty tmp1
add tmp1
bcc @L9
inx
@L9: rts