Array concatenation: Difference between revisions

Content added Content deleted
Line 3,854: Line 3,854:
Credit to Keith of [https://www.chibiakumas.com ChibiAkumas] for creating it.
Credit to Keith of [https://www.chibiakumas.com ChibiAkumas] for creating it.


<lang z80>
<lang z80> org $8000

org &8000
ld hl,TestArray1 ; pointer to first array
ld hl,TestArray1 ; pointer to first array
ld de,ArrayRam ; pointer to ram area
ld de,ArrayRam ; pointer to ram area
Line 3,878: Line 3,877:
ds 24,0 ;24 bytes initialized to zero
ds 24,0 ;24 bytes initialized to zero


org &9000
org $9000
TestArray2:
TestArray2:
byte &23,&45,&67,&89
byte $23,$45,$67,$89
; just to prove that this doesn't rely on the arrays
; just to prove that this doesn't rely on the arrays
; being "already concatenated" I've stored them
; being "already concatenated" I've stored them
; in the reverse order.
; in the reverse order.
TestArray1:
TestArray1:
byte &aa,&bb,&cc,&dd,&ee,&ff</lang>
byte $aa,$bb,$cc,$dd,$ee,$ff</lang>


{{out}}
{{out}}