mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
Merge pull request #346 from DrDoof/fix/crtstart-home
Rename crtstart.asm to crtbank.asm put the bank switching helpers in HOME-code location
This commit is contained in:
@@ -118,7 +118,7 @@ $(BUILDDIR)/%.rel: %.asm
|
|||||||
${ASM} ${AFLAGS} -o $@ $<
|
${ASM} ${AFLAGS} -o $@ $<
|
||||||
# mv -f $(addprefix $(basename $^), .lst .rel .sym) .
|
# mv -f $(addprefix $(basename $^), .lst .rel .sym) .
|
||||||
|
|
||||||
$(BUILDDIR)/rtlplayground.ihx: $(OBJS) $(BUILDDIR)/crtstart.rel $(BUILDDIR)/crc16.rel
|
$(BUILDDIR)/rtlplayground.ihx: $(OBJS) $(BUILDDIR)/crtbank.rel $(BUILDDIR)/crc16.rel
|
||||||
$(CC) $(CC_FLAGS) -Wl-bHOME=0x00000 -Wl-bBANK1=0x14000 -Wl-bBANK2=0x24000 -Wl-r -o $@ $^
|
$(CC) $(CC_FLAGS) -Wl-bHOME=0x00000 -Wl-bBANK1=0x14000 -Wl-bBANK2=0x24000 -Wl-r -o $@ $^
|
||||||
|
|
||||||
$(BUILDDIR)/rtlplayground.img: $(BUILDDIR)/rtlplayground.ihx
|
$(BUILDDIR)/rtlplayground.img: $(BUILDDIR)/rtlplayground.ihx
|
||||||
|
|||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
.area HOME (CODE)
|
||||||
|
.area GSINIT0 (CODE)
|
||||||
|
.area GSINIT1 (CODE)
|
||||||
|
.area GSINIT2 (CODE)
|
||||||
|
.area GSINIT3 (CODE)
|
||||||
|
.area GSINIT4 (CODE)
|
||||||
|
.area GSINIT5 (CODE)
|
||||||
|
.area GSINIT (CODE)
|
||||||
|
.area GSFINAL (CODE)
|
||||||
|
.area CSEG (CODE)
|
||||||
|
|
||||||
|
|
||||||
|
.area HOME (CODE)
|
||||||
|
|
||||||
|
__sdcc_banked_call::
|
||||||
|
push _PSBANK
|
||||||
|
xch a,r0
|
||||||
|
push a
|
||||||
|
mov a,r1
|
||||||
|
push a
|
||||||
|
mov a,r2
|
||||||
|
anl a,#0x1f
|
||||||
|
mov _PSBANK, a
|
||||||
|
xch a, r0
|
||||||
|
ret
|
||||||
|
|
||||||
|
__sdcc_banked_ret::
|
||||||
|
pop _PSBANK
|
||||||
|
ret
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
.area GSFINAL (CODE)
|
|
||||||
|
|
||||||
__sdcc_banked_call::
|
|
||||||
push _PSBANK
|
|
||||||
xch a,r0
|
|
||||||
push a
|
|
||||||
mov a,r1
|
|
||||||
push a
|
|
||||||
mov a,r2
|
|
||||||
anl a,#0x1f
|
|
||||||
mov _PSBANK, a
|
|
||||||
xch a, r0
|
|
||||||
ret
|
|
||||||
|
|
||||||
__sdcc_banked_ret::
|
|
||||||
pop _PSBANK
|
|
||||||
ret
|
|
||||||
Reference in New Issue
Block a user