#
# Export palette in Multipaint format
# Just a demo, does not consider legacy formats such as Amiga-formatted palettes
#

# Palette start address

A=256

# Get no of colors for this mode

N=PEEK 4

# loop

FOR I=0 TO N
	R=PEEK A
	A=A+1
	G=PEEK A
	A=A+1
	B=PEEK A
	A=A+1
	XBYTE R
	XBYTE G
	XBYTE B
NEXT I

SAVE