Small cleanup of C calling

This commit is contained in:
alpine9000
2016-03-17 08:42:53 +11:00
parent bb70da37ac
commit f088f204fd
2 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -1,7 +1,7 @@
include "includes.i"
xref InstallColorPalette
xref PokeBitplanePointers
;; xref PokeBitplanePointers ;; We don't need the ASM version of this for this example
xref copperList
xref copperListAlternate
xref bitplanes
@@ -27,7 +27,8 @@ Entry:
bra .mainLoop
;===========================================================
if 1
; We don't need the ASM version of this for this example
if 0
PokeBitplanePointers:
; d0 = frame offset in bytes;
; a0 = BPLP copper list address
+2 -2
View File
@@ -21,7 +21,7 @@ Init:
move.l #SCREEN_BIT_DEPTH,-(sp) ; in reverse order. 16 bit variables are passed as 32 bits.
move.l #1,-(sp) ; interlace line.
pea bitplanes ; make sure you push the address...
pea copperListAlternate ; of variables, not the value.
pea copperListAlternate ; of pointers, not the value they point to.
jsr _PokeBitplanePointers ; C adds an _ to all global symbols.
add.l #20,sp ; Need to pop the arguments from the stack.
endif
@@ -30,7 +30,7 @@ Init:
move.l #SCREEN_BIT_DEPTH,-(sp) ; in reverse order.
move.l #0,-(sp) ; normal line.
pea bitplanes ; make sure you push the address...
pea copperList ; of variables, not the value.
pea copperList ; of pointers, not the value they point to.
jsr _PokeBitplanePointers ; C adds an _ to all global symbols.
add.l #20,sp ; Need to pop the arguments from the stack.