Skip to content

CopyBank

Narta Xaymar Dirks edited this page Oct 28, 2026 · 5 revisions

Blitz3DBlitzPlusBlitzBasic

CopyBank

CopyBank:Void src_bank:Int32, src_offset:Int32, dest_bank:Int32, dest_offset:Int32, count:Int32
Parameter Mode Type Default Description
src_bank In Int32 required The bank to copy from.
src_offset In Int32 required Where in that bank to start.
dest_bank In Int32 required The bank to copy into.
dest_offset In Int32 required Where in that bank to start.
count In Int32 required How many bytes to copy.

Description

Copies bytes from one bank to another, or inside the same bank. Overlapping parts inside a single bank are handled correctly.

Examples

source = CreateBank(4)
destination = CreateBank(4)
For i = 0 To 3
	PokeByte source, i, 10 + i
Next
CopyBank source, 1, destination, 0, 3
Print PeekByte(destination, 0)
Print PeekByte(destination, 2)
FreeBank source
FreeBank destination
11
13

Related Commands

BankSize, CreateBank, FreeBank, ResizeBank

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally