Array concatenation: Difference between revisions

Content added Content deleted
(→‎{{header|Z80 Assembly}}: clarification and formatting)
Line 3,858: Line 3,858:
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
ld bc,6 ; size of first array
ld bc,6 ; size of first array
ldir
ldir
Line 3,865: Line 3,865:
ld hl,TestArray2 ; pointer to second array
ld hl,TestArray2 ; pointer to second array
ld bc,4 ; size of second array
ld bc,4 ; size of second array
ldir
ldir
call Monitor_MemDump
call Monitor_MemDump
db 32 ; hexdump 32 bytes
db 32 ; hexdump 32 bytes (only the bytes from the arrays will be shown in the output for clarity)
dw ArrayRam ; start dumping from ArrayRam
dw ArrayRam ; start dumping from ArrayRam
ret ; return to basic
ret ; return to basic


ArrayRam:
ArrayRam:
ds 24,0 ;24 bytes initialized to zero
ds 24,0 ;24 bytes of ram initialized to zero


org $9000
org $9000
Line 3,889: Line 3,889:
<pre>
<pre>
801D:
801D:
AA BB CC DD EE FF 23 45 67 89 00
AA BB CC DD EE FF 23 45 67 89
</pre>
</pre>